Skip to content

Commit

Permalink
https://chromium-review.googlesource.com/c/chromium/src/+/3940344
Browse files Browse the repository at this point in the history
  • Loading branch information
josepharhar committed Oct 11, 2022
1 parent f44e15e commit fd2c976
Showing 1 changed file with 51 additions and 4 deletions.
55 changes: 51 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81589,6 +81589,30 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
</ol>
</li>

<li>
<p>Let <var>closeAllOpenPopUps</var> be an algorithm which performs the following steps:</p>

<ol>
<li><p>Let <var>popUp</var> be <var>document</var>'s <span>topmost pop-up auto or
hint</span>.</p></li>

<li>
<p>While <var>popUp</var> is not null:</p>

<ol>
<li><p>Run the <span>hide pop-up algorithm</span> given <var>popUp</var>,
<var>focusPreviousElement</var>, and <var>hideImmediately</var>.</p></li>

<li><p>Set <var>popUp</var> to <var>document</var>'s <span>topmost pop-up auto or
hint</span>.</p></li>
</ol>
</li>
</ol>
</li>

<li><p>If <var>endpoint</var> is null, then run <var>closeAllOpenPopUps</var> and
return.</p></li>

<li>
<p>If <var>endpoint</var>'s <code data-x="attr-popup">popup</code> attribute is in the <span
data-x="attr-popup-hint-state">hint state</span> and <var>hideUnrelated</var> is true, then:</p>
Expand Down Expand Up @@ -81631,18 +81655,41 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
</ol>
</li>

<li><p>Let <var>lastToHide</var> be null.</p></li>

<li><p>Let <var>foundEndpoint</var> be false.</p></li>

<li>
<p><span>While</span> <var>document</var>'s <span>auto pop-up stack</span> is not empty:</p>
<p>For each <var>popUp</var> in <var>document</var>'s <span>auto pop-up stack</span>:</p>

<ol>
<li><p>If <var>popUp</var> is <var>endpoint</var>, then set <var>foundEndpoint</var> to
true.</p></li>

<li><p>Otherwise, if <var>foundEndpoint</var> is true, then set <var>lastToHide</var> to
<var>popUp</var> and <span>break</span>.</p></li>
</ol>
</li>

<li><p>If <var>foundEndpoint</var> is false, then run <var>closeAllOpenPopUps</var> and
return.</p></li>

<li><p>If <var>lastToHide</var> is false and <var>document</var>'s <span>currently-showing hint
pop-up</span> is not null and <var>hintAncestor</var> is <var>endpoint</var>, then run the
<span>hide pop-up algorithm</span> on <var>document</var>'s <span>currently-showing hint
pop-up</span>.</p></li>

<li>
<p><span>While</span> <var>lastToHide</var> is not null and <var>lastToHide</var>'s
<span>pop-up visibility state</span> is <span data-x="pop-up-showing-state">showing</span> and
<var>document</var>'s <span>auto pop-up stack</span> is not empty:</p>

<ol>
<li><p>If <var>document</var>'s <span>auto pop-up stack</span>'s top element is
<var>hintAncestor</var>, then run the <span>hide pop-up algorithm</span> given
<var>document</var>'s <span>currently-showing hint pop-up</span>,
<var>focusPreviousElement</var> and <var>hideImmediately</var>.</p></li>

<li><p>If <var>document</var>'s <span>auto pop-up stack</span>'s top element is equal to
<var>endpoint</var>, then <span>break</span>.</p></li>

<li><p>Run the <span>hide pop-up algorithm</span> given <var>document</var>'s <span>auto
pop-up stack</span>'s top element, <var>focusPreviousElement</var>, and
<var>hideImmediately</var>.</p></li>
Expand Down

0 comments on commit fd2c976

Please sign in to comment.