Skip to content

Commit

Permalink
un-inline getStackPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
josepharhar committed Apr 19, 2024
1 parent e7b2650 commit ab414b7
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions source
Expand Up @@ -85990,32 +85990,30 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<li><p>Let <var>invokerPopover</var> be the result of running <span>nearest inclusive target
popover for invoker</span> given <var>node</var>.</p></li>

<li>
<p>Let <var>getStackPosition</var> be an algorithm which performs the following steps given
an <span data-x="html elements">HTML element</span> <var>popover</var>:</p>
<li><p>If the result of running <span>get the popover stack position</span> given
<var>clickedPopover</var> is greater than the result of running <span>get the popover stack
position</span> given <var>invokerPopover</var>, then return <var>clickedPopover</var>.</p></li>

<ol>
<li><p>Let <var>hintList</var> be <var>popover</var>'s <span>node document</span>'s
<span>showing hint popover list</span>.</p></li>
<li><p>Return <var>invokerPopover</var>.</p></li>
</ol>

<li><p>Let <var>autoList</var> be <var>popover</var>'s <span>node document</span>'s
<span>showing auto popover list</span>.</p></li>
<p>To <dfn>get the popover stack position</dfn>, given an <span data-x="html elements">HTML
element</span> <var>popover</var>:</p>

<li><p>If <var>popover</var> is in <var>hintList</var>, then return the index of
<var>popover</var> in <var>hintList</var> + the size of <var>autoList</var> + 1.</p></li>
<ol>
<li><p>Let <var>hintList</var> be <var>popover</var>'s <span>node document</span>'s
<span>showing hint popover list</span>.</p></li>

<li><p>If <var>popover</var> is in <var>autoList</var>, then return the index of
<var>popover</var> in <var>autoList</var> + 1.</p></li>
<li><p>Let <var>autoList</var> be <var>popover</var>'s <span>node document</span>'s
<span>showing auto popover list</span>.</p></li>

<li><p>Return 0.</p></li>
</ol>
</li>
<li><p>If <var>popover</var> is in <var>hintList</var>, then return the index of
<var>popover</var> in <var>hintList</var> + the size of <var>autoList</var> + 1.</p></li>

<li><p>If the result of running <var>getStackPosition</var> given <var>clickedPopover</var> is
greater than the result of running <var>getStackPosition</var> given <var>invokerPopover</var>,
then return <var>clickedPopover</var>.</p></li>
<li><p>If <var>popover</var> is in <var>autoList</var>, then return the index of
<var>popover</var> in <var>autoList</var> + 1.</p></li>

<li><p>Return <var>invokerPopover</var>.</p></li>
<li><p>Return 0.</p></li>
</ol>

<p>To find the <dfn>nearest inclusive target popover for invoker</dfn> given a <code>Node</code>
Expand Down

0 comments on commit ab414b7

Please sign in to comment.