[IntersectionObserver] Fix isIntersecting computation when 0 is not a threshold
authorajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 14:47:40 +0000 (14:47 +0000)
committerajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 14:47:40 +0000 (14:47 +0000)
commit927bba537ea6d530fc45762e64cfb3f6d5304b1c
treeb4f5abe1c8d86359739a978e5a2c6b74ae3cd4c0
parent75414a3c9f3ccdcaaf891e2845f90f10b4c48e00
[IntersectionObserver] Fix isIntersecting computation when 0 is not a threshold
https://bugs.webkit.org/show_bug.cgi?id=191210

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update expectation for test that now passes.

* web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt:

Source/WebCore:

isIntersecting should be false if the intersection ratio is smaller than the
smallest threshold value. Update the computation of isIntersecting to depend on
the current thresholdIndex.

Test: imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.html

* dom/Document.cpp:
(WebCore::Document::updateIntersectionObservations):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp