[IntersectionObserver] Handle zero-area intersections
authorajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Oct 2018 13:47:25 +0000 (13:47 +0000)
committerajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Oct 2018 13:47:25 +0000 (13:47 +0000)
commite9e035dd77ba9f16757760c76622a783a24a3784
treec35eff28a82967ec16b85b525fe54406bda648c9
parent7c5fbd58a3c2f50a0be0c9e72a9887bd22e044a0
[IntersectionObserver] Handle zero-area intersections
https://bugs.webkit.org/show_bug.cgi?id=189624

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Rebaseline expectations for tests that now pass.

* web-platform-tests/intersection-observer/edge-inclusive-intersection-expected.txt:
* web-platform-tests/intersection-observer/isIntersecting-change-events-expected.txt:
* web-platform-tests/intersection-observer/same-document-zero-size-target-expected.txt:
* web-platform-tests/intersection-observer/text-target-expected.txt:
* web-platform-tests/intersection-observer/zero-area-element-visible-expected.txt:

Source/WebCore:

Use edge-inclusive intersection when applying clips and intersecting with the
root, so that two rects that touch each other are considered intersecting even
if the area of their intersection is 0.

Covered by rebased tests in imported/w3c/web-platform-tests/intersection-observer.

* dom/Document.cpp:
(WebCore::computeIntersectionState):
(WebCore::Document::updateIntersectionObservations):
(WebCore::computeIntersectionRects): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/edge-inclusive-intersection-expected.txt
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-change-events-expected.txt
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-zero-size-target-expected.txt
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/text-target-expected.txt
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/zero-area-element-visible-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp