Skip to content

Commit

Permalink
Some clean-ups, clarification, and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Dec 20, 2024
1 parent 4e4a4c3 commit 1d6b374
Showing 1 changed file with 37 additions and 22 deletions.
59 changes: 37 additions & 22 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -80128,32 +80128,35 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
<li><p>Let <var>container</var> be the <span>reading flow container</span> associated with
<var>owner</var>.</p></li>

<li><p>Let <var>items</var> be the <span>rendering-defined sibling reading flow</span> of
<var>container</var>.</p></li>
<li><p>Let <var>items</var> be <var>container</var>'s <span>rendering-defined sibling reading
flow</span>.</p></li>

<li><p><span>Assert</span>: <var>items</var> is a <span>list</span> of <span
data-x="reading flow item">reading flow items</span>.</p></li>

<li>
<p><span data-x="list iterate">For each</span> <var>item</var> of <var>items</var>:</p>

<ol>
<li><p><span>Assert</span>: <var>item</var> is a <span>reading flow item</span>.</p></li>

<li>
<p><span>While</span> <var>item</var> is not <var>container</var>:</p>

<ol>
<li>
<p>If <var>item</var>'s <span>associated focus navigation owner</span> is <var>owner</var>:</p>
<p>If <var>scope</var> <span data-x="list contains">contains</span> <var>item</var>:</p>

<ol>
<li><p>If <var>output</var> does not <span data-x="list contains">contain</span>
<var>item</var>, <span data-x="list append">append</span> <var>item</var> to
<var>output</var>.</p></li>
<li>
<p>If <var>output</var> does not <span data-x="list contains">contain</span>
<var>item</var>, then <span data-x="list append">append</span> <var>item</var> to
<var>output</var>.</p>

<p class="note">Different <var>item</var>s can share the same <span>ancestor</span> in
<var>scope</var>; only add it to <var>output</var> the first time it is encountered.</p>
</li>

<li><p><span>Break</span>.</p></li>
</ol>

<p class="note">Different <var>item</var>s can have the same <span>inclusive
ancestor</span>. Only add to <var>output</var> if it is not already in the <span>reading
flow order</span>.</p>
</li>

<li><p>Set <var>item</var> to the parent element of <var>item</var> within the <span>flat
Expand All @@ -80162,22 +80165,34 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
</li>
</ol>

<p class="note">The <span>rendering-defined sibling reading flow</span> of <var>container</var>
includes <span data-x="descendant">descendants</span> of this <span>reading flow container</span>
that might not be in <var>scope</var>. For example, if a direct child of <var>container</var> has
CSS 'display: contents' and its nested children are included in <var>items</var>. Some elements in
<var>items</var> will have the <var>container</var> while others will have 'display: contents' child
as its <span>associated focus navigation owner</span>. This step traverses the <span
data-x="ancestor">ancestors</span> of <var>item</var> within the <span>flat tree</span> to make sure
we only include an element in the <span>reading flow order</span> if it is in <var>scope</var>.</p>
<div class="note">
<p><var>items</var> can include <span data-x="descendant">descendants</span> of
<var>container</var> that are not in <var>scope</var>. For example, when a direct child of
<var>container</var> has <code data-x="">display: contents</code>:</p>

<ul>
<li><p>The <code data-x="">display: contents</code> child will be in <var>scope</var>, but not
in <var>items</var>.</p></li>

<li><p>The <code data-x="">display: contents</code>'s own <span
data-x="concept-tree-child">children</span> will not be in <var>scope</var> (their
<span>associated focus navigation owner</span> is their parent), but can be in
<var>items</var>.</p></li>
</ul>

<p>This step includes in <var>output</var> the first <span>inclusive ancestor</span> of each
<var>item</var> that is also in <var>scope</var>. The result is that <var>output</var> is just
<var>scope</var>, but in reading flow order, as established by <var>items</var>.</p>
</div>
</li>

<li>
<p><span data-x="list iterate">For each</span> <var>child</var> of <var>owner</var> element's <span
data-x="concept-tree-child">children</span>, in <span>tree order</span>:</p>

<ol>
<li><p>If <var>child</var>'s <span>associated focus navigation owner</span> is <var>owner</var>
and <var>output</var> does not <span data-x="list contains">contain</span> <var>child</var>,
<li><p>If <var>scope</var> <span data-x="list contains">contains</span> <var>child</var> and
<var>output</var> does not <span data-x="list contains">contain</span> <var>child</var>, then
<span data-x="list append">append</span> <var>child</var> to <var>output</var>.</p></li>
</ol>
</li>
Expand Down

0 comments on commit 1d6b374

Please sign in to comment.