Skip to content

Commit

Permalink
Remove the concept of "expressly inert"
Browse files Browse the repository at this point in the history
It seems to be a remnant of control groups, which were removed in 90a60b2. All uses are replaced with the concept of "inert".

Also clean up "When a key event is to be routed in a top-level browsing context", which seems to have remnants of when control groups allowed inert elements inside an inert dialog to be focusable.

Fixes whatwg#7564.
  • Loading branch information
Loirooriol authored and mfreed7 committed Jun 3, 2022
1 parent 3e6ad5e commit 617b383
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -74907,10 +74907,6 @@ END:VCARD</pre>
<span>nested browsing context</span>'s <span>active document</span>, and all nodes in that
<code>Document</code>, must be marked as <span>inert</span>.</p>

<p><span id="expressly-inert-control"></span><span id="expressly-inert-dialog"></span>An element
is <dfn>expressly inert</dfn> if it is <span>inert</span> and its <span>node document</span> is
not <span>inert</span>.</p>

<p>A <code>Document</code> <var>document</var> is <dfn>blocked by a modal dialog</dfn>
<var>subject</var> if <var>subject</var> is the topmost <code>dialog</code> element in
<var>document</var>'s <span>top layer</span>. While <var>document</var> is so blocked, every node
Expand Down Expand Up @@ -75248,7 +75244,7 @@ END:VCARD</pre>

<li>the element is not <span data-x="concept-element-disabled">actually disabled</span>;</li>

<li>the element is not <span>expressly inert</span>;</li>
<li>the element is not <span>inert</span>;</li>

<li>the element is either <span>being rendered</span> or <span>being used as relevant canvas
fallback content</span>.</li>
Expand All @@ -75265,8 +75261,7 @@ END:VCARD</pre>
<tr>
<th class="data-header" headers="th-fa-area" id="td-fa-2">
The shapes of <code>area</code> elements in an <span>image map</span> associated with an
<code>img</code> element that is <span>being rendered</span> and is not <span>expressly
inert</span>.
<code>img</code> element that is <span>being rendered</span> and is not <span>inert</span>.
<td headers="td-fa-2 th-fa-dom-rep">
The <code>img</code> element.
<tr>
Expand All @@ -75286,8 +75281,7 @@ END:VCARD</pre>
<tr>
<th class="data-header" headers="th-fa-area" id="td-fa-3">
The user-agent provided subwidgets of elements that are <span>being rendered</span> and are not
<span data-x="concept-element-disabled">actually disabled</span> or <span>expressly
inert</span>.
<span data-x="concept-element-disabled">actually disabled</span> or <span>inert</span>.
<td headers="td-fa-3 th-fa-dom-rep">
The element for which the <span>focusable area</span> is a subwidget.
<tr>
Expand All @@ -75302,9 +75296,9 @@ END:VCARD</pre>
<tr>
<th class="data-header" headers="th-fa-area" id="td-fa-4">
The scrollable regions of elements that are <span>being rendered</span> and are not
<span>expressly inert</span>. <!-- the being rendered part is kinda
redundant, a scrollable region is a box generated for the element so by definition if the
element has a scrollable region it is being rendered -->
<span>inert</span>. <!-- the being rendered part is kinda redundant, a scrollable region is a
box generated for the element so by definition if the element has a scrollable region it is
being rendered -->
<td headers="td-fa-4 th-fa-dom-rep">
The element for which the box that the scrollable region scrolls was created.
<tr>
Expand Down Expand Up @@ -76037,8 +76031,8 @@ END:VCARD</pre>
<p><dfn>Focus fixup rule</dfn>: When the designated <span data-x="focused area of the
document">focused area of the document</span> is removed from that <code>Document</code> in some
way (e.g. it stops being a <span>focusable area</span>, it is removed from the DOM, it becomes
<span>expressly inert</span>, etc.), designate the <code>Document</code>'s <span>viewport</span>
to be the new <span>focused area of the document</span>.</p>
<span>inert</span>, etc.), designate the <code>Document</code>'s <span>viewport</span> to be the
new <span>focused area of the document</span>.</p>

<p class="example">For example, this might happen because an element is removed from its
<code>Document</code>, or has a <code data-x="attr-hidden">hidden</code> attribute added. It might
Expand Down Expand Up @@ -76171,11 +76165,10 @@ END:VCARD</pre>

<li><p>Assert: <var>target area</var> is not null, since key events are only routed to <span
data-x="top-level browsing context">top-level browsing contexts</span> that have <span
data-x="tlbc system focus">system focus</span>.</p></li>
data-x="tlbc system focus">system focus</span>. Therefore, <var>target area</var> is a
<span>focusable area</span>.</p></li>

<li><p>If <var>target area</var> is a <span>focusable area</span>, let <var>target
node</var> be <var>target area</var>'s <span>DOM anchor</span>. Otherwise, <var>target area</var> is a <code>dialog</code>; let <var>target node</var> be
<var>target area</var>.</p></li>
<li><p>Let <var>target node</var> be <var>target area</var>'s <span>DOM anchor</span>.</p></li>

<li>
<p>If <var>target node</var> is a <code>Document</code> that has a <span data-x="the
Expand All @@ -76189,13 +76182,6 @@ END:VCARD</pre>

<li>
<p>If <var>target node</var> is not <span>inert</span>, then:</p>

<p class="note">It is possible for the <span>currently focused area of a top-level browsing
context</span> to be <span>inert</span>, for example if a <span
data-x="dom-dialog-showModal">modal dialog is shown</span>, and then that <code>dialog</code>
element is made <span>inert</span>. It is likely to be the result of a logic error in the
application, though.</p>

<ol>
<li><p>Let <var>canHandle</var> be the result of <span
data-x="concept-event-dispatch">dispatching</span> the key event at <var>target
Expand Down Expand Up @@ -128201,6 +128187,7 @@ INSERT INTERFACES HERE
Olli Pettay,
Ondřej Žára, <!-- ondras on GitHub -->
Ori Avtalion,
Oriol Brufau,
oSand, <!-- from reddit -->
Pablo Flouret,
Patrick Dark,
Expand Down

0 comments on commit 617b383

Please sign in to comment.