Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 717cf345ad13f11615ae56d16ca1049614916dc3
      
https://github.com/WebKit/WebKit/commit/717cf345ad13f11615ae56d16ca1049614916dc3
  Author: Aleksei Marchenko <[email protected]>
  Date:   2026-09-04 (Fri, 04 Sep 2026)

  Changed paths:
    A LayoutTests/spatial-css/spatial-portal-anchor-css-expected.txt
    A LayoutTests/spatial-css/spatial-portal-anchor-css.html
    A LayoutTests/spatial-css/spatial-portal-anchor-invalid-expected.txt
    A LayoutTests/spatial-css/spatial-portal-anchor-invalid.html
    A LayoutTests/spatial-css/spatial-portal-anchor-off-expected.txt
    A LayoutTests/spatial-css/spatial-portal-anchor-off.html
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/css/CSSPinnedAnchorNameValue.cpp
    A Source/WebCore/css/CSSPinnedAnchorNameValue.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/CSSValue.cpp
    M Source/WebCore/css/CSSValue.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.h
    A Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.cpp
    A Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.h
    M Source/WebCore/style/values/anchor-position/StylePositionAnchor.cpp
    M Source/WebCore/style/values/anchor-position/StylePositionAnchor.h

  Log Message:
  -----------
  Add position-anchor syntax for model attachment points
https://bugs.webkit.org/show_bug.cgi?id=322777
rdar://182292647

Reviewed by Mike Wyrzykowski, Etienne Segonzac, and Sam Weinig.

Extend position-anchor so an anchor name may carry a '#'-delimited attachment 
point naming a node in
the anchor's model asset. Parsing and serialization only. Proposed in the 
Spatial CSS explainer, not
yet in a specification.

The name and the suffix tokenize separately, which grammar notation cannot 
express, so the suffix is
parsed by hand while the property's grammar stays generated. Only the suffix is 
gated on the spatial
portal feature, so other platforms accept the same values as before.

Adjacency is deliberate: whitespace before the '#' is rejected, comments are 
not, and the hash must be
an identifier.

Tests: spatial-css/spatial-portal-anchor-css.html
       spatial-css/spatial-portal-anchor-invalid.html
       spatial-css/spatial-portal-anchor-off.html

* LayoutTests/spatial-css/spatial-portal-anchor-css-expected.txt: Added.
* LayoutTests/spatial-css/spatial-portal-anchor-css.html: Added.
* LayoutTests/spatial-css/spatial-portal-anchor-invalid-expected.txt: Added.
* LayoutTests/spatial-css/spatial-portal-anchor-invalid.html: Added.
* LayoutTests/spatial-css/spatial-portal-anchor-off-expected.txt: Added.
* LayoutTests/spatial-css/spatial-portal-anchor-off.html: Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSPinnedAnchorNameValue.cpp: Added.
(WebCore::CSSPinnedAnchorNameValue::create):
(WebCore::CSSPinnedAnchorNameValue::CSSPinnedAnchorNameValue):
(WebCore::CSSPinnedAnchorNameValue::customCSSText const):
(WebCore::CSSPinnedAnchorNameValue::equals const):
(WebCore::CSSPinnedAnchorNameValue::addDerivedHash const):
* Source/WebCore/css/CSSPinnedAnchorNameValue.h: Added.
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValue.cpp:
(WebCore::CSSValue::visitDerived):
* Source/WebCore/css/CSSValue.h:
(WebCore::CSSValue::isPinnedAnchorNameValue const):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.cpp:
(WebCore::CSSPropertyParserHelpers::consumePinnedAnchorName):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.h:
* Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.cpp: Added.
(WebCore::Style::CSSValueCreation<PinnedAnchorName>::operator):
(WebCore::Style::Serialize<PinnedAnchorName>::operator):
(WebCore::Style::operator<<):
* Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.h: Added.
* Source/WebCore/style/values/anchor-position/StylePositionAnchor.cpp:
(WebCore::Style::CSSValueConversion<PositionAnchor>::operator):
* Source/WebCore/style/values/anchor-position/StylePositionAnchor.h:
(WebCore::Style::PositionAnchor::PositionAnchor):
(WebCore::Style::PositionAnchor::isName const):
(WebCore::Style::PositionAnchor::tryName const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to