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

LibWeb: Clamp scroll offset to valid range in set_scroll_offset()

By moving scroll offset clamp from `PaintableBox::scroll_by()` to
`PaintableBox::set_scroll_offset()`, we ensure that updates from
`Element::set_scroll_top()` and `Element::set_scroll_left()` are
constrained to a valid range.
This commit is contained in:
Aliaksandr Kalenik 2024-02-22 01:27:21 +01:00 committed by Andreas Kling
parent ee4abacde6
commit 155070cfd8
3 changed files with 48 additions and 9 deletions

View file

@ -0,0 +1,2 @@
Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10Item 11Item 12 scrollWidth: 1430
scrollLeft: 1130