Skip to content

Commit bd29da3

Browse files
byung-woochromium-wpt-export-bot
authored andcommitted
Set all :has() in compound match in shadow tree if compound contains :host
To fix :has():host case, 'CSSSelectorParser' collects :has() pseudos in a compound during consuming simple selectors in 'ConsumeCompoundSelector()', and set the 'HasArgumentMatchInShadowTree' flag on the collected :has() pseudos if the parser found a :host pseudo in the compound. Bug: 378584792 Change-Id: I423ebf1128aed75f0b37024736a27f03de007607 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6365595 Commit-Queue: Byungwoo Lee <[email protected]> Reviewed-by: Anders Hartvoll Ruud <[email protected]> Cr-Commit-Position: refs/heads/main@{#1435333}
1 parent d9953b8 commit bd29da3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<title>:has(...):host internal descendent</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector">
5+
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
6+
<p>Test passes if there is a filled green square.</p>
7+
<div id="host">
8+
<template shadowrootmode="open">
9+
<style>
10+
div {
11+
width: 100px;
12+
height: 100px;
13+
background-color: red;
14+
}
15+
:has(section):host div {
16+
background-color: green;
17+
}
18+
</style>
19+
<span><div></div></span>
20+
<section></section>
21+
</template>
22+
</div>

0 commit comments

Comments
 (0)