Title: [237798] trunk
Revision
237798
Author
[email protected]
Date
2018-11-05 06:47:40 -0800 (Mon, 05 Nov 2018)

Log Message

[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):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (237797 => 237798)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-11-05 13:55:21 UTC (rev 237797)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-11-05 14:47:40 UTC (rev 237798)
@@ -1,3 +1,14 @@
+2018-11-05  Ali Juma  <[email protected]>
+
+        [IntersectionObserver] Fix isIntersecting computation when 0 is not a threshold
+        https://bugs.webkit.org/show_bug.cgi?id=191210
+
+        Reviewed by Simon Fraser.
+
+        Update expectation for test that now passes.
+
+        * web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt:
+
 2018-11-04  Youenn Fablet  <[email protected]>
 
         IDB should allow storing RTCCertificate

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt (237797 => 237798)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt	2018-11-05 13:55:21 UTC (rev 237797)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.txt	2018-11-05 14:47:40 UTC (rev 237798)
@@ -1,5 +1,5 @@
 
 PASS First observation with a threshold. 
-FAIL First rAF assert_equals: entries[0].isIntersecting expected false but got true
+PASS First rAF 
 PASS root.scrollTop = 20 
 

Modified: trunk/Source/WebCore/ChangeLog (237797 => 237798)


--- trunk/Source/WebCore/ChangeLog	2018-11-05 13:55:21 UTC (rev 237797)
+++ trunk/Source/WebCore/ChangeLog	2018-11-05 14:47:40 UTC (rev 237798)
@@ -1,3 +1,19 @@
+2018-11-05  Ali Juma  <[email protected]>
+
+        [IntersectionObserver] Fix isIntersecting computation when 0 is not a threshold
+        https://bugs.webkit.org/show_bug.cgi?id=191210
+
+        Reviewed by Simon Fraser.
+
+        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):
+
 2018-11-05  Rob Buis  <[email protected]>
 
         Remove some virtual methods in CachedRawResource

Modified: trunk/Source/WebCore/dom/Document.cpp (237797 => 237798)


--- trunk/Source/WebCore/dom/Document.cpp	2018-11-05 13:55:21 UTC (rev 237797)
+++ trunk/Source/WebCore/dom/Document.cpp	2018-11-05 14:47:40 UTC (rev 237798)
@@ -7778,7 +7778,7 @@
                     { clientIntersectionRect.x(), clientIntersectionRect.y(), clientIntersectionRect.width(), clientIntersectionRect.height() },
                     intersectionRatio,
                     target,
-                    intersectionState? intersectionState->isIntersecting : false,
+                    thresholdIndex > 0,
                 }));
                 needNotify = true;
                 registration.previousThresholdIndex = thresholdIndex;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to