Closed Bug 1886441 Opened 4 months ago Closed 1 month ago

Implement Basic Matching for @scope

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, perf-alert)

Attachments

(7 files)

No caching, but rules inside @scope block should match for applicable elements in scope.

Uses the u32 hole left in ApplicableDeclarationBlock.

Assignee: nobody → dshin
Status: NEW → ASSIGNED

:scope gets implicitly added if not present, without contributing
specificity (See https://github.com/w3c/csswg-drafts/issues/10196).

& is replaced with scope-start selector, or :scope if it not
specified.

Depends on D207779

Keep track of implicit scopes for shadow DOM styled separately,
as cascade data for shadow DOM are shared.

Depends on D207780

Scoped style with implicit scope at the top of the shadow tree
matches the featureless shadow host.

Depends on D207781

Depends on D207782

I thought I already noted that, bug once this lands, it should be added to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features.

Sebastian

Keywords: dev-doc-needed
Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d0e8b9abbf4
Part 1 - Introduce scope proximity in cascade ordering. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/0aaa4fdb29e3
Part 2 - Infrastructure for checking scoped styles. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/fae17dbd22d2
Part 3 - Implement substitutions in `@scope`. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/ca2516594d77
Part 4 - Add support for implicit scope. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/0960c41d614f
Part 5 - `:scope` is featureless in scoped style, if it refers to the shadow host. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/bddfdb4b7b66
Part 6 - Implement scoped styles. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/e07b07b08958
Part 7 - Fast-reject with ancestor hashes for @scope. r=firefox-style-system-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46553 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Regressions: 1900042
Regressions: 1901222

(In reply to Pulsebot from comment #9)

Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d0e8b9abbf4
Part 1 - Introduce scope proximity in cascade ordering.
r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/0aaa4fdb29e3
Part 2 - Infrastructure for checking scoped styles.
r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/fae17dbd22d2
Part 3 - Implement substitutions in @scope.
r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/ca2516594d77
Part 4 - Add support for implicit scope.
r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/0960c41d614f
Part 5 - :scope is featureless in scoped style, if it refers to the shadow
host. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/bddfdb4b7b66
Part 6 - Implement scoped styles. r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/e07b07b08958
Part 7 - Fast-reject with ancestor hashes for @scope.
r=firefox-style-system-reviewers,emilio

Perfherder has detected a talos performance change from push e07b07b08958af7d59d7fbc50699d24cd6755c25.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
10% perf_reftest_singletons attr-selector-1.html linux1804-64-shippable-qr e10s fission stylo webrender 168.08 -> 152.03
8% perf_reftest_singletons attr-selector-1.html linux1804-64-shippable-qr e10s fission stylo webrender 166.95 -> 153.13

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 608

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert
Regressions: 1904228
You need to log in before you can comment on or make changes to this bug.