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:
parent
fa56ce11a9
commit
23a07a8ab6
2 changed files with 16 additions and 6 deletions
|
@ -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 }); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue