Changeset 246432 in webkit
- Timestamp:
- Jun 14, 2019 6:05:13 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r246406 r246432 1 2019-06-14 Ali Juma <ajuma@chromium.org> 2 3 IntersectionObserver rootMargin detection fails when `root` is an element 4 https://bugs.webkit.org/show_bug.cgi?id=198784 5 6 Reviewed by Simon Fraser. 7 8 Import https://github.com/web-platform-tests/wpt/pull/17323. 9 10 * web-platform-tests/intersection-observer/root-margin-root-element-expected.txt: Added. 11 * web-platform-tests/intersection-observer/root-margin-root-element.html: Added. 12 1 13 2019-06-13 Youenn Fablet <youenn@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r246431 r246432 1 2019-06-14 Ali Juma <ajuma@chromium.org> 2 3 IntersectionObserver rootMargin detection fails when `root` is an element 4 https://bugs.webkit.org/show_bug.cgi?id=198784 5 6 Reviewed by Simon Fraser. 7 8 When computing a target's bounds in root space, we were applying the root's 9 clip rect (if any), and then intersecting with the root rect expanded by the 10 root margin. This meant that if a target did not intersect the non-expanded root 11 rect, we would get an empty intersection even if the target did intersect the 12 expanded root rect. Fix this by not applying the root's clip rect when computing 13 a target's bounds in root space. Add a new VisibleRectContextOption::ApplyContainerClip 14 that determines whether RenderObject::computeVisibleRectInContainer should apply 15 the container's clip. 16 17 Test: imported/w3c/web-platform-tests/intersection-observer/root-margin-root-element.html 18 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::applyCachedClipAndScrollPosition const): 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::visibleRectContextForRepaint): 23 * rendering/RenderObject.h: 24 1 25 2019-06-14 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r246389 r246432 994 994 995 995 // Do not clip scroll layer contents to reduce the number of repaints while scrolling. 996 if (!context.m_options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling()) { 996 if ((!context.m_options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling()) 997 || (!context.m_options.contains(VisibleRectContextOption::ApplyContainerClip) && this == container)) { 997 998 flipForWritingMode(rect); 998 999 return true; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r246285 r246432 987 987 RenderObject::VisibleRectContext RenderObject::visibleRectContextForRepaint() 988 988 { 989 VisibleRectContext context ;989 VisibleRectContext context(false, false, { VisibleRectContextOption::ApplyContainerClip }); 990 990 if (shouldApplyCompositedContainerScrollsForRepaint()) 991 991 context.m_options.add(VisibleRectContextOption::ApplyCompositedContainerScrolls); -
trunk/Source/WebCore/rendering/RenderObject.h
r246285 r246432 669 669 ApplyCompositedClips = 1 << 1, 670 670 ApplyCompositedContainerScrolls = 1 << 2, 671 ApplyContainerClip = 1 << 3, 671 672 }; 672 673 struct VisibleRectContext {
Note: See TracChangeset
for help on using the changeset viewer.