Commit graph

14 commits

Author SHA1 Message Date
wolfbeast
78b6f639b2 Map IntersectionObserver rect to the correct viewport.
targetFrame is modified during the intersection computation loop, so
it's not the viewport you want if there are scrollframes around.
This bug triggers when IntersectionObservers are used on frames that
wrap.

Follow-up for #249.
2019-05-17 22:17:16 +08:00
wolfbeast
39d5eb7759 Remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS 2019-02-16 00:27:49 +08:00
wolfbeast
dc2cf8544d Rewrite IntersectionObserver list handling to be more robust.
Tag #935.
2019-02-16 00:24:21 +08:00
wolfbeast
9222116f26 Add isIntersecting property to IntersectionObserverEntry.
Per updated spec.

This resolves the issue raised in #249.
2019-02-16 00:24:20 +08:00
wolfbeast
304984a6aa Fix crashiness of IntersectionObservers.
Mozilla hashtables -still- suck.
2019-02-16 00:23:05 +08:00
wolfbeast
d76f949502 [intersection-observer] Calculate areas using int64_t.
Tag #249
2019-02-16 00:23:00 +08:00
wolfbeast
f82da789c8 Fix singed/unsigned type confusion for intersection threshold.
Tag #249
2019-02-16 00:22:59 +08:00
wolfbeast
d3a8693d52 Use content area as the intersection rectangle ...
... for custom root with overflow clip.
Tag #249
2019-02-16 00:22:57 +08:00
wolfbeast
475d865c14 Map intersectionRect to the coordinate space of the target document.
Spec says: "Map intersectionRect to the coordinate space of the
viewport of the Document containing the target."
Tag #249
2019-02-16 00:22:56 +08:00
wolfbeast
52f04699c0 Use targetFrame->GetRectRelativeToSelf() as the initial intersection rect.
Tag #249.
2019-02-16 00:22:54 +08:00
wolfbeast
47f52cee1f Intersection ratio should be 1.0 for zero-area intersections.
Tag #249
2019-02-16 00:22:53 +08:00
wolfbeast
42d9f2ffb3 Revise lifetime management of IntersectionObservers.
Tag #249
2019-02-16 00:22:51 +08:00
wolfbeast
5af4107852 Stabilize and align Intersection Observers
- Fixes several crashes
- Aligns the feature with the W3C WD spec

Tag #249
2019-02-16 00:05:46 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00