[IntersectionObserver] Fix initial notifications for non-zero threshold
When a target is first observed, last_threshold_index_ is set to a sentinel value (0x1fffffff), to ensure that an initial notification will be sent on the next frame. For that notification, if the target is intersecting, but the intersection ratio is less than the smallest threshold set on the observer, then the isIntersecting field of the notification should be false. Also, for IOv2, the isVisible field should always be false -- and skip the expensive hit test -- if the intersection ratio is less than the smallest threshold set on the observer. BUG=847623,827639 R=chrishtr@chromium.org Change-Id: I518ff97a23afd92a82c4d01d9280d57ffb0c9ae2 Reviewed-on: https://chromium-review.googlesource.com/1167884Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Stefan Zager <szager@chromium.org> Cr-Commit-Position: refs/heads/master@{#581755}
Showing
Please register or sign in to comment