Closed Bug 1818014 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38610 - [@scope] Support @scope(:host)

Categories

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

task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

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

[@scope] Support @scope(:host)

In CalculateActivations, we'd previously just call
Element.parentElement up the ancestor chain, therefore never
reach the host. Additionally, we did not propagate the original
SelectorCheckerContext.scope which is needed for :host to match.

This CL uses ParentOrShadowHostElement, and adds the concept of
"activation ceiling" to deal with the fact that we need to look at
one element above the current activation root when that root is a
ShadowRoot.

Note that :scope is supposed to be able to match "virtual" roots [1]
(like a ShadowRoot), but Blink does not support this in general.
This CL does not address this issue.

[1] https://github.com/w3c/csswg-drafts/issues/7261

Bug: 1280240
Change-Id: I2d0be103f4cd02ec576711b959e075a5118e694a
Reviewed-on: https://chromium-review.googlesource.com/4272396
WPT-Export-Revision: b26b0808b7a5e86aa0c5ffa0f4c4b20065ab3dfe

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19fd7854259e [wpt PR 38610] - [@scope] Support @scope (:host), a=testonly https://hg.mozilla.org/integration/autoland/rev/8124530fe764 [wpt PR 38610] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.