Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e3d530f9ce57bb49f0d4a3f0440b18717a158950
      
https://github.com/WebKit/WebKit/commit/e3d530f9ce57bb49f0d4a3f0440b18717a158950
  Author: Elika Etemad <[email protected]>
  Date:   2026-04-03 (Fri, 03 Apr 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-computed.tentative.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-serialize.tentative-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-serialize.tentative.html
    M Source/WebCore/css/CSSValueKeywords.in
    M Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp
    M Source/WebCore/css/calc/CSSCalcTree.h
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h
    M Source/WebCore/style/calc/StyleCalculationTree+Conversion.cpp

  Log Message:
  -----------
  Invert random() caching behavior to match spec
https://bugs.webkit.org/show_bug.cgi?id=311355
rdar://173943833

Reviewed by Sam Weinig.

The CSS spec for random() changed so that the `--foo` in `random(--foo)`
is matched globally to the document rather than scoped to the element.
This is the opposite of the behavior implemented in WebKit, so invert
the behavior and update the keyword to match.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-computed.tentative.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-serialize.tentative-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/random-serialize.tentative.html:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp:
(WebCore::CSSCalc::evaluate):
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
(WebCore::CSSCalc::consumeOptionalRandomSharingOptions):
(WebCore::CSSCalc::consumeOptionalRandomSharing):
(WebCore::CSSCalc::consumeRandom):
* Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp:
(WebCore::CSSCalc::serializeMathFunctionArguments):
* Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp:
(WebCore::CSSCalc::simplify):
* Source/WebCore/css/calc/CSSCalcTree.h:
* Source/WebCore/style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::lookupCSSRandomBaseValue const):
* Source/WebCore/style/StyleBuilderState.h:
* Source/WebCore/style/calc/StyleCalculationTree+Conversion.cpp:
(WebCore::Style::Calculation::toStyle):

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



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

Reply via email to