1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

LibWeb: Move scroll offset state from layout tree to dom tree

Scroll offset state should not be reset by layout tree rebuilt.
This commit is contained in:
Aliaksandr Kalenik 2023-08-06 02:15:21 +02:00 committed by Andreas Kling
parent b6ea4b002b
commit 55b5c61a79
3 changed files with 36 additions and 5 deletions

View file

@ -54,7 +54,7 @@ public:
bool is_scroll_container() const;
bool is_scrollable() const;
CSSPixelPoint scroll_offset() const { return m_scroll_offset; }
CSSPixelPoint scroll_offset() const;
void set_scroll_offset(CSSPixelPoint);
protected:
@ -64,8 +64,6 @@ protected:
private:
virtual bool is_box() const final { return true; }
CSSPixelPoint m_scroll_offset;
Optional<CSSPixels> m_natural_width;
Optional<CSSPixels> m_natural_height;
Optional<float> m_natural_aspect_ratio;