mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:57:44 +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:
parent
8fe748bb89
commit
3dd006f719
6 changed files with 40 additions and 43 deletions
|
@ -41,12 +41,18 @@ public:
|
|||
|
||||
virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
|
||||
|
||||
bool is_scrollable() const;
|
||||
CSSPixelPoint scroll_offset() const { return m_scroll_offset; }
|
||||
void set_scroll_offset(CSSPixelPoint);
|
||||
|
||||
protected:
|
||||
Box(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);
|
||||
Box(DOM::Document&, DOM::Node*, CSS::ComputedValues);
|
||||
|
||||
private:
|
||||
virtual bool is_box() const final { return true; }
|
||||
|
||||
CSSPixelPoint m_scroll_offset;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue