[wpt-sync] Sync PR 43849 - [@scope] Produce kScopeActivation relations for scoped nesting
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 43849 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/43849
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[@scope] Produce kScopeActivation relations for scoped nesting
When parsing style rules that are immediate children of an @scope rule,
any compound selector which contains either :scope or '&' is prepended
with RelationType::kScopeActivation. This relation is what triggers
the "figure out if we're indeed in scope, and what the scoping root is"-
behavior during SelectorChecker, and without the kScopeActivation, we'll
just fall back to the regular behavior for :scope (i.e. it matches :root
in the normal cases).This CL fixes a bug which caused missing kScopeActivations for nested
style rules within @scope, e.g.:@scope (a) {
b {
/* :scope needs to refer to 'a' here */
:scope:not(&) { ... }
}
}This doesn't work, because we're basing the kScopeActivation emit/no-emit
decision on the nesting type of the immediate parent rule, which in this
case is CSSNestingType::kNesting. We need to know whether any ancestor
rule is an @scope rule, and so we propagate a flag for this, and base
the emit/no-emit decision on this instead.Fixed: 1512217
Change-Id: I35d28489dd8255badd2e9a9c911fda3e2541bb52
Reviewed-on: https://chromium-review.googlesource.com/5164291
WPT-Export-Revision: 316714ef7aa9947897212778429b4f76d7a01995
Assignee | ||
Comment 1•9 months ago
|
||
PR 43849 applied with additional changes from upstream: bc19e8e7679b438b658e2ee81c916740b2b1111d
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 2•9 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=b5e10824b865c83d0d97f05fa7d45c6432e98dba
Assignee | ||
Comment 3•8 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 17 subtests
Status Summary
Firefox
OK
: 1
PASS
: 1
FAIL
: 16
Chrome
OK
: 1
PASS
: 13
FAIL
: 4
Safari
OK
: 1
PASS
: 11
FAIL
: 6
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /css/css-cascade/scope-nesting.html [wpt.fyi]
- Relative selectors in <scope-end>:
FAIL
linked bug:Bug 1873611 - Nesting-selector in the scope's <stylesheet>:
FAIL
linked bug:Bug 1873611 - Nesting-selector within :scope rule:
FAIL
linked bug:Bug 1873611 - Nesting-selector within :scope rule (double nested):
FAIL
linked bug:Bug 1873611 - @scope nested within style rule:
FAIL
linked bug:Bug 1873611 - Parent pseudo class within scope-start:
FAIL
linked bug:Bug 1873611 - Scoped nested group rule:
FAIL
- Relative selectors in <scope-end>:
New Tests That Don't Pass
- /css/css-cascade/scope-nesting.html [wpt.fyi]
- Implicit :scope in <scope-end>:
FAIL
(Chrome:PASS
, Safari:FAIL
) - Relative selectors in <scope-end>:
FAIL
(Chrome:PASS
, Safari:PASS
) - Nesting-selector in the scope's <stylesheet>:
FAIL
(Chrome:PASS
, Safari:PASS
) - Nesting-selector within :scope rule:
FAIL
(Chrome:PASS
, Safari:PASS
) - Nesting-selector within :scope rule (double nested):
FAIL
(Chrome:PASS
, Safari:PASS
) - @scope nested within style rule:
FAIL
(Chrome:PASS
, Safari:PASS
) - Parent pseudo class within scope-start:
FAIL
(Chrome:PASS
, Safari:PASS
) - Parent pseudo class within scope-end:
FAIL
(Chrome:PASS
, Safari:FAIL
) - Parent pseudo class within body of nested @scope:
FAIL
(Chrome:PASS
, Safari:FAIL
) - Implicit rule within nested @scope :
FAIL
(Chrome:PASS
, Safari:FAIL
) - Implicit rule within nested @scope (proximity):
FAIL
(Chrome:PASS
, Safari:FAIL
) - Nested :scope inside an :is:
FAIL
(Chrome:FAIL
, Safari:PASS
) - :scope within nested and scoped rule:
FAIL
(Chrome:FAIL
, Safari:PASS
) - :scope within nested and scoped rule (implied &):
FAIL
(Chrome:FAIL
, Safari:PASS
) - :scope within nested and scoped rule (relative):
FAIL
(Chrome:FAIL
, Safari:PASS
) - Scoped nested group rule:
FAIL
(Chrome:PASS
, Safari:PASS
)
- Implicit :scope in <scope-end>:
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/afd101f7f29e [wpt PR 43849] - [@scope] Produce kScopeActivation relations for scoped nesting, a=testonly https://hg.mozilla.org/integration/autoland/rev/4e0e2d88da8e [wpt PR 43849] - Update wpt metadata, a=testonly
Comment 5•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/afd101f7f29e
https://hg.mozilla.org/mozilla-central/rev/4e0e2d88da8e
Description
•