Skip to content

Commit 6bb5df0

Browse files
authored
Add "hide all popovers" algorithm for Fullscreen
This also fixes a bug where a null endpoint is passed to hide all popovers until, but hide all popovers until assumes endpoint is not null by looking for endpoint's node document. The bug is fixed by letting hide all popovers until take a document. And it also exports some definitions for Fullscreen. Corresponding Fullscreen PR: whatwg/fullscreen#204.
1 parent b739da3 commit 6bb5df0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

source

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59985,8 +59985,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
5998559985
and a boolean <var>isModal</var>, are as follows:</p>
5998659986

5998759987
<ol>
59988-
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given null,
59989-
false, and true.</p></li>
59988+
<li><p>Run <span>hide all popovers</span> given <var>subject</var>'s <span>node
59989+
document</span>.</p></li>
5999059990

5999159991
<li><p>Let <var>control</var> be null.</p></li>
5999259992

@@ -81743,14 +81743,16 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8174381743
must <span>reflect</span> the <span data-x="attr-popover">popover</span> attribute, <span>limited
8174481744
to only known values</span>.</p>
8174581745

81746-
<p>Every <span data-x="HTML elements">HTML element</span> has a <dfn>popover visibility
81746+
<p>Every <span data-x="HTML elements">HTML element</span> has a <dfn export>popover visibility
8174781747
state</dfn>, initially <span data-x="popover-hidden-state">hidden</span>, with these potential
8174881748
values:</p>
8174981749

8175081750
<ul>
81751-
<li><p><dfn data-x="popover-hidden-state">hidden</dfn></p></li>
81751+
<li><p><dfn export for="popover visibility state"
81752+
data-x="popover-hidden-state">hidden</dfn></p></li>
8175281753

81753-
<li><p><dfn data-x="popover-showing-state">showing</dfn></p></li>
81754+
<li><p><dfn export for="popover visibility state"
81755+
data-x="popover-showing-state">showing</dfn></p></li>
8175481756
</ul>
8175581757

8175681758
<p>The <code>Document</code> has an <dfn>auto popover list</dfn>, which is a <span>list</span>,
@@ -81876,6 +81878,9 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8187681878
<li><p>Let <var>ancestor</var> be the result of running the <span>topmost popover
8187781879
ancestor</span> algorithm given <var>element</var>.</p></li>
8187881880

81881+
<li><p>If <var>ancestor</var> is null, then set <var>ancestor</var> to
81882+
<var>document</var>.</p></li>
81883+
8187981884
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given
8188081885
<var>ancestor</var>, false, and true.</p></li>
8188181886

@@ -82094,7 +82099,7 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8209482099
</ol>
8209582100

8209682101
<p>To <dfn data-x="hide-all-popovers-until">hide all popovers until</dfn>, given an <span
82097-
data-x="HTML elements">HTML element</span> <var>endpoint</var>, a boolean
82102+
data-x="HTML elements">HTML element</span> or <code>Document</code> <var>endpoint</var>, a boolean
8209882103
<var>focusPreviousElement</var>, and a boolean <var>fireEvents</var>:</p>
8209982104

8210082105
<ol>
@@ -82161,6 +82166,10 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8216182166
happens. For example, during light-dismiss of a popover, this algorithm ensures that we close only
8216282167
the popovers that aren't related to the node clicked by the user.</p>
8216382168

82169+
<p>To <dfn export>hide all popovers</dfn>, given a <code>Document</code> <var>document</var>, run
82170+
<span data-x="hide-all-popovers-until">hide all popovers until</span> given <var>document</var>,
82171+
false, and false.</p>
82172+
8216482173
<p>To find the <dfn>topmost popover ancestor</dfn>, given a <code>Node</code>
8216582174
<var>newPopover</var>, perform the following steps. They return an <span data-x="HTML
8216682175
elements">HTML element</span> or null.</p>
@@ -82558,6 +82567,9 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8255882567

8255982568
<li><p>Set <var>document</var>'s <span>popover pointerdown target</span> to null.</p></li>
8256082569

82570+
<li><p>If <var>ancestor</var> is null, then set <var>ancestor</var> to
82571+
<var>document</var>.</p></li>
82572+
8256182573
<li><p>If <var>sameTarget</var> is true, then run <span data-x="hide-all-popovers-until">hide
8256282574
all popovers until</span> given <var>ancestor</var>, false, and true.</p></li>
8256382575
</ol>

0 commit comments

Comments
 (0)