Skip to content

Commit

Permalink
Remove sentences about documents with no focusable area
Browse files Browse the repository at this point in the history
The PR whatwg#3647 removed "control group" concept, and most of them
were converted to Document. The "control group" could be empty
when e.g. no focusable element in a dialog element, but for a
document without any focusable element, its viewport is still
focusable.

Removes sentences talking about such a non-existent Document
condition.

Fixes whatwg#3675.
  • Loading branch information
Takayoshi Kochi authored and Alice Boxhall committed Jan 7, 2019
1 parent 3f07ec8 commit 9d2a815
Showing 1 changed file with 14 additions and 32 deletions.
46 changes: 14 additions & 32 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -72545,8 +72545,7 @@ END:VCARD</pre>

<p>One <span>focusable area</span> in each <code>Document</code> is designated the <dfn>focused
area of the document</dfn>. Which control is so designated changes over time, based on algorithms
in this specification. If a <code>Document</code> has no <span>focusable area</span>, it has no
<span data-x="focused area of the document">focused area</span>.</p>
in this specification.</p>
<!-- TODO(kochi): update "in a document tree" for shadow trees -->

<p><span data-x="focusable area">Focusable areas</span> in a <code>Document</code>
Expand Down Expand Up @@ -72969,16 +72968,11 @@ END:VCARD</pre>

<hr>

<p>When a <span>focusable area</span> is added to an empty <code>Document</code>, it must be
designated the <span>focused area of the document</span>.</p>

<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.), and the <code>Document</code> is still not empty: designate
the <code>Document</code>'s <span>viewport</span> to be the new <span>focused area of the
document</span>. If such a removal instead results in the <code>Document</code> being empty, then
there is simply no longer a <span>focused area of the document</span>.</p>
<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>

<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 @@ -73175,30 +73169,23 @@ END:VCARD</pre>
<var>target</var>, are as follows:</p>

<ol>

<li><p>Let <var>candidate</var> be the <code>Document</code> of the <span>top-level browsing
context</span>.</p></li>

<li><p>If <var>candidate</var> is <var>target</var>, return true.</p></li>

<li>
<p>While true:</p>

<p>If <var>candidate</var> is non-empty, and the
designated <span>focused area of the document</span> is a <span>browsing context
container</span> with a non-null <span>nested browsing context</span>, and the <span>active
document</span> of that <span>browsing context container</span>'s <span>nested browsing
context</span> is <var>target</var>, then return true.</p>

<p>Otherwise, if <var>candidate</var> is non-empty, and the
designated <span>focused area of the document</span> is a <span>browsing context
container</span> with a non-null <span>nested browsing context</span>, then let
<var>candidate</var> be the <span>active document</span> of that <span>browsing context
container</span>'s <span>nested browsing context</span>, and redo this step.</p>
<ol>
<li><p>If <var>candidate</var> is <var>target</var>, then return true.</p></li>

<p>Otherwise, return false.</p>
<li><p>If the <span data-x="focused area of the document">focused area</span> of
<var>candidate</var> is a <span>browsing context container</span> with a non-null <span>nested
browsing context</span>, then set <var>candidate</var> to the <span>active document</span> of
that <span>browsing context container</span>'s <span>nested browsing context</span>.</p></li>

<li><p>Otherwise, return false.</p></li>
</ol>
</li>

</ol>


Expand Down Expand Up @@ -73489,13 +73476,8 @@ END:VCARD</pre>
getter must run these steps:</p>

<ol>
<li><p>Let <var>candidate</var> be this <code>Document</code> object.</p></li>

<li><p>If <var>candidate</var> is not empty, then set <var>candidate</var> to the designated
<span>focused area of the document</span>.</p></li>

<li><p>If <var>candidate</var> is a <span>focusable area</span>, then set <var>candidate</var> to
<var>candidate</var>'s <span>DOM anchor</span>.</p></li>
<li><p>Let <var>candidate</var> be the <span>DOM anchor</span> of the <span data-x="focused area
of the document">focused area</span> of this <code>Document</code> object.</p></li>

<li><p>If <var>candidate</var> is not a <code>Document</code> object, then return
<var>candidate</var>.</p></li>
Expand Down

0 comments on commit 9d2a815

Please sign in to comment.