Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 59f39608a5553557ca6bfd729433b0bc4027eb51
https://github.com/WebKit/WebKit/commit/59f39608a5553557ca6bfd729433b0bc4027eb51
Author: Antti Koivisto <[email protected]>
Date: 2025-06-05 (Thu, 05 Jun 2025)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-function-pseudo-element-implicit-anchor-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-function-pseudo-element-implicit-anchor.html
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-003.tentative-expected.txt
M Source/WebCore/style/AnchorPositionEvaluator.cpp
Log Message:
-----------
[css-anchor-position-1] Support implicit anchor element for pseudo-elements
with anchor functions
https://bugs.webkit.org/show_bug.cgi?id=294066
rdar://152635393
Reviewed by Alan Baradlay.
"The implicit anchor element of a pseudo-element is its originating element,
unless otherwise specified."
https://drafts.csswg.org/css-anchor-position-1/#implicit
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-function-pseudo-element-implicit-anchor-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-function-pseudo-element-implicit-anchor.html:
Added.
Add a test.
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-003.tentative-expected.txt:
This tests a proposed 'anchor' attribute which we (nor anyone else) supports.
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::implicitAnchorElementName):
(WebCore::Style::AnchorPositionEvaluator::findAnchorForAnchorFunctionAndAttemptResolution):
If no anchor name is specified then use the special implicit element name.
(WebCore::Style::findLastAcceptableAnchorWithName):
When resolving the implicit element name look for the pseudo-element host.
(WebCore::Style::AnchorPositionEvaluator::isLayoutTimeAnchorPositioned):
(WebCore::Style::AnchorPositionEvaluator::isAnchor):
Host element of an anchored pseudo element is an anchor.
Canonical link: https://commits.webkit.org/295871@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