1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:07:45 +00:00

LibWeb: Move scroll state from Layout::BlockContainer to Layout::Box

Let's allow any box to be scrollable, not just block containers.
This commit is contained in:
Andreas Kling 2023-01-23 17:04:24 +01:00
parent 8fe748bb89
commit 3dd006f719
6 changed files with 40 additions and 43 deletions

View file

@ -20,18 +20,12 @@ public:
BlockContainer(DOM::Document&, DOM::Node*, CSS::ComputedValues);
virtual ~BlockContainer() override;
bool is_scrollable() const;
CSSPixelPoint scroll_offset() const { return m_scroll_offset; }
void set_scroll_offset(CSSPixelPoint);
Painting::PaintableWithLines const* paint_box() const;
virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
private:
virtual bool is_block_container() const final { return true; }
CSSPixelPoint m_scroll_offset;
};
template<>