Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5732b008eeaebce67a602a047966d8339b101c20
      
https://github.com/WebKit/WebKit/commit/5732b008eeaebce67a602a047966d8339b101c20
  Author: Antti Koivisto <[email protected]>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-conditionals-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-container-dynamic-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-container-self-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-shadow-container-expected.txt
    M Source/WebCore/style/CustomFunctionRegistry.cpp
    M Source/WebCore/style/CustomFunctionRegistry.h
    M Source/WebCore/style/ElementRuleCollector.cpp
    M Source/WebCore/style/RuleSet.h
    M Source/WebCore/style/RuleSetBuilder.cpp
    M Source/WebCore/style/RuleSetBuilder.h
    M Source/WebCore/style/StyleSubstitutionResolver.cpp

  Log Message:
  -----------
  [css-mixins-1] Evaluate container queries inside @function
https://bugs.webkit.org/show_bug.cgi?id=318668
rdar://181471414

Reviewed by Alan Baradlay.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-conditionals-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-container-dynamic-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-container-self-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-mixins/function-shadow-container-expected.txt:
* Source/WebCore/style/CustomFunctionRegistry.cpp:
(WebCore::Style::CustomFunction::CustomFunction):
(WebCore::Style::CustomFunctionRegistry::registerFunction):

Instead of smashing all StyleRuleFunctionDeclarations together eagerly during 
registration
we now pair them with their associated container queries so we can resolve them 
at
computed style time.

* Source/WebCore/style/CustomFunctionRegistry.h:
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRule):
(WebCore::Style::RuleSetBuilder::addMutatingRulesToResolver):
* Source/WebCore/style/RuleSetBuilder.h:
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::substituteDashedFunction):

Evaluate any container queries to determine which properties to apply in 
function body.

* Source/WebCore/style/RuleSet.h:
(WebCore::Style::RuleSet::containerQueryForIdentifier):
(WebCore::Style::RuleSet::containerQueryChainFor):
(WebCore::Style::RuleSet::containerQueriesFor):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::containerQueriesMatch):

Add helpers for resolving a container query identifier to its wrapping rule 
chain.
containerQueriesFor now returns the container rules rather than the queries.

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



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

Reply via email to