Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dea374507ed3eab9cdeb7e85308ff2ec2091431f
      
https://github.com/WebKit/WebKit/commit/dea374507ed3eab9cdeb7e85308ff2ec2091431f
  Author: Joanne Pan <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative-expected.txt
    M Source/WebCore/css/CSSRandomKeyParser.cpp

  Log Message:
  -----------
  [css-values-5 random-item()] Parse <random-ua-ident> in a <random-key>
https://bugs.webkit.org/show_bug.cgi?id=321552
rdar://184659364

Reviewed by Antti Koivisto.

<random-ua-ident> is the third alternative in the property-scoping slot of
<random-cache-key> and was unimplemented, so an author writing one made the 
whole
declaration invalid at computed-value time.

It is a <custom-ident> that must start with `ua-`, and it spells out the 
property,
and optionally the index, that property-scoped and property-index-scoped derive
implicitly. `ua-height-1` therefore names the same key that 
property-index-scoped
builds while parsing `height`. The index in the ident is 1-based. An ident 
naming
no known property, or carrying an index of 0, is invalid, which invalidates the
whole <random-key>.

No index is taken from the caller when one of these is consumed, since the ident
already says which index it means, so an ident cannot shift the index of a later
`auto` or property-index-scoped in the same value.

This is the parse half of the bug. Serialization is still to do, and ยง 9.4.1 
also
spells an in-custom-function form, ua-FUNCTIONNAME-PROPERTY[-INDEX], which is 
not
handled: both names can contain hyphens, so splitting it is ambiguous. Asked 
about
in https://github.com/w3c/csswg-drafts/issues/14330

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative-expected.txt:
* Source/WebCore/css/CSSRandomKeyParser.cpp:
(WebCore::CSSPropertyParserHelpers::parseRandomUAIdent):
(WebCore::CSSPropertyParserHelpers::consumeUnresolvedRandomKey):

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



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

Reply via email to