Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4774b6e10334f22c7d810df5f7c0eadca642356d
      
https://github.com/WebKit/WebKit/commit/4774b6e10334f22c7d810df5f7c0eadca642356d
  Author: Elika Etemad <[email protected]>
  Date:   2025-07-11 (Fri, 11 Jul 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-shadow-all-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-shadow-names-expected.txt
    M Source/WebCore/rendering/style/NameScope.h
    M Source/WebCore/style/AnchorPositionEvaluator.cpp
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleScopeOrdinal.h

  Log Message:
  -----------
  anchor-scope name match is tree-scoped
https://bugs.webkit.org/show_bug.cgi?id=293766
rdar://152271352

Reviewed by Tim Nguyen.

1. Use style-scoped names for anchor-name by storing scope info with 
anchor-name.
2. Perform scoped name matches when checking anchor-scope in 
AnchorPositionEvaluator.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-shadow-all-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-shadow-names-expected.txt:
Update tests to passing!

* Source/WebCore/rendering/style/NameScope.h:
(WebCore::operator==):
(WebCore::operator<<):
Introduce a scopeOrdinal data member to NameScope, to represent scoped names.

* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::anchorScopeForAnchorName):
(WebCore::Style::isAcceptableAnchorElement):
(WebCore::Style::findLastAcceptableAnchorWithName):
Update anchor-scope name matching to account for style scope.

* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertNameScope):
Update NameScope builder to capture the style scope.

* Source/WebCore/style/StyleScopeOrdinal.h:
(WebCore::Style::operator<<):

Canonical link: https://commits.webkit.org/297285@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