Closed Bug 1766621 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33813 - [@scope] Support invalidation

Categories

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

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[@scope] Support invalidation

This CL extends RuleFeatureSet to take into account scoped rules.

For example, for a rule:

@scope (.a) {
.b {}
}

We need to add invalidation features equivalent to :is(.a .b, .a.b).
It is not enough to add features for just .a .b, because scopes
established by @scope rules include the scoping root, hence any match
status change for the from-selectors could potentially need to invalidate
the affected element itself---not just the descendants.

It is also possible to use the :scope pseudo-class to refer to the scoping
root itself. Currently, we don't extract any features from :scope, and
will therefore end up with whole-subtree invalidation in those cases.
We can improve this in the future.

Bug: 1280240
Change-Id: I158ca1a947233fdcd4f06609126371800cd8e63b
Reviewed-on: https://chromium-review.googlesource.com/3582011
WPT-Export-Revision: e5432dcda3195fd1b8774cb629400732a2efed46

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/95029d073ac1
[wpt PR 33813] - [@scope] Support invalidation, a=testonly
https://hg.mozilla.org/integration/autoland/rev/9a95f2901ba8
[wpt PR 33813] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.