Closed Bug 1948290 Opened 10 days ago Closed 6 days ago

[wpt-sync] Sync PR 50713 - Don't escape UA shadow trees during selector checking

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

Don't escape UA shadow trees during selector checking

CL:6038294 made the assumption that selector matching happening
within shadow trees always has context.tree_scope set, but this
is not the case for UA shadow trees. The rules in the UA stylesheet
can implicitly reach into UA shadows (from the outside), which isn't
normally allowed. Long term, we should find a better way of handling
this (crbug.com/396459461), but for now we just make sure to stay
within the shadow.

Fixed: 396173457
Bug: 396459461
Change-Id: I96cee440600bfe01236a5e4e5f7a8ebf5ee0ad5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6268801
Reviewed-by: Steinar H Gunderson \<sesse@chromium.org>
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420468}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 7 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c4a27bf18454 [wpt PR 50713] - Don't escape UA shadow trees during selector checking, a=testonly
Status: NEW → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.