Closed Bug 2094930 Opened 11 days ago Closed 8 days ago

[wpt-sync] Sync PR 65019 - [css-mixins] Resolve @private variables in the cascade (4/N)

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 65019 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/65019
Details from upstream follow.

Stephanie Zhang <stephanie.zhang@microsoft.com> wrote:

[css-mixins] Resolve @private variables in the cascade (4/N)

This CL builds on the lexical bindings from https://crrev.com/c/8264191
and makes @private variables participate in style resolution.

Each @private block is added to the RuleSet as a rule with its parent's
selectors, so its declarations cascade like nested declarations. Matched
rules carry their CSSPrivateBindings and the matched properties cache
keys on them. While resolving a declaration, var() references and
declarations that name an in-scope private variable use its hygienic
name.

The value of a @private declaration can only refer to private variables
declared for the same style rule, not for an enclosing one.

Inherited private values are kept in a separate
InheritedPrivateVariables field on ComputedStyle, keeping them out of
computed style APIs without name filtering.

Low-Coverage-Reason: COVERAGE_UNDERREPORTED
Change-Id: Ice9d0208a37e6762a57a766953c0bf196528869b
Bug: 542651959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8292884
Reviewed-by: Kevin Babbitt \<kbabbitt@microsoft.com>
Auto-Submit: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Commit-Queue: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1741551}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 5 tests and 3 subtests

Status Summary

Firefox

OK : 5
PASS: 4
FAIL: 29

Chrome

OK : 5
PASS: 6
FAIL: 27

Safari

OK : 5
PASS: 5
FAIL: 28

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /css/css-mixins/private/css-private-invalidation.tentative.html [wpt.fyi]
    • Private CSSOM mutations invalidate the containing style rule: FAIL (Chrome: FAIL, Safari: FAIL)
    • Private declarations in separate blocks share the enclosing scope: FAIL (Chrome: FAIL, Safari: FAIL)
    • Private declarations respect media conditions and cascade layers: FAIL (Chrome: FAIL, Safari: FAIL)
    • Private declarations retain their container-query conditions: FAIL (Chrome: FAIL, Safari: FAIL)
    • Private blocks participate in declaration source order: FAIL (Chrome: FAIL, Safari: FAIL)
    • Changing an element-scoped @private variable invalidates descendants: FAIL (Chrome: FAIL, Safari: FAIL)
    • An eclipsing @private variable isolates descendants from outer value changes: FAIL (Chrome: FAIL, Safari: FAIL)
    • Private variables propagate through elements without variable references: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-mixins/private/css-private-lexical-scope.tentative.html [wpt.fyi]
    • A private variable resolves on its declaring element: FAIL (Chrome: FAIL, Safari: FAIL)
    • Resolved private variables inherit but remain lexically private: FAIL (Chrome: FAIL, Safari: FAIL)
    • A nested @private rule eclipses the outer binding: FAIL (Chrome: FAIL, Safari: FAIL)
    • A function body does not capture the caller private scope: FAIL (Chrome: PASS, Safari: PASS)
    • Private initializers can reference names from another block in the same scope: FAIL (Chrome: FAIL, Safari: FAIL)
    • A nested private initializer does not capture an enclosing private name: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ordinary assignments to private properties can reference enclosing private names: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-mixins/private/css-private-per-source-block.tentative.html [wpt.fyi]
    • Same-named @private variables in different source blocks are distinct: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-mixins/private/css-private-rule-types.tentative.html [wpt.fyi]
    • @private in a matching @media rule applies: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a non-matching @media rule still shadows an inherited name: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private inside @media screen uses the containing style rule selectors: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a matching @supports rule applies: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a non-matching @supports rule still shadows an inherited name: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a matching @container rule applies: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a non-matching @container rule still shadows an inherited name: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a layer loses to an unlayered @private: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a later layer wins: FAIL (Chrome: FAIL, Safari: FAIL)
    • @private in a style rule inside a matching @scope rule applies: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-mixins/private/private-shared-stylesheet.tentative.html [wpt.fyi]
    • Shared stylesheets and detached rules preserve authored private names: FAIL (Chrome: PASS, Safari: FAIL)
    • Private values remain isolated after a shared stylesheet is mutated: FAIL (Chrome: FAIL, Safari: FAIL)
    • A copied stylesheet cannot capture private values from the original sheet: FAIL (Chrome: FAIL, Safari: FAIL)
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.