[wpt-sync] Sync PR 38553 - [@scope] Set AffectedBy[Non]SubjectHas for @scope
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38553 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38553
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[@scope] Set AffectedBy[Non]SubjectHas for @scope
Invalidation of elements affected by scope selectors would not work
well for :has(), because we'd incorrectly set AffectedBySubjectHas
when we should have set AffectedByNonSubjectHas.In terms of invalidation, the following:
@scope (.a:has(.c)) {
.b { ... }
}should invalidate the same way as:
.a:has(.c) .b, .a:has(.c):is(.b)
Therefore we can fix this issue by setting in_rightmost_compound to
true or false depending on if we're matching the original subject
element or not. I.e. we're pretending to not be the rightmost compound
when matching non-subject elements.Bug: 1280240
Change-Id: I7205924adb83fac405650c095d3edb8f582a054b
Reviewed-on: https://chromium-review.googlesource.com/4261470
WPT-Export-Revision: 810cb192391f84e0bdc0a104d4a9210a6d048e01
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•1 year ago
|
Description
•