Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f2d4edab4efffff8b312388c7f52dc86279f260f
      
https://github.com/WebKit/WebKit/commit/f2d4edab4efffff8b312388c7f52dc86279f260f
  Author: Antti Koivisto <[email protected]>
  Date:   2026-03-20 (Fri, 20 Mar 2026)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSPendingSubstitutionValue.cpp
    M Source/WebCore/css/CSSPendingSubstitutionValue.h
    M Source/WebCore/css/CSSVariableReferenceValue.cpp
    M Source/WebCore/css/CSSVariableReferenceValue.h
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilder.h
    A Source/WebCore/style/StyleSubstitutionResolver.cpp
    A Source/WebCore/style/StyleSubstitutionResolver.h
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/values/filter-effects/StyleAppleColorFilter.h

  Log Message:
  -----------
  [css-values-5 attr()] Factor arbitrary substitution function resolution to a 
type
https://bugs.webkit.org/show_bug.cgi?id=310292
rdar://172928726

Reviewed by Alan Baradlay.

Add new SubstitutionResolver and match the terminology of

https://drafts.csswg.org/css-values-5/#arbitrary-substitution

better.

Factor the substitution functions out of 
CSSVariableReferenceValue/CSSPendingSubstitutionValue.
The cache fields remain in these types.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSPendingSubstitutionValue.cpp:
(WebCore::CSSPendingSubstitutionValue::create):
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
(WebCore::CSSPendingSubstitutionValue::resolveValue const): Deleted.
* Source/WebCore/css/CSSPendingSubstitutionValue.h:
* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::CSSVariableReferenceValue::resolveVariableFallback const): Deleted.
(WebCore::propertyValueForVariableName): Deleted.
(WebCore::CSSVariableReferenceValue::resolveVariableReference const): Deleted.
(WebCore::CSSVariableReferenceValue::evaluateDashedFunction const): Deleted.
(WebCore::CSSVariableReferenceValue::resolveTokenRange const): Deleted.
(WebCore::CSSVariableReferenceValue::tryResolveSimpleReference const): Deleted.
(WebCore::CSSVariableReferenceValue::resolveVariableReferences const): Deleted.
(WebCore::CSSVariableReferenceValue::resolveSingleValue const): Deleted.
* Source/WebCore/css/CSSVariableReferenceValue.h:
(WebCore::CSSVariableReferenceValue::resolveAndCacheValue const): Deleted.
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::resolveSubstitutionFunctions):
(WebCore::Style::Builder::resolveCustomPropertyValue):
(WebCore::Style::Builder::resolveVariableReferences): Deleted.
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleSubstitutionResolver.cpp: Added.
(WebCore::Style::SubstitutionResolver::SubstitutionResolver):
(WebCore::Style::SubstitutionResolver::substituteVariableFallback const):
(WebCore::Style::SubstitutionResolver::propertyValueForVariableName const):
(WebCore::Style::SubstitutionResolver::substituteVariableFunction const):
(WebCore::Style::SubstitutionResolver::substituteDashedFunction const):
(WebCore::Style::SubstitutionResolver::substituteTokenRange const):
(WebCore::Style::SubstitutionResolver::trySimpleSubstitution const):
(WebCore::Style::SubstitutionResolver::substitute const):
(WebCore::Style::SubstitutionResolver::substituteAndParse const):
(WebCore::Style::SubstitutionResolver::substituteAndParseShorthand const):
* Source/WebCore/style/StyleSubstitutionResolver.h: Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
* Source/WebCore/style/values/filter-effects/StyleAppleColorFilter.h:

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



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

Reply via email to