2022-03-10 14:02:25 +01:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2022-03-10 14:02:25 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2024-11-26 12:00:15 +01:00
|
|
|
#include <LibWeb/Layout/NavigableContainerViewport.h>
|
2022-03-10 23:13:37 +01:00
|
|
|
#include <LibWeb/Painting/PaintableBox.h>
|
2022-03-10 14:02:25 +01:00
|
|
|
|
|
|
|
|
namespace Web::Painting {
|
|
|
|
|
|
2024-11-26 12:04:14 +01:00
|
|
|
class NavigableContainerViewportPaintable final : public PaintableBox {
|
|
|
|
|
GC_CELL(NavigableContainerViewportPaintable, PaintableBox);
|
|
|
|
|
GC_DECLARE_ALLOCATOR(NavigableContainerViewportPaintable);
|
2023-01-11 12:51:49 +01:00
|
|
|
|
2022-03-10 14:02:25 +01:00
|
|
|
public:
|
2025-07-25 01:39:31 +02:00
|
|
|
virtual bool is_navigable_container_viewport_paintable() const override { return true; }
|
|
|
|
|
|
2024-11-26 12:04:14 +01:00
|
|
|
static GC::Ref<NavigableContainerViewportPaintable> create(Layout::NavigableContainerViewport const&);
|
2022-03-10 14:02:25 +01:00
|
|
|
|
2025-07-31 23:07:26 +02:00
|
|
|
virtual void paint(DisplayListRecordingContext&, PaintPhase) const override;
|
2022-03-10 14:02:25 +01:00
|
|
|
|
2025-10-10 03:30:16 +02:00
|
|
|
auto const& navigable_container() const { return as<HTML::NavigableContainer>(*dom_node()); }
|
2022-03-10 14:02:25 +01:00
|
|
|
|
|
|
|
|
private:
|
2024-11-26 12:04:14 +01:00
|
|
|
NavigableContainerViewportPaintable(Layout::NavigableContainerViewport const&);
|
2022-03-10 14:02:25 +01:00
|
|
|
};
|
|
|
|
|
|
2025-07-25 01:39:31 +02:00
|
|
|
template<>
|
|
|
|
|
inline bool Paintable::fast_is<NavigableContainerViewportPaintable>() const { return is_navigable_container_viewport_paintable(); }
|
|
|
|
|
|
2022-03-10 14:02:25 +01:00
|
|
|
}
|