Closed Bug 1933737 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 49398 - Match argument of :host[-context]() in correct context

Categories

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

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

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

Match argument of :host-context in correct context

We currently make the host non-featureless via the
treat_shadow_host_as_normal_scope flag, and while that part is
correct behavior, we must also ensure that we're matching
in the right tree context, otherwise selectors like :host(:host)
incorrectly match.

If we set the correct tree_scope when matching the host pseudo's
argument, the host automatically becomes non-featureless, and we
don't need the flag anymore.

Firefox has the same bug, but Safari has the correct behavior.

Fixed: 380088825
Change-Id: Ic37f7614120ee9d7f643afb9a44c08eae62dae74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6037620
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388770}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 2 tests and 1 subtests

Status Summary

Firefox

OK : 2
PASS: 1
FAIL: 1

Chrome

OK : 2
FAIL: 2

Safari

OK : 2
PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df4e2494f1e6 [wpt PR 49398] - Match argument of :host[-context]() in correct context, a=testonly https://hg.mozilla.org/integration/autoland/rev/e1d51ec04f46 [wpt PR 49398] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.