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

LibWeb: Fix not working Element::scroll_an_element_into_view()

Fixes following mistakes:
- "scrolling box" for a document is not `scrollable_overflow_rect()`
   but size of viewport (initial containing block, like spec says).
- comparing edges of "scrolling box" with edges of target element
  does not make any sense because "scrolling box" edges are relative
  to page while result of `get_bounding_client_rect()` is relative
  to viewport.
This commit is contained in:
Aliaksandr Kalenik 2023-12-18 21:19:10 +01:00 committed by Andreas Kling
parent a93ab25487
commit cda1d886df
5 changed files with 87 additions and 33 deletions

View file

@ -0,0 +1 @@
The page has been scrolled to y: 600

View file

@ -0,0 +1 @@
The page has been scrolled to y: 1000