Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dizhang168 committed Dec 18, 2024
1 parent 7fe3c3e commit 58bd0b0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion images/reading-flow-order-example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 24 additions & 17 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3821,7 +3821,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://drafts.csswg.org/css-display/#css-parent-box">CSS parent box</dfn></li>
<li><dfn data-x-href="https://drafts.csswg.org/css-display-4/#reading-flow-container">reading flow container</dfn></li>
<li><dfn data-x-href="https://drafts.csswg.org/css-display-4/#rendering-defined-sibling-reading-flow">rendering-defined sibling reading flow</dfn></li>
<li>The <dfn data-x-href="https://drafts.csswg.org/css-display-4/#propdef-reading-flow">'reading-flow'</dfn> property</li>
</ul>

<p>The following features are defined in <cite>CSS Flexible Box Layout</cite>:
Expand Down Expand Up @@ -79812,11 +79811,11 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
<li><p>If <var>element</var> is in the <span data-x="popover-showing-state">popover showing
state</span> and has a <span>popover invoker</span> set, then return <var>element</var>.</p></li>

<li><p>If <var>element</var> is a <span>reading-flow-ordered scope owner</span>, then return
<var>element</var>.</p></li>
<li><p>If <var>element</var>'s parent is a <span>reading-flow-ordered scope owner</span>, then
return <var>element</var>'s parent.</p></li>

<li><p>If <var>element</var> is a <span>reading flow item</span>, then return
<var>element</var>.</p></li>
<li><p>If <var>element</var>'s parent is a <span>reading flow item</span>, then return
<var>element</var>'s parent.</p></li>

<li><p>Return <var>element</var>'s parent's <span>associated focus navigation owner</span>.</p></li>
</ol>
Expand Down Expand Up @@ -80122,6 +80121,9 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
<li><p>Let <var>owner</var> be the <span>focus navigation scope owner</span> of
<var>scope</var>.</p></li>

<li><p><span>Assert</span>: <var>owner</var> is a <span>reading-flow-ordered scope
owner</span>.</p></li>

<li><p>Let <var>container</var> be the <span>reading flow container</span> associated with
<var>owner</var>.</p></li>

Expand All @@ -80132,11 +80134,13 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
<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 an element that is not the <var>container</var>:</p>
<p><span>While</span> <var>item</var> is not <var>container</var>:</p>
<ol>
<li>
<p>If <var>item</var>'s <span>focus navigation scope owner</span> is <var>owner</var>:</p>
<p>If <var>item</var>'s <span>associated focus navigation owner</span> is <var>owner</var>:</p>

<ol>
<li><p>If <var>output</var> does not <span data-x="list contains">contain</span>
Expand All @@ -80148,8 +80152,7 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {

<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>. This loop stops when the <span>inclusive ancestor</span> of
<var>item</var> within the <span>flat tree</span> is in the <var>scope</var>.</p>
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 @@ -80158,20 +80161,24 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
</li>
</ol>

<p class="note">The <span>rendering-defined sibling reading flow</span> includes <span
data-x="descendant">descendants</span> of the <span>reading flow container</span> that are not in
the <span>reading-flow-ordered focus navigation scope</span>. This step traverses the <span
data-x="inclusive ancestor">inclusive ancestors</span> of <var>item</var> within the <span>flat
tree</span> to find a potential element to include in the <var>reading flow order</var>.</p>
<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="inclusive ancestor">inclusive
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>
</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>focus navigation scope owner</span> is <var>owner</var> and
<var>output</var> does not <span data-x="list contains">contain</span> <var>child</var>, <span
data-x="list append">append</span> <var>child</var> to <var>output</var>.</p></li>
<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>,
<span data-x="list append">append</span> <var>child</var> to <var>output</var>.</p></li>
</ol>
</li>

Expand Down

0 comments on commit 58bd0b0

Please sign in to comment.