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

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-in-if.tentative-expected.txt
    M Source/WebCore/css/CSSRandomKeyParser.h
    M Source/WebCore/css/calc/CSSCalcRandomSharing.h
    M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/css/parser/CSSPropertyParserState.h
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h
    M Source/WebCore/style/StyleSubstitutionResolver.cpp

  Log Message:
  -----------
  [css-values-5] Include the custom property name in the random() caching key
https://bugs.webkit.org/show_bug.cgi?id=321598
rdar://184722866

Reviewed by Sam Weinig.

Currently all custom properties on the same element share the same random() 
value.

A property-scoped random key carried only a CSSPropertyID, which is 
CSSPropertyCustom for all of
them. Pair the name with the id, taking it from the declaration being parsed 
for random() and from
BuilderState for random-item(), which until now refused a property scope inside 
a custom property
rather than share incorrectly.

A key naming a function's result or local still cannot tell two functions apart.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-in-if.tentative-expected.txt:
* Source/WebCore/css/CSSRandomKeyParser.h:
* Source/WebCore/css/calc/CSSCalcRandomSharing.h:
(WebCore::CSSCalc::add):
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
(WebCore::CSSCalc::consumeRandom):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
* Source/WebCore/css/parser/CSSPropertyParserState.h:
* Source/WebCore/style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::customPropertyName const):
* Source/WebCore/style/StyleBuilderState.h:
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::randomItemBaseValue):
(WebCore::Style::randomKeyHasExplicitPropertyScope): Deleted.

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



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

Reply via email to