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

  Changed paths:
    M 
LayoutTests/fast/forms/appearance-base/internal-auto-base-function-expected.html
    M LayoutTests/fast/forms/appearance-base/internal-auto-base-function.html
    M Source/WebCore/css/CSSVariableReferenceValue.cpp
    M Source/WebCore/css/CSSVariableReferenceValue.h
    M Source/WebCore/css/ShorthandSerializer.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/css/parser/CSSVariableParser.cpp
    M Source/WebCore/html/HTMLMeterElement.cpp
    M Source/WebCore/html/HTMLProgressElement.cpp
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilder.h
    M Source/WebCore/style/StyleSubstitutionResolver.cpp
    M Source/WebCore/style/StyleSubstitutionResolver.h

  Log Message:
  -----------
  -internal-auto-base() should be an arbitrary substitution function
https://bugs.webkit.org/show_bug.cgi?id=310336
rdar://172987749

Reviewed by Tim Nguyen.

While internal it can use the machinery of 
https://drafts.csswg.org/css-values-5/#arbitrary-substitution

* 
LayoutTests/fast/forms/appearance-base/internal-auto-base-function-expected.html:
* LayoutTests/fast/forms/appearance-base/internal-auto-base-function.html:
* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::CSSVariableReferenceValue::cacheSimpleReference):

Add caching support for the simple common case of single -internal-auto-base().

* Source/WebCore/css/CSSVariableReferenceValue.h:
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::commonSerializationChecks):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::consumeStyleProperty):
(WebCore::consumeFunctionArgument): Deleted.
(WebCore::consumeInternalAutoBaseFunction): Deleted.

Remove the CSSValue based implementation.

* Source/WebCore/css/parser/CSSVariableParser.cpp:
(WebCore::classifyBlock):

Classify -internal-auto-base() as a arbitrary substitution function.

* Source/WebCore/html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::appendShadowTreeForAutoAppearance):
(WebCore::HTMLMeterElement::appendShadowTreeForBaseAppearance):
* Source/WebCore/html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::appendShadowTreeForAutoAppearance):
(WebCore::HTMLProgressElement::appendShadowTreeForBaseAppearance):

Use IsImportant::Yes instead of passing "!important" as part of the string.

* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::resolveInternalAutoBaseFunction): Deleted.
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::substituteInternalAutoBaseFunction 
const):

Implement substitution for -internal-auto-base().

(WebCore::Style::SubstitutionResolver::substituteTokenRange const):
(WebCore::Style::SubstitutionResolver::trySimpleSubstitution const):

Caching support.

(WebCore::Style::SubstitutionResolver::isBaseAppearance const):
(WebCore::Style::SubstitutionResolver::substituteAndParse const):
(WebCore::Style::SubstitutionResolver::substituteAndParseShorthand const):
* Source/WebCore/style/StyleSubstitutionResolver.h:

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



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

Reply via email to