[wpt-sync] Sync PR 49721 - [@scope] Expand :scope selectors for :has() cache
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 49721 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/49721
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[@scope] Expand :scope selectors for :has() cache
The :scope pseudo-class can refer to different elements depending on
context. This is similar to the '&' pseudo-class, but differs
in that :scope refers to a single element, not a specific selector list.This causes problems for the :has() cache, since it uses
the serialization of a selector as the key. In CL:5680906, this was
solved by expanding '&' in the cache-key, and this CL now does a similar
trick for :scope. Unlike '&', however, the :scope selector itself does
not know what it refers to; it must come from context. We can use
the pointer value of the scope node for this, since the :has() cache
only exists on the stack during style recalc.Fixed: 383343312
Change-Id: I08e5d3caf18831d614caed474081d32caa43bd64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090905
Reviewed-by: Byungwoo Lee \<blee@igalia.com>
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397188}
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 1 subtests
Status Summary
Firefox
OK
: 1
PASS
: 1
FAIL
: 1
Chrome
OK
: 1
FAIL
: 1
Safari
OK
: 1
PASS
: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-cascade/scope-overlapping-has.html [wpt.fyi]
- :has() with inner :scope works when scopes overlap:
FAIL
[GitHub
],PASS
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux1804-64-qr-debug
,Gecko-linux1804-64-qr-opt
,Gecko-windows11-32-2009-qr-debug
,Gecko-windows11-32-2009-qr-opt
,Gecko-windows11-64-2009-qr-debug
,Gecko-windows11-64-2009-qr-opt
] (Chrome:FAIL
, Safari:PASS
)
- :has() with inner :scope works when scopes overlap:
Comment 4•2 months ago
|
||
bugherder |
Description
•