Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4837c2fac3c3e5de7278b9b7e2b651ba92f6bfd5
      
https://github.com/WebKit/WebKit/commit/4837c2fac3c3e5de7278b9b7e2b651ba92f6bfd5
  Author: Antti Koivisto <[email protected]>
  Date:   2026-10-08 (Thu, 08 Oct 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Content.cpp

  Log Message:
  -----------
  [css-values-5 attr()] Don't take legacy path in simple cases
https://bugs.webkit.org/show_bug.cgi?id=326777
rdar://problem/189485680

Reviewed by Alan Baradlay.

We were accidentally taking the legacy path in simple attr() cases even with 
the flag enabled.

consumeStyleProperty() tries the property grammar before checking for 
substitution functions.
The legacy content grammar accepts attr(<ident>) and attr(<ident>, <string>) so 
the common forms
never reached CSSSubstitutionParser. The legacy path looks the attribute up on 
the styled element
instead of the originating element, so ::part()::before and 
::details-content::after got the wrong value.

Reject attr() in the content grammar when the setting is enabled so it is 
always parsed as
an arbitrary substitution function.

* LayoutTests/TestExpectations:

imported/w3c/web-platform-tests/html/rendering/the-details-element/details-content-pseudo-attr.html
 now passes.

* Source/WebCore/css/parser/CSSPropertyParserConsumer+Content.cpp:
(WebCore::CSSPropertyParserHelpers::consumeUnresolvedContentLegacyAttrFunction):

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



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

Reply via email to