Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 440717a86ea194ba04c56366ff9be4af26631a6f
https://github.com/WebKit/WebKit/commit/440717a86ea194ba04c56366ff9be4af26631a6f
Author: Elika Etemad <[email protected]>
Date: 2025-07-21 (Mon, 21 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-position-borders-002-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
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001.html
M Source/WebCore/rendering/PositionedLayoutConstraints.cpp
M Source/WebCore/rendering/PositionedLayoutConstraints.h
M Source/WebCore/style/AnchorPositionEvaluator.cpp
Log Message:
-----------
anchor() fails to account for position-area
https://bugs.webkit.org/show_bug.cgi?id=295936
rdar://155826872
Reviewed by Alan Baradlay.
Re-use PositionedLayoutConstraints to calculate the containing block when
computing anchor() functions so that we get its handling of position-area,
etc.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt:
Update expectations. We fail slightly less. :)
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-borders-002-expected.txt:
Update expectations. We would now pass this if it were LTR; see bug 295964 for
the remainder.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-grid-001-expected.txt:
Update expectations. We are now more consistent about our mistakes, at least.
Sizes should now be correct; positions are consistently off.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-inline-004-expected.txt:
Update expectations. We now size correctly, though position is still off.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-anchor-001.html:
Added.
Add new test. https://github.com/web-platform-tests/wpt/pull/53874
* Source/WebCore/rendering/PositionedLayoutConstraints.cpp:
(WebCore::PositionedLayoutConstraints::extractRange):
(WebCore::PositionedLayoutConstraints::captureAnchorGeometry):
Separate out the logic for getting an anchor range with respect to
the absolute positioning containing block.
* Source/WebCore/rendering/PositionedLayoutConstraints.h:
(WebCore::PositionedLayoutConstraints::container const):
(WebCore::PositionedLayoutConstraints::containingRange const):
(WebCore::PositionedLayoutConstraints::selfWritingMode const):
(WebCore::PositionedLayoutConstraints::isOpposing const):
Expose some more data to users of PositionedLayoutArea.
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::mapInsetPropertyToLogicalAxis):
(WebCore::Style::isInsetPropertyContainerStartSide):
(WebCore::Style::getOppositeInset):
Add new helper methods.
(WebCore::Style::applyTryTacticsToInset):
(WebCore::Style::computeInsetValue):
Rewrite inset calculations to use PositionedLayoutConstraints.
(WebCore::Style::mapInsetPropertyToPhysicalSide): Deleted.
(WebCore::Style::flipBoxSide): Deleted.
(WebCore::Style::swapSideForTryTactics): Deleted.
(WebCore::Style::computeStartEndBoxSide): Deleted.
(WebCore::Style::removeBorderForInsetValue): Deleted.
Remove newly unused helper methods.
Canonical link: https://commits.webkit.org/297723@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