ladybird/Userland/Libraries/LibWeb/IntersectionObserver
Andreas Kling 92bc3d200d LibWeb: Fix incorrectly offset root intersection rectangle for Document
When the intersection root is a Document, we use the viewport itself as
the root intersection rectangle. However, we should only use the size of
the viewport and strip away the current scroll offset.

This is important, as intersections are computed using viewport-relative
element rects, so we're already in a coordinate system where (0, 0) is
the top left of the scrolled viewport.

This fixes an issue where IntersectionObservers would fire at entirely
wrong scroll offsets. :^)
2023-07-11 10:03:49 +02:00
..
IntersectionObserver.cpp LibWeb: Fix incorrectly offset root intersection rectangle for Document 2023-07-11 10:03:49 +02:00
IntersectionObserver.h LibWeb: Add initial implementation of IntersectionObserver 2023-07-07 05:27:25 +02:00
IntersectionObserver.idl LibWeb: Add initial implementation of IntersectionObserver 2023-07-07 05:27:25 +02:00
IntersectionObserverEntry.cpp LibWeb: Add initial implementation of IntersectionObserver 2023-07-07 05:27:25 +02:00
IntersectionObserverEntry.h LibWeb: Add initial implementation of IntersectionObserver 2023-07-07 05:27:25 +02:00
IntersectionObserverEntry.idl LibWeb: Add initial implementation of IntersectionObserver 2023-07-07 05:27:25 +02:00