Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90aaff9c95eb97972eee2e25ecc64dc855d313a0
      
https://github.com/WebKit/WebKit/commit/90aaff9c95eb97972eee2e25ecc64dc855d313a0
  Author: Elika Etemad <[email protected]>
  Date:   2025-07-23 (Wed, 23 Jul 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-multicol-003-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-multicol-004-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-grid-001-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-inline-004-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-002-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-003-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-004-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-006-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-colspan-002-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-nested-001-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-003-expected.txt
    M Source/WebCore/rendering/RenderFragmentContainer.h
    M Source/WebCore/rendering/RenderFragmentedFlow.cpp
    M Source/WebCore/rendering/RenderFragmentedFlow.h
    M Source/WebCore/rendering/RenderMultiColumnSet.cpp
    M Source/WebCore/rendering/RenderMultiColumnSet.h
    M Source/WebCore/style/AnchorPositionEvaluator.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Integrate anchor positioning with multicol layout
https://bugs.webkit.org/show_bug.cgi?id=296314
rdar://156366253

Reviewed by Alan Baradlay.

Fixes two problems with anchor positioning integration with multicol layout
(fragmented flows):
1. We shouldn't do fragmented flow special handling when the containing
   block is inside the fragmented flow along with the anchor.
2. The anchor-size() function wasn't handling fragmented flows at all.

The patch extracts the multicol bounding box logic into a helper function,
gates it on whether or not the containing block is inside the fragmented flow,
and applies this logic also to anchor-size().

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-multicol-003-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-multicol-004-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-grid-001-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-inline-004-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-002-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-003-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-004-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-006-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-colspan-002-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-nested-001-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-003-expected.txt:

Update test expectations.

* Source/WebCore/rendering/RenderFragmentContainer.h:
(WebCore::RenderFragmentContainer::collectLayerFragments const):
(WebCore::RenderFragmentContainer::collectLayerFragments): Deleted.
* Source/WebCore/rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::collectLayerFragments const):
(WebCore::RenderFragmentedFlow::fragmentsBoundingBox const):
(WebCore::RenderFragmentedFlow::collectLayerFragments): Deleted.
(WebCore::RenderFragmentedFlow::fragmentsBoundingBox): Deleted.
* Source/WebCore/rendering/RenderFragmentedFlow.h:
* Source/WebCore/rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments const):
(WebCore::RenderMultiColumnSet::collectLayerFragments): Deleted.
* Source/WebCore/rendering/RenderMultiColumnSet.h:

Fix const-ness so we can call fragmentsBoundingBox() on a const object.

* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::boundingRectForFragmentedAnchor):

Extract bounding box logic into a helper method.

(WebCore::Style::AnchorPositionEvaluator::computeAnchorRectRelativeToContainingBlock):

Call the helper method, gated on whether the containing block is inside the
fragmented flow together with the anchor or not.

(WebCore::Style::AnchorPositionEvaluator::evaluateSize):

Apply the same logic to anchor-size().

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to