[wpt-sync] Sync PR 41511 - [@scope] Save MatchFlags in StyleScopeActivations
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 41511 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/41511
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[@scope] Save MatchFlags in StyleScopeActivations
ComputedStyles that match pseudo-state-dependent selectors get
a flag set for invalidation purposes. For example:p:hover { ... }
When matching this selector against 'p', the MatchResults will
contain MatchFlags with the kAffectedByHover flag set, regardless
of whether or not 'p' is currently hovered or not. (The flag
ultimately ends up on the ComputedStyle of 'p').Now consider this @scope rule which selects the same element:
@scope (p:hover) {
:scope { ... }
}Now we may or may not have a scoping root, depending on whether 'p'
is hovered or not. When matching this selector (:scope) against 'p',
we need to make sure that the kAffectedByHover is set in the returned
MatchFlags, even if 'p' is not currently hovered (in which case
we don't technically have a scoping root at 'p').This means that we have to store the MatchFlags that was produced for
for the scopes that were attempted activated.This is done in this CL by storing MatchFlags alongside the
activation vector, and propagating these flags during handling
of kScopeActivation. This may over-invalidate a little, since
we're propagating the flags at the start of the compound that
contains :scope (before actually evaluating :scope), but this is
probably OK.Fixed: 1451091
Change-Id: Ia48664381766ef44e6ade11457e905f068b6103e
Reviewed-on: https://chromium-review.googlesource.com/4790441
WPT-Export-Revision: e9217780378cf57080af6965c83ce2596865186b
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
Assignee | ||
Comment 3•1 year ago
|
||
Assignee | ||
Comment 4•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
Assignee | ||
Comment 6•1 year ago
|
||
Comment 8•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9d4118f7779b
https://hg.mozilla.org/mozilla-central/rev/828401e37244
Description
•