Changeset 271433 in webkit
- Timestamp:
- Jan 12, 2021, 11:24:08 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-with-document-root-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r271395 r271433 1 2021-01-12 Cathie Chen <cathiechen@igalia.com> 2 3 The rootBounds of IntersectionObserverEntry is not correct when {root:document} 4 https://bugs.webkit.org/show_bug.cgi?id=219495 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/intersection-observer/same-document-with-document-root-expected.txt: 9 1 10 2021-01-12 Manuel Rego Casasnovas <rego@igalia.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-with-document-root-expected.txt
r271234 r271433 2 2 PASS IntersectionObserver in a single document using document as root. 3 3 PASS First rAF. 4 FAIL document.scrollingElement.scrollTop = 300 assert_equals: entries.length expected 2 but got 1 4 PASS document.scrollingElement.scrollTop = 300 5 5 -
trunk/Source/WebCore/ChangeLog
r271425 r271433 1 2021-01-12 Cathie Chen <cathiechen@igalia.com> 2 3 The rootBounds of IntersectionObserverEntry is not correct when {root:document} 4 https://bugs.webkit.org/show_bug.cgi?id=219495 5 6 Reviewed by Darin Adler. 7 8 When {root:document}, rootBounds should be the root intersection rectangle which is the document's viewport, 9 per [1]. The coordinator of rootBounds should be layoutViewportRect, for root intersection rectangle is not affected by pinch zoom [2]. 10 11 [1] https://www.w3.org/TR/intersection-observer/#dom-intersectionobserverentry-rootbounds 12 [2] https://w3c.github.io/IntersectionObserver/#intersectionobserver-root-intersection-rectangle 13 14 * dom/Document.cpp: 15 (WebCore::computeIntersectionState): 16 (WebCore::Document::updateIntersectionObservations): 17 1 18 2021-01-12 Myles C. Maxfield <mmaxfield@apple.com> 2 19 -
trunk/Source/WebCore/dom/Document.cpp
r271418 r271433 7723 7723 return WTF::nullopt; 7724 7724 7725 if (rootRenderer->hasOverflowClip()) 7725 if (observer.root() == &target.document()) 7726 localRootBounds = frameView.layoutViewportRect(); 7727 else if (rootRenderer->hasOverflowClip()) 7726 7728 localRootBounds = rootRenderer->contentBoxRect(); 7727 7729 else … … 7832 7834 auto* targetFrameView = target->document().view(); 7833 7835 targetBoundingClientRect = targetFrameView->absoluteToClientRect(intersectionState->absoluteTargetRect, target->renderer()->style().effectiveZoom()); 7834 auto* rootRenderer = observer->root() ? observer->root()->renderer() : frameView->renderView(); 7835 clientRootBounds = frameView->absoluteToClientRect(intersectionState->absoluteRootBounds, rootRenderer->style().effectiveZoom()); 7836 clientRootBounds = frameView->absoluteToLayoutViewportRect(intersectionState->absoluteRootBounds); 7836 7837 if (intersectionState->isIntersecting) 7837 7838 clientIntersectionRect = targetFrameView->absoluteToClientRect(intersectionState->absoluteIntersectionRect, target->renderer()->style().effectiveZoom());
Note:
See TracChangeset
for help on using the changeset viewer.