[wpt-sync] Sync PR 63229 - [css-mixins] Invalidate shadow DOM mixin consumers
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63229 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63229
Details from upstream follow.
Brandon Walderman <brwalder@microsoft.com> wrote:
[css-mixins] Invalidate shadow DOM mixin consumers
Changing a mixin in an outer tree scope only rebuilt RuleSets in that
scope. Descendant shadow styles that applied the inherited mixin could
remain flattened against the old definition.Propagate mixin changes along paths to dependent shadow scopes and
refresh intermediate scope identities so local mixins cannot hide an
inherited change. Preserve the existing identity when the effective
mixin map is unchanged to avoid rebuilding dependent RuleSets after
unrelated stylesheet updates.CSSOM mutation can modify a mixin in place without changing its rule
pointer. Track a monotonic revision for each stylesheet's extracted
mixins so every collection sharing a constructable stylesheet observes
the mutation independently.Add coverage for direct and nested shadow consumers, including a shared
constructable stylesheet adopted into sibling scopes. Also expose the
dependent-scope invalidation phase as a trace metric for the mixin
invalidation perf tests.Bug: 542873370
Change-Id: I0760313de69d51d02aa8cf00068b5cd8c7662d9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8450115
Reviewed-by: Kevin Babbitt \<kbabbitt@microsoft.com>
Commit-Queue: Brandon Walderman \<brwalder@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1710484}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=99900
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 25 tests and 2 subtests
Status Summary
Firefox
OK : 1[GitHub] 25[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[GitHub] 17[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 14[GitHub] 107[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
PASS: 12
FAIL: 3
Safari
OK : 1
PASS: 1
FAIL: 14
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-mixins/mixins/apply-nested-declarations.html [wpt.fyi]
- Can mix declarations into pseudo-elements:
FAIL
- Can mix declarations into pseudo-elements:
- /css/css-mixins/mixins/apply-within-mixin.html [wpt.fyi]
- CSS Mixins: Mixins depending on other mixins:
FAIL
- CSS Mixins: Mixins depending on other mixins:
- /css/css-mixins/mixins/contents-nested-declarations-fallback.html [wpt.fyi]
- Can mix declarations into pseudo-elements via @contents:
FAIL
- Can mix declarations into pseudo-elements via @contents:
- /css/css-mixins/mixins/contents-nested-declarations.html [wpt.fyi]
- Can mix declarations into pseudo-elements via @contents:
FAIL
- Can mix declarations into pseudo-elements via @contents:
- /css/css-mixins/mixins/contents-rule.html [wpt.fyi]
- Simple @contents with no fallback:
FAIL - Implicit semicolon after @contents, at end of block:
FAIL - Block in @apply overrides fallback:
FAIL - Fallback is used if @apply has no block:
FAIL - Empty @contents block is allowed, but does nothing:
FAIL - Empty @contents parameter does not crash:
FAIL - @apply with no block uses the @contents fallback:
FAIL
- Simple @contents with no fallback:
- /css/css-mixins/mixins/important.html [wpt.fyi]
- !important is valid in mixin result declarations:
FAIL
- !important is valid in mixin result declarations:
- /css/css-mixins/mixins/mixin-basic.html [wpt.fyi]
- CSS Mixins: Basic test:
FAIL
- CSS Mixins: Basic test:
- /css/css-mixins/mixins/mixin-conditionals.html [wpt.fyi]
- @media and @supports wrapping @result:
FAIL - @container wrapping @result:
FAIL - @media and @supports wrapping locals:
FAIL - @container wrapping locals:
FAIL - @container wrapping locals with different container is not cached:
FAIL - Bare locals overriding earlier conditional-wrapped locals:
FAIL - Nested @media and @container locals:
FAIL
- @media and @supports wrapping @result:
- /css/css-mixins/mixins/mixin-cross-stylesheet.html [wpt.fyi]
- CSS Mixins: Mixin from another stylesheet:
FAIL
- CSS Mixins: Mixin from another stylesheet:
- /css/css-mixins/mixins/mixin-cssom.tentative.html [wpt.fyi]
- serialization of @mixin:
FAIL - serialization of rule with @apply:
FAIL - serialization of @mixin with @contents:
FAIL - serialization of rule with @apply and contents argument:
FAIL - serialization of @mixin with parameters:
FAIL - serialization of @mixin defined without a parameter list:
FAIL - serialization of @apply with an empty contents block:
FAIL
- serialization of @mixin:
- /css/css-mixins/mixins/mixin-cycle.tentative.html [wpt.fyi]
- CSS Mixins: Cycles:
FAIL
- CSS Mixins: Cycles:
- /css/css-mixins/mixins/mixin-declarations.html [wpt.fyi]
- CSS Mixins: Declarations directly in mixin:
FAIL
- CSS Mixins: Declarations directly in mixin:
- /css/css-mixins/mixins/mixin-from-import-with-media-queries.html [wpt.fyi]
- CSS Mixins: @import with media queries:
FAIL
- CSS Mixins: @import with media queries:
- /css/css-mixins/mixins/mixin-from-import.html [wpt.fyi]
- CSS Mixins: Mixin from an imported stylesheet:
FAIL
- CSS Mixins: Mixin from an imported stylesheet:
- /css/css-mixins/mixins/mixin-invalidation.tentative.html [wpt.fyi]
- invalidation of @mixin from same stylesheet:
FAIL - invalidation of @mixin from different stylesheet:
FAIL - invalidation on adding @apply rule:
FAIL
- invalidation of @mixin from same stylesheet:
- /css/css-mixins/mixins/mixin-layers.html [wpt.fyi]
- Mixins work inside layers:
FAIL - Mixins work inside layers (anonymous):
FAIL - Mixins in stronger layer wins:
FAIL - Mixins in stronger layer wins (source order matching layer order):
FAIL
- Mixins work inside layers:
- /css/css-mixins/mixins/mixin-locals.html [wpt.fyi]
- Basic local support:
FAIL - Mixin is not cached if locals are different:
FAIL - Locals resolve against each other:
FAIL - Locals resolve against parameters:
FAIL - Parameters do not resolve against locals:
FAIL - Locals after @result are seen:
FAIL - !important invalidates a mixin local declaration:
FAIL - An invalid !important local does not define the variable:
FAIL
- Basic local support:
- /css/css-mixins/mixins/mixin-media-query-invalidation-2.html [wpt.fyi]
- CSS Mixins: Invalidates on negative media query becoming positive:
FAIL
- CSS Mixins: Invalidates on negative media query becoming positive:
- /css/css-mixins/mixins/mixin-media-query-invalidation.html [wpt.fyi]
- CSS Mixins: Media Queries and invalidation:
FAIL
- CSS Mixins: Media Queries and invalidation:
- /css/css-mixins/mixins/mixin-parameters.html [wpt.fyi]
- Mixins with invalid parameter lists are ignored:
FAIL - Basic mixin parameter passing:
FAIL - Mixins can be called multiple times with different parameters:
FAIL - Too few parameters and no default ignores mixin:
FAIL - Mixin argument parsing with arguments wrapped in {}:
FAIL - Defaults in mixin parameters:
FAIL - Fallback is ignored if argument is given:
FAIL - Fallback is used with no parameter and no default:
FAIL - var() can be accessed from attributes:
FAIL - var() resolves typed parameters:
FAIL - var() refuses illegal syntax parameters, but does not fail entire mixin:
FAIL - var() can access parameters from outer mixins:
FAIL - var() works inside if, in condition and true branch:
FAIL - var() works inside if, in condition and false branch:
FAIL - Mixin arguments are resolved at call site, not at use:
FAIL - var() supports default parameters:
FAIL - var() typed default parameters are resolved against the element:
FAIL
- Mixins with invalid parameter lists are ignored:
- /css/css-mixins/mixins/mixin-parsing.html [wpt.fyi]
- @layer (statement) is invalid in @mixin:
FAIL - @layer (block) is invalid in @mixin:
FAIL - @layer (anonymous) is invalid in @mixin:
FAIL - @layer (statement) within @result is valid in @mixin:
FAIL - @layer (block) within @result is valid in @mixin:
FAIL - @layer (anonymous) within @result is valid in @mixin:
FAIL - style rule is valid in @mixin:
FAIL - style rule (relative) is valid in @mixin:
FAIL - @media is valid in @mixin:
FAIL - @supports is valid in @mixin:
FAIL - @container is valid in @mixin:
FAIL - @starting-style is valid in @mixin:
FAIL - @scope is valid in @mixin:
FAIL - @scope (implicit) is valid in @mixin:
FAIL - @layer is dropped within @result (statement):
FAIL - @layer is dropped within @result (block):
FAIL - @layer is dropped within a nested style rule:
FAIL - @layer is dropped within @media:
FAIL - @layer is dropped within @supports:
FAIL - @layer is dropped within @container:
FAIL - @layer is dropped within @scope:
FAIL - @layer is dropped within a body-level @media:
FAIL - @layer is dropped within a body-level @supports:
FAIL - @layer is dropped within a body-level @container:
FAIL
- @layer (statement) is invalid in @mixin:
- /css/css-mixins/mixins/mixin-shadow-dom.html [wpt.fyi]
- Style in shadow DOM should have access to outside non-adopted mixins:
FAIL(Chrome:PASS, Safari:FAIL) - Style in shadow DOM should have access to inside mixins:
FAIL(Chrome:PASS, Safari:FAIL) - Style in shadow DOM should have access to mixins from adopted stylesheets:
FAIL(Chrome:PASS, Safari:FAIL) - Shared inline @apply contents use the correct mixin in each scope:
FAIL(Chrome:PASS, Safari:FAIL) - Shared inline @apply contents do not depend on scope creation order:
FAIL(Chrome:PASS, Safari:FAIL) - Shared constructed @apply sheet uses the correct mixin in each scope:
FAIL(Chrome:PASS, Safari:FAIL) - Shared constructed @apply sheet does not depend on scope creation order:
FAIL(Chrome:PASS, Safari:FAIL) - An @apply of an undefined mixin does not affect a scope that defines it:
FAIL(Chrome:PASS, Safari:FAIL) - An @apply of a defined mixin does not leak into a scope without it:
FAIL(Chrome:PASS, Safari:FAIL) - A local mixin overrides a document mixin with the same name:
FAIL(Chrome:PASS, Safari:FAIL) - Nested shadows use the nearest mixin along each tree branch:
FAIL(Chrome:PASS, Safari:FAIL) - Changing a document mixin invalidates dependent shadow styles:
FAIL(Chrome:FAIL, Safari:FAIL) - Changing a document mixin invalidates through a local mixin scope:
FAIL(Chrome:FAIL, Safari:FAIL) - A shared adopted mixin invalidates all dependent shadow branches:
FAIL(Chrome:FAIL, Safari:FAIL)
- Style in shadow DOM should have access to outside non-adopted mixins:
- /css/css-mixins/mixins/mixin-shared-across-documents.html [wpt.fyi]
- A shared stylesheet's @apply resolves to each document's own mixin:
FAIL
- A shared stylesheet's @apply resolves to each document's own mixin:
- /css/css-mixins/mixins/mixin-shared-sheet-no-mixins-in-scope.html [wpt.fyi]
- A scope with no mixins does not affect @apply in a scope that declares the mixin:
FAIL - An applied mixin does not affect @apply in a scope that has no mixins:
FAIL
- A scope with no mixins does not affect @apply in a scope that declares the mixin:
https://hg.mozilla.org/mozilla-central/rev/c22eb0a24897
https://hg.mozilla.org/mozilla-central/rev/9bfe86fb5640
Description
•