Skip to content

Commit

Permalink
Add shadow host considerations for the :focus selector
Browse files Browse the repository at this point in the history
Part of #2013. Note that the delegates focus flag is not consulted.

Tests: web-platform-tests/wpt#17493
  • Loading branch information
rakina authored and domenic committed Sep 24, 2019
1 parent e38aa41 commit 500f4fe
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3175,7 +3175,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://dom.spec.whatwg.org/#concept-node-document">node document</dfn> concept</li>
<li><dfn data-x="concept-document-type" data-x-href="https://dom.spec.whatwg.org/#concept-document-type">document type</dfn> concept</li>
<li><dfn data-x="concept-DocumentFragment-host" data-x-href="https://dom.spec.whatwg.org/#concept-documentfragment-host">host</dfn> concept</li>
<li><dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept</li>

<li><dfn data-x-href="https://dom.spec.whatwg.org/#interface-htmlcollection"><code>HTMLCollection</code></dfn> interface</li>
<li><dfn data-x="dom-HTMLCollection-length" data-x-href="https://dom.spec.whatwg.org/#dom-htmlcollection-length"><code>HTMLCollection.length</code></dfn> attribute</li>
Expand Down Expand Up @@ -69014,11 +69014,23 @@ Demos:
<dt><dfn data-noexport=""><code data-x="selector-focus">:focus</code></dfn></dt>
<dd>
<p>For the purposes of the CSS <code data-x="selector-focus">:focus</code>
<span>pseudo-class</span>, an <dfn>element has the focus</dfn> when its <span>top-level browsing
context</span> has the system focus, it is not itself a <span>browsing context container</span>,
and it is one of the elements listed in the <span>focus chain</span> of the <span
data-x="currently focused area of a top-level browsing context">currently focused area of the
top-level browsing context</span>.</p>
<span>pseudo-class</span>, an <dfn>element has the focus</dfn> when:</p>

<ul>
<li><p>its <span>top-level browsing context</span> has the system focus;</p></li>
<li><p>it is not itself a <span>browsing context container</span>; and</p></li>
<li>
<p>at least one of the following is true:</p>
<ul>
<li><p>it is one of the elements listed in the <span>focus chain</span> of the <span
data-x="currently focused area of a top-level browsing context">currently focused area of
the top-level browsing context</span>, or</p></li>
<li><p>its <span data-x="concept-element-shadow-root">shadow root</span>
<var>shadowRoot</var> is not null and <var>shadowRoot</var> is the <span>root</span> of at
least one element that <span data-x="element has the focus">has the focus</span>.</p></li>
</ul>
</li>
</ul>
</dd>

<dt><dfn data-noexport=""><code data-x="selector-target">:target</code></dfn></dt>
Expand Down Expand Up @@ -124681,6 +124693,7 @@ INSERT INTERFACES HERE
Rahul Purohit,
Raj Doshi,
Rajas Moonka,
Rakina Zata Amni,
Ralf Stoltze,
Ralph Giles,
Raphael Champeimont,
Expand Down

0 comments on commit 500f4fe

Please sign in to comment.