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

LibWeb: Introduce PaintableBox::scroll_by()

Moves code responsible for calculation of new scroll offset into
scroll_by() so it could be reused for JS functions that trigger
scroll.
This commit is contained in:
Aliaksandr Kalenik 2023-08-06 20:29:29 +02:00 committed by Andreas Kling
parent fa56ce11a9
commit 23a07a8ab6
2 changed files with 16 additions and 6 deletions

View file

@ -38,6 +38,8 @@ public:
CSSPixelRect absolute_rect() const;
CSSPixelPoint effective_offset() const;
void scroll_by(int delta_x, int delta_y);
void set_offset(CSSPixelPoint);
void set_offset(float x, float y) { set_offset({ x, y }); }