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

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-parameter-types.tentative-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-parameter-types.tentative.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/local-if-substitution-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/local-if-substitution.html
    M Source/WebCore/css/query/ContainerQueryFeatures.cpp
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h
    M Source/WebCore/style/StyleSubstitutionResolver.cpp

  Log Message:
  -----------
  [css-mixins-1] Function body should inherit computed custom property values 
from the calling context
https://bugs.webkit.org/show_bug.cgi?id=321585
rdar://184701762

Reviewed by Alan Baradlay.

BuilderState::registeredProperty returned only the function's own 
registrations, so a document
@property registration was invisible inside a function body. A name the 
function does not
introduce arrives there by inheritance, carrying the calling element's computed 
value, so the
value was typed while the registration view said unregistered. var() reads the 
equivalent
token sequence either way and never noticed, but if(style()) compared a typed 
value against a
token stream and never matched.

Make the function's registrations shadow the document's rather than replace 
them, register the
body's local variables with the universal syntax so a local stays untyped, and 
resolve the
style() feature value with the same registrations as the property it is 
compared against.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-parameter-types.tentative-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-parameter-types.tentative.html:
Tentative because the spec wording does not address an untyped local directly.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/local-if-substitution-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/local-if-substitution.html:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:
(WebCore::CQ::Features::StyleFeatureSchema::localPropertyRegistry):
(WebCore::CQ::Features::StyleFeatureSchema::evaluateRange const):
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyCustomPropertyFromCallingContext):
* Source/WebCore/style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::registeredProperty const):
* Source/WebCore/style/StyleBuilderState.h:
(WebCore::Style::BuilderState::localPropertyRegistry const):
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::substituteDashedFunction):

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



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

Reply via email to