Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb8ef69f7e7a1de470f7c989c51908f985ddbdc8
https://github.com/WebKit/WebKit/commit/fb8ef69f7e7a1de470f7c989c51908f985ddbdc8
Author: Elika Etemad <[email protected]>
Date: 2025-07-24 (Thu, 24 Jul 2025)
Changed paths:
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/position-try-grid-001-expected.txt
M Source/WebCore/rendering/PositionedLayoutConstraints.cpp
M Source/WebCore/rendering/RenderGrid.cpp
M Source/WebCore/rendering/RenderGrid.h
Log Message:
-----------
[css-anchor-1] anchor() fails to account for grid-area
https://bugs.webkit.org/show_bug.cgi?id=295924
rdar://155823420
Reviewed by Alan Baradlay.
PositionedLayoutConstraints relies on grid area information cached during
layout,
but we are not in the middle of layout while computing anchor() insets.
This patch revises PositionedLayoutConstraints to call for a direct computation
of the grid area range, and removes all the extra methods that interact with the
now unnecessary out-of-flow grid-area cache.
*
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/position-try-grid-001-expected.txt:
Pass more tests.
* Source/WebCore/rendering/PositionedLayoutConstraints.cpp:
(WebCore::PositionedLayoutConstraints::captureGridArea):
Call new API for directly computing grid-area LayoutRange.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::layoutOutOfFlowBox):
(WebCore::RenderGrid::columnAxisOffsetForGridItem const):
(WebCore::RenderGrid::rowAxisOffsetForGridItem const):
(WebCore::RenderGrid::gridAreaRangeForOutOfFlow const):
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowGridItem): Deleted.
(WebCore::RenderGrid::logicalOffsetForOutOfFlowGridItem const): Deleted.
(WebCore::RenderGrid::gridAreaRowRangeForOutOfFlow const): Deleted.
(WebCore::RenderGrid::gridAreaColumnRangeForOutOfFlow const): Deleted.
(WebCore::RenderGrid::gridAreaPositionForOutOfFlowGridItem const): Deleted.
(WebCore::RenderGrid::gridAreaPositionForGridItem const): Deleted.
* Source/WebCore/rendering/RenderGrid.h:
Adjust out-of-flow grid-area size computation method to return a LayoutRange,
rename it to gridAreaRangeForOutOfFlow(), and delete all now-unused methods
and data types.
Canonical link: https://commits.webkit.org/297834@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