github web-platform-tests/wpt merge_pr_49398

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
9 months ago

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}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.