Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba441a1628f18c0e81953ff64d14e4546c3f8617
      
https://github.com/WebKit/WebKit/commit/ba441a1628f18c0e81953ff64d14e4546c3f8617
  Author: Vitor Roriz <vitor.ro...@apple.com>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/position-absolute-overflow-visible-and-not-visible-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/position-absolute-overflow-visible-and-not-visible.html
    M Source/WebCore/platform/graphics/LayoutRect.cpp
    M Source/WebCore/platform/graphics/LayoutRect.h
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/svg/RenderSVGModelObject.cpp

  Log Message:
  -----------
  Consider overflowX/Y in applyCachedClipAndScrollPosition()
https://bugs.webkit.org/show_bug.cgi?id=249693
rdar://103734614

Reviewed by Simon Fraser.

Up to now, applyCachedClipAndScrollPosition() doesn't take
in consideration that the overflow for an axis can be visible
when computing the interection with the given target.

Now, if overflow is visible in one of the axis, we expand the
target within this axis.

Imagine a case where a children box with absolute position is placed
below its parent. Before, this children box would not be considered
visible even if it would have overflow-y : visible, because there would
not be intersection between parent and children. For this case, we
would now expand the parent into the Y axis when calculating intersection,
resulting in the intersecion rect to be the children box itself.

* 
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/position-absolute-overflow-visible-and-not-visible-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/position-absolute-overflow-visible-and-not-visible.html:
 Added.

* Source/WebCore/platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::expandToInfiniteY):
(WebCore::LayoutRect::expandToInfiniteX):
* Source/WebCore/platform/graphics/LayoutRect.h:
Functions for expanding the Rect to infinite in each axis.

* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollPosition const):
(WebCore::RenderBox::overflowClipRect const):
* Source/WebCore/rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::applyCachedClipAndScrollPosition const):

Canonical link: https://commits.webkit.org/259007@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to