From 3033334dcf8da5872ef49c89c1140c0d26fec6ce Mon Sep 17 00:00:00 2001
From: Joey Arhar Does not close other popovers; does not light
dismiss.
+
+
@@ -82792,7 +82799,10 @@ dictionary DragEventInit : MouseEventInit {
data-x="popover-showing-state">showing
+ hint
hint
+ Closes other hint popovers when opened; has light
+ dismiss; only one can be open at a time.
+
The Document
has a popover pointerdown target, which is an Every Document
has a popover pointerdown target, which is an HTML element or null, initially null.
Every Document
has a showing hint popover, which is an HTML element or null, initially null.
Every HTML element has a popover invoker, which @@ -82897,7 +82907,8 @@ dictionary DragEventInit : MouseEventInit {
If element's popover
attribute is in the auto state, then:
Let originalType be the value of element's If ancestor is null, then set ancestor to
document. Run hide all popovers until given
- ancestor, false, and not nestedShow. If element's If document's showing hint popover is not null, then run the
+ hide popover algorithm given document's showing hint
+ popover, false, not nestedShow, and throwExceptions. If ancestor is not document, then run hide all popovers until given ancestor,
+ false, and not nestedShow. Otherwise, run hide all popovers until
+ given ancestor, false, and not nestedShow. If originalType is not equal to the value of element's DragEventInit : MouseEventInit {
popover
attribute is in the
+ hint state, then:
+
+ popover
attribute, then throw a
@@ -82938,6 +82964,10 @@ dictionary DragEventInit : MouseEventInit {
If element's popover
attribute is in the
+ hint state, then set document's
+ showing hint popover to element.
Set element's previously focused element to null.
Let originallyFocusedElement be document's focused area of the
@@ -83038,11 +83068,12 @@ dictionary DragEventInit : MouseEventInit {
If element's popover
attribute is in the auto state, then:
Run hide all popovers until given - element, focusPreviousElement, and fireEvents.
If the result of running check popover validity given element, @@ -83086,6 +83117,8 @@ dictionary DragEventInit : MouseEventInit {
Otherwise, remove an element from the top layer immediately given element.
Set document's showing hint popover to null.
Set element's popover visibility state to hidden.
To hide all popovers until, given an HTML element or Document
endpoint, a boolean
- focusPreviousElement, and a boolean fireEvents:
Let document be endpoint's node document.
Assert: endpoint's popover
- attribute is in the auto state.
Let repeatingHide be false.
Perform the following steps at least once:
+If endpoint's popover
attribute is in the
+ hint state, then:
Let lastToHide be null.
Let foundEndpoint be false.
For each popover in document's auto popover list:
+If hideUnrelatedPopovers is true, then:
If popover is endpoint, then set foundEndpoint to - true.
Otherwise, if foundEndpoint is true, then set lastToHide to - popover and break.
If document's showing hint popover is not null and + document's showing hint popover is not endpoint, then run + the hide popover algorithm given focusPreviousElement, + fireEvents, and throwExceptions.
While document's auto popover list is not empty, run the + hide popover algorithm given focusPreviousElement, + fireEvents, and throwExceptions.
If foundEndpoint is false, then run closeAllOpenPopovers and - return.
Otherwise:
+ +Let repeatingHide be false.
While lastToHide is not null and lastToHide's popover - visibility state is showing and - document's auto popover list is not empty:
+Perform the following steps at least once:
Run the hide popover algorithm given document's auto - popover list's last element, focusPreviousElement, fireEvents, - and false.
Let lastToHide be null.
Set repeatingHide to true if document's auto popover - list contains endpoint and document's auto popover - list's last element is not endpoint, otherwise false.
Let foundEndpoint be false.
If repeatingHide is true, then set fireEvents to false.
For each popover in document's auto popover list:
-and keep performing them while repeatingHide is true.
+If popover is endpoint, then set foundEndpoint to + true.
Otherwise, if foundEndpoint is true, then set lastToHide to + popover and break.
If foundEndpoint is false, then run closeAllOpenPopovers and + return.
While lastToHide is not null and lastToHide's popover + visibility state is showing and + document's auto popover list is not empty:
+ +Run the hide popover algorithm given document's auto + popover list's last element, focusPreviousElement, fireEvents, + and false.
Set repeatingHide to true if document's auto popover + list contains endpoint and document's auto popover + list's last element is not endpoint, otherwise false.
If repeatingHide is true, then set fireEvents to false.
and keep performing them while repeatingHide is true.
+ + @@ -83231,7 +83293,7 @@ dictionary DragEventInit : MouseEventInit {To hide all popovers, given a Document
document, run
hide all popovers until given document,
- false, and false.
To find the topmost popover ancestor, given a Node
newPopover, and an HTML element or null
@@ -83659,7 +83721,7 @@ dictionary DragEventInit : MouseEventInit {
document.
If sameTarget is true, then run hide - all popovers until given ancestor, false, and true.
While document's auto popover list is not empty, run the - hide popover algorithm given focusPreviousElement, +
While document's showing auto popover list is not empty, run + the hide popover algorithm given focusPreviousElement, fireEvents, and throwExceptions.
Let foundEndpoint be false.
For each popover in document's auto popover list:
+For each popover in document's showing auto popover + list:
If popover is endpoint, then set foundEndpoint to @@ -84570,18 +84571,18 @@ dictionary DragEventInit : MouseEventInit {
While lastToHide is not null and lastToHide's popover visibility state is showing and - document's auto popover list is not empty:
+ document's showing auto popover list is not empty:Run the hide popover algorithm given document's auto - popover list's last element, focusPreviousElement, fireEvents, - and false.
Run the hide popover algorithm given document's + showing auto popover list's last element, focusPreviousElement, + fireEvents, and false.
Set repeatingHide to true if document's auto popover - list contains endpoint and document's auto popover - list's last element is not endpoint, otherwise false.
Set repeatingHide to true if document's showing auto + popover list contains endpoint and document's showing auto + popover list's last element is not endpoint, otherwise false.
If repeatingHide is true, then set fireEvents to false.
Every Document
has a popover pointerdown target, which is an HTML element or null, initially null.
Every Document
has a showing hint popover, which is an HTML element or null, initially null.
Every HTML element has a popover invoker, which is an HTML element or null, initially set to null.
@@ -84185,6 +84182,54 @@ dictionary DragEventInit : MouseEventInit {Let shouldRestoreFocus be false.
Let originalType be the value of element's popover
attribute.
If originalType is the auto state, + then:
+ +Run close entire popover list given document's showing + auto popover list.
Let ancestor be the result of running the topmost popover + ancestor algorithm given element, document's showing auto + popover list, and invoker.
Run hide all popovers until given ancestor, false, and not + nestedShow.
Otherwise, if originalType is the hint state, then:
+ +Let ancestor be the result of running the topmost popover + ancestor algorithm given element, document's showing hint + popover list, and invoker.
If ancestor is not null, then:
+ +Run hide all popovers until given ancestor, false, and not + nestedShow.
Otherwise:
+ +TODO apparently we can append to the auto stack in this case???
If element's Run hide all popovers until given
- element, focusPreviousElement, fireEvents, and false.popover
attribute is in the auto state or DragEventInit : MouseEventInit {
If the result of running check popover validity given element, @@ -84483,8 +84528,7 @@ dictionary DragEventInit : MouseEventInit {
To hide all popovers until, given an HTML element or Document
endpoint, a boolean
- focusPreviousElement, a boolean fireEvents, and a boolean
- hideUnrelatedPopovers:
Let document be endpoint's node document.
To hide all popovers, given a Document
document, run
hide all popovers until given document,
- false, false, and true.
To find the topmost popover ancestor, given a Node
- newPopover, and an HTML element or null
- invoker, perform the following steps. They return an HTML element or null.
The topmost popover ancestor algorithm will return the topmost (latest in the @@ -84712,11 +84756,14 @@ dictionary DragEventInit : MouseEventInit {
Return null.
To find the topmost auto popover given a +
To find the topmost auto or hint popover given a
Document
document, perform the following steps. They return an HTML element or null.
If document's showing hint popover list is not empty, then return + document's showing hint popover list's last element.
If document's showing auto popover list is not empty, then return document's showing auto popover list's last element.
Return popovers.
To get the showing hint popover list for a Document
+ document:
Let popovers be « ».
For each Element
element in
+ document's top layer: if element's popover
attribute is in the hint state and element's popover
+ visibility state is showing, then append element to popovers.
Return popovers.
Buttons may have the following content attributes:
@@ -85025,7 +85088,7 @@ dictionary DragEventInit : MouseEventInit { document.If sameTarget is true, then run hide - all popovers until given ancestor, false, true, and true.
Every Document
has a popover pointerdown target, which is an HTML element or null, initially null.
TODO make sure that ever reference to these lists is implemented
+ +Every Document
has a showing auto popover list,
+ which is a list, initially « ».
Every Document
has a showing hint popover list, which is a
+ list, initially « ».
Every HTML element has a popover invoker, which is an HTML element or null, initially set to null.
@@ -84151,6 +84159,8 @@ dictionary DragEventInit : MouseEventInit {Let nestedShow be element's popover showing or hiding.
Let fireEvents be not nestedShow.
Set element's popover showing or hiding to true.
Let originalType be the value of element's popover
attribute.
Let stackToAppendTo be null.
Let autoAncestor be the result of running the topmost popover + ancestor algorithm given element, document's showing auto + popover list, and invoker.
Let hintAncestor be the result of running the topmost popover + ancestor algorithm given element, document's showing hint + popover list, and invoker.
If originalType is the auto state, then:
Run close entire popover list given document's showing - auto popover list.
Let ancestor be the result of running the topmost popover - ancestor algorithm given element, document's showing auto - popover list, and invoker.
Let ancestor be autoAncestor if autoAncestor is not + null, otherwise document.
Run hide all popovers until given ancestor, false, and not - nestedShow.
Run hide all popovers until given ancestor, + shouldRestoreFocus, and fireEvents.
Set stackToAppendTo to document's showing auto popover + list.
Otherwise, if originalType is the hint state, then:
+If originalType is the hint state, + then:
Let ancestor be the result of running the topmost popover - ancestor algorithm given element, document's showing hint - popover list, and invoker.
If ancestor is not null, then:
+If hintAncestor is not null, then:
Run hide all popovers until given ancestor, false, and not - nestedShow.
Run hide all popovers until given hintAncestor, + shouldRestoreFocus, and fireEvents.
Set stackToAppendTo to document's showing hint popover + list
Otherwise:
-TODO apparently we can append to the auto stack in this case???
If element's popover
attribute is in the auto state or hint state, then:
Let originalType be the value of element's popover
attribute.
Let ancestor be the result of running the topmost popover - ancestor algorithm given element and invoker.
Run close entire popover list given document's showing + hint popover list, shouldRestoreFocus, and fireEvents.
If ancestor is null, then set ancestor to - document.
If autoAncestor is not null, then:
-If element's popover
attribute is in the
- hint state, then:
Run hide all popovers until given autoAncestor, + shouldRestoreFocus, and fireEvents.
If document's showing hint popover is not null, then run the - hide popover algorithm given document's showing hint - popover, false, not nestedShow, and throwExceptions.
Set stackToAppendTo to document's showing auto popover + list.
If ancestor is not document, then run hide all popovers until given ancestor, - false, and not nestedShow.
Otherwise, set stackToAppendTo to document's showing hint + popover list
Otherwise, run hide all popovers until - given ancestor, false, and not nestedShow.
If originalType is data-x="attr-popover-auto-state">auto or hint, then:
+ +Assert: stackToAppendTo is not null.
If originalType is not equal to the value of element's popover
attribute, then throw a
@@ -84280,13 +84291,18 @@ dictionary DragEventInit : MouseEventInit {
If the result of running topmost auto popover on document is null, - then set shouldRestoreFocus to true.
+If the result of running topmost auto or hint popover on document + is null, then set shouldRestoreFocus to true.
This ensures that focus is returned to the previously-focused element only for the first popover in a stack.
Assert: stackToAppendTo does not contain + element.
Append element to stackToAppendTo.
Set element's popover close watcher to the result of establishing a close watcher given @@ -84304,10 +84320,6 @@ dictionary DragEventInit : MouseEventInit {
If element's popover
attribute is in the
- hint state, then set document's
- showing hint popover to element.
Set element's previously focused element to null.
Let originallyFocusedElement be document's focused area of the
@@ -84862,36 +84874,21 @@ dictionary DragEventInit : MouseEventInit {
Return true. To get the showing auto popover list for a
- Let popovers be « ». For each Return popovers. To get the showing hint popover list for a To close entire popover list given a list popoverList, a
+ boolean focusPreviouselement, and a boolean fireEvents: Let popovers be « ». While popoverList is not empty: For each TODO: If a popover's beforetoggle handler opens a new popover, it is possible to get an
+ infinite loop here. Need to break that loop. Return popovers. Run the hide popover algorithm given popoverList's last item,
+ focusPreviousElement, fireEvents, and false.Document
document:
-
-
- Element
element in
- document's top layer: if element's popover
attribute is in the auto state and element's popover
- visibility state is showing, then append element to popovers.Document
- document:
-
Element
element in
- document's top layer: if element's popover
attribute is in the hint state and element's popover
- visibility state is showing, then append element to popovers.
+
+
Let document be endpoint's node document.
Assert: endpoint is a Document
or endpoint
+ is in the showing state.
Assert: endpoint is a Document
or
+ endpoint's popover
attribute is in the auto state or endpoint's hint state.
Let closeAllOpenPopovers be an algorithm which performs the following steps:
+If endpoint is a Document
:
Let popover be document's topmost auto - popover.
Run close entire popover list given document's auto + popover list, focusPreviousElement, and fireEvents.
While popover is not null:
- -Run the hide popover algorithm given popover, - focusPreviousElement, fireEvents, and false.
Run close entire popover list given document's hint + popover list, focusPreviousElement, and fireEvents.
Set popover to document's topmost auto - popover.
Return.
If endpoint is a Document
, then run
- closeAllOpenPopovers and return.
Assert: endpoint's popover
- attribute is not in the manual state.
If endpoint's popover
attribute is in the
- hint state, then:
To findLastToHide, given an HTML element + endpoint and a list popoverList:
Let lastToHide be null.
If hideUnrelatedPopovers is true, then:
+For each popover in popoverList:
If document's showing hint popover is not null and - document's showing hint popover is not endpoint, then run - the hide popover algorithm given focusPreviousElement, - fireEvents, and throwExceptions.
While document's showing auto popover list is not empty, run - the hide popover algorithm given focusPreviousElement, - fireEvents, and throwExceptions.
If popover is endpoint, then return + lastToHide.
Set lastToHide to popover.
Assert: This should never be reached.
Otherwise:
+to hideStackUntil, given an showing:
If popover is endpoint, then set foundEndpoint to - true.
Assert: popoverList is not empty.
Otherwise, if foundEndpoint is true, then set lastToHide to - popover and break.
Run the hide popover algorith given the last item in + popoverList, focusPreviousElement, fireEvents, and + false.
If foundEndpoint is false, then run closeAllOpenPopovers and - return.
While lastToHide is not null and lastToHide's popover - visibility state is showing and - document's showing auto popover list is not empty:
+Assert: repeatingHide is false or popoverList's + last item is endpoint.
Run the hide popover algorithm given document's - showing auto popover list's last element, focusPreviousElement, - fireEvents, and false.
Set repeatingHide to true if document's showing auto - popover list contains endpoint and document's showing auto - popover list's last element is not endpoint, otherwise false.
Set repeatingHide to true if popoverList contains + endpoint and popoverList's last item is not endpoint, + otherwise false.
If repeatingHide is true, then set fireEvents to false.
If document's showing popover hint list contains + endpoint:
+ +Assert: endpoint's popover
+ attribute is in the hint state.
Run hideStackUntil given endpoint and document's + showing hint popover list.
Return.
Run closeEntirePopoverStack given document's showing popover + hint list, focusPreviousElement, and fireEvents.
Assert: document's showing popover auto list contains + endpoint.
Run hideStackUntil given endpoint and document's + showing popover auto list.
The hide all popovers until
From 6419895954813fc4740880af5f1eb9f0e2a35281 Mon Sep 17 00:00:00 2001
From: Joey Arhar
To find the topmost popover ancestor, given a Node
- newPopover, an HTML element or null
- invoker, and a list popoverList, perform the following steps.
- They return an HTML element or null.
The topmost popover ancestor algorithm will return the topmost (latest in the @@ -84707,8 +84707,7 @@ dictionary DragEventInit : MouseEventInit {
Let document be newPopover's node document.
For each popover of document's showing auto popover - list:
+For each popover of popoverList:
Set popoverPositions[popover] to @@ -84732,10 +84731,35 @@ dictionary DragEventInit : MouseEventInit {
If candidate is null, then return.
Let candidateAncestor be the result of running nearest inclusive open - popover given candidate.
Let okNesting be false.
If candidateAncestor is null, then return.
Let candidateAncestor be null.
While okNesting is false:
+ +Set candidateAncestor to the result of running nearest inclusive open + popover given candidate.
If candidateAncestor is null or popoverPositions does not + contain candidateAncestor, then return.
Assert: candidateAncestor's popover
attribute is not in the manual or none state.
Set okNesting to true if newPopover's popover
attribute is in the hint state or candidateAncestor's popover
attribute is in the auto state.
If okNesting is false, then set candidate to + candidateAncestor's parent in the flat tree.
Let candidatePosition be popoverPositions[candidateAncestor].
Let popoverList be popover's node document's +
Let hintList be popover's node document's + showing hint popover list.
Let autoList be popover's node document's showing auto popover list.
If popover is in popoverList, then return the index of - popover in popoverList + 1.
If popover is in hintList, then return the index of + popover in hintList + the size of autoList + 1.
If popover is in autoList, then return the index of + popover in autoList + 1.
Return 0.
Perform the following steps at least once:
- +Let lastToHide be the result of running findLastToHide given endpoint and popoverList.
Every Document
has a popover pointerdown target, which is an HTML element or null, initially null.
TODO make sure that ever reference to these lists is implemented
- -Every Document
has a showing auto popover list,
- which is a list, initially « ».
Every Document
has a showing hint popover list, which is a
- list, initially « ».
Every HTML element has a popover invoker, which is an HTML element or null, initially set to null.
@@ -84098,6 +84090,9 @@ dictionary DragEventInit : MouseEventInit {Every HTML element has a popover close watcher, which is a close watcher or null, initially null.
+Every HTML element has an opened in mode, which + is a string or null, initially null.
+The following attribute change steps, given element, localName, oldValue, value, and namespace, are used for all HTML elements:
From 74a3a818aa87ffd3f1b0513663fbe1797456745c Mon Sep 17 00:00:00 2001 From: Joey ArharLet ancestor be autoAncestor if autoAncestor is not null, otherwise document.
Run hide all popovers until given ancestor, - shouldRestoreFocus, and fireEvents.
Run hide all popovers until given + ancestor, shouldRestoreFocus, and fireEvents.
Set stackToAppendTo to document's showing auto popover - list.
Set stackToAppendTo to "auto
".
If hintAncestor is not null, then:
Run hide all popovers until given hintAncestor, - shouldRestoreFocus, and fireEvents.
Run hide all popovers until given + hintAncestor, shouldRestoreFocus, and fireEvents.
Set stackToAppendTo to document's showing hint popover - list
Set stackToAppendTo to "hint
".
If autoAncestor is not null, then:
Run hide all popovers until given autoAncestor, - shouldRestoreFocus, and fireEvents.
Run hide all popovers until given + autoAncestor, shouldRestoreFocus, and fireEvents.
Set stackToAppendTo to document's showing auto popover - list.
Set stackToAppendTo to "auto
".
Otherwise, set stackToAppendTo to document's showing hint - popover list
Otherwise, set stackToAppendTo to "hint
".
If originalType is data-x="attr-popover-auto-state">auto or If originalType is auto or hint, then:
If the result of running topmost auto or hint popover on document - is null, then set shouldRestoreFocus to true.
+If the result of running topmost auto or hint + popover on document is null, then set shouldRestoreFocus to + true.
This ensures that focus is returned to the previously-focused element only for the first popover in a stack.
Assert: stackToAppendTo does not contain - element.
If stackToAppendTo is "auto
":
Assert: document's showing auto popover list does + not contain element.
Set element's opened in mode to "auto
".
Otherwise:
+ +Assert: stackToAppendTo is "span
".
Assert: document's showing hint popover list does + not contain element.
Append element to stackToAppendTo.
Set element's opened in mode to "hint
".
Set element's popover close watcher to the result of DragEventInit : MouseEventInit {
Otherwise, remove an element from the top layer immediately given
element. Set document's showing hint popover to null. Set element's opened in mode to null. Set element's popover visibility state to hidden. Assert: endpoint is a If endpoint is a Run close entire popover list given document's auto
- popover list, focusPreviousElement, and fireEvents. Run close entire popover list given document's showing
+ auto popover list, focusPreviousElement, and fireEvents. Run close entire popover list given document's hint
- popover list, focusPreviousElement, and fireEvents. Run close entire popover list given document's showing
+ hint popover list, focusPreviousElement, and fireEvents. Return. to hideStackUntil, given an HTML element
element and a list popoverList
Assert: popoverList is not empty. Run the hide popover algorith given the last item in
+ Run the hide popover algorithm given the last item in
popoverList, focusPreviousElement, fireEvents, and
false. If document's showing popover hint list contains
+ If document's showing hint popover list contains
endpoint: Run closeEntirePopoverStack given document's showing popover
- hint list, focusPreviousElement, and fireEvents. Run closeEntirePopoverStack given document's showing hint
+ popover list, focusPreviousElement, and fireEvents. Assert: document's showing popover auto list contains
+ Assert: document's showing auto popover list contains
endpoint. Run hideStackUntil given endpoint and document's
- showing popover auto list.Document
or
endpoint's popover
attribute is in the auto state or endpoint's popover
attribute is in the hint state.Document
:
-
@@ -84850,7 +84867,7 @@ dictionary DragEventInit : MouseEventInit {
@@ -84873,7 +84890,7 @@ dictionary DragEventInit : MouseEventInit {
@@ -84895,7 +84912,7 @@ dictionary DragEventInit : MouseEventInit {
@@ -84909,14 +84926,14 @@ dictionary DragEventInit : MouseEventInit {
The hide all popovers until @@ -84929,7 +84946,7 @@ dictionary DragEventInit : MouseEventInit { false, and false.
To find the topmost popover ancestor, given a Node
- newPopover, a list popoverList, and a HTML element or null invoker, perform the following steps. They
return an HTML element or null.
Return true.
To get the showing auto popover list for a
+ Let popovers be « ». For each Return popovers. To get the showing hint popover list for a Let popovers be « ». For each Return popovers. To close entire popover list given a list popoverList, a
boolean focusPreviouselement, and a boolean fireEvents: While popoverList is not empty: TODO: If a popover's beforetoggle handler opens a new popover, it is possible to get an
- infinite loop here. Need to break that loop. Run the hide popover algorithm given popoverList's last item,
focusPreviousElement, fireEvents, and false. to hideStackUntil, given an HTML element
- element and a list popoverList
+ element and a list popoverList: Let repeatingHide be false. To get the showing auto popover list for a
- Let popovers be « ». Every HTML element has a popover close watcher,
which is a close watcher or null, initially null. Every HTML element has an opened in mode, which
- is a string or null, initially null. Every HTML element has an opened in popover
+ mode, which is a string or null, initially null. The following attribute change
steps, given element, localName, oldValue,
@@ -84549,7 +84549,7 @@ dictionary DragEventInit : MouseEventInit {
Assert: document's showing auto popover list does
not contain element. Set element's opened in mode to " Set element's opened in popover mode to " Assert: document's showing hint popover list does
not contain element. Set element's opened in mode to " Set element's opened in popover mode to " Otherwise, remove an element from the top layer immediately given
element. Set element's opened in mode to null. Set element's opened in popover mode to null. Set element's popover visibility state to hidden. Let popovers be « ». For each Return popovers. Let popovers be « ». For each Return popovers. Run close entire popover list given document's showing
- auto popover list, shouldRestoreFocus, and fireEvents.Document
document
+
+
+
+
+ Element
element in
+ document's top layer: if element's opened in mode
+ is "auto
" and element's popover visibility state
+ is showing, then append element to popovers.Document
+ document:
+
+
Element
element in
+ document's top layer: if element's opened in mode
+ is "hint
" and element's popover visibility state
+ is showing, then append element to popovers.
-
From 2274825ba6ba0a516fbf7b2cc1399e60870d4f0a Mon Sep 17 00:00:00 2001
From: Joey Arhar
Document
document
+ Document
document:
@@ -84562,7 +84562,7 @@ dictionary DragEventInit : MouseEventInit {
hint
hint
- Closes other hint popovers when opened; has light
- dismiss; only one can be open at a time.
+ Closes other hint popovers when opened, but not other auto popovers; has light dismiss; responds to close requests.
From bb6baf651c6cb7390c50c29830cd0500d884c23d Mon Sep 17 00:00:00 2001
From: Joey Arhar auto
".hint
".Element
element in
- document's top layer: if element's opened in mode
- is "auto
" and element's popover visibility state
- is showing, then auto" and element's popover visibility
+ state is showing, then append element to popovers.Element
element in
- document's top layer: if element's opened in mode
- is "hint
" and element's popover visibility state
- is showing, then hint" and element's popover visibility
+ state is showing, then append element to popovers.
Let ancestor be autoAncestor if autoAncestor is not null, otherwise document.
Assert: stackToAppendTo is "span
".
Assert: document's showing hint popover list does not contain element.
Run close entire popover list given document's showing - auto popover list, focusPreviousElement, and fireEvents.
Run close entire popover list given document's showing - hint popover list, focusPreviousElement, and fireEvents.
Return.
Let nestedShow be element's popover showing or hiding.
Let fireEvents be not nestedShow.
Let fireEvents be the boolean negation of nestedShow.
Set element's popover showing or hiding to true.
Let shouldRestoreFocus be false.
Let originalType be the value of element's Let originalType be the the current state of element's popover
attribute.
Let stackToAppendTo be null.
Set stackToAppendTo to "auto
".
If originalType is the hint state, @@ -84517,8 +84517,8 @@ dictionary DragEventInit : MouseEventInit {
Assert: stackToAppendTo is not null.
If originalType is not equal to the value of element's popover
attribute, then throw a
+
If originalType is not equal to the current state of element's
+ popover
attribute, then throw a
"InvalidStateError
" DOMException
.
Otherwise:
+Otherwise:
+Assert: stackToAppendTo is " Let document be endpoint's node document. Assert: endpoint is a Assert: endpoint is a Assert: endpoint is a DragEventInit : MouseEventInit {
Document
or endpoint
- is in the showing state.Document
or
+ endpoint's popover visibility state is showing.Document
or
endpoint's popover
attribute is in the DragEventInit : MouseEventInit {
To findLastToHide, given an HTML element - endpoint and a list popoverList:
- -Let lastToHide be null.
For each popover in popoverList:
- -If popover is endpoint, then return - lastToHide.
Set lastToHide to popover.
Assert: This should never be reached.
to hideStackUntil, given an HTML element element and a list popoverList:
@@ -84878,8 +84859,17 @@ dictionary DragEventInit : MouseEventInit {Perform the following steps at least once:
Let lastToHide be the result of running findLastToHide given - endpoint and popoverList.
Let lastToHide be null.
For each popover in popoverList
+
+ If popover is endpoint, then break. Set lastToHide to popover.
+
+
If lastToHide is null, then return.
Let shouldRestoreFocus be false.
Let originalType be the the current state of element's Let originalType be the current state of element's popover
attribute.
Let stackToAppendTo be null.
to hideStackUntil, given an HTML element - element and a list popoverList:
+Let hideStackUntil be the following steps given an HTML element element and a list + popoverList:
Let repeatingHide be false.
Run closeEntirePopoverStack given document's showing hint
+ Run close entire popover list given document's showing hint
popover list, focusPreviousElement, and fireEvents. Assert: document's showing auto popover list contains
From 43705d2bbc3af1292efbb6244050ad6cd87762f8 Mon Sep 17 00:00:00 2001
From: Joey Arhar Otherwise: Otherwise: Assert: stackToAppendTo is " Let lastToHide be null. For each popover in popoverList
+ For each popover in popoverList: If popover is endpoint, then break. If lastToHide is null, then return. While lastToHide is not null and lastToHide's
- popover visibility state is While lastToHide's popover visibility state is showing: Let popovers be « ». For each For each If all of the following are true: element is an HTML element; element's opened in popover mode is " element's popover visibility state is showing,
+ then append element to
+ popovers. Return popovers. Let popovers be « ». For each For each If all of the following are true: element is an HTML element; element's opened in popover mode is " element's popover visibility state is showing,
+ then append element to
+ popovers. Return popovers. Set this's previously focused element to the
focused element. Let document be this's node document. Let hideUntil be the result of running topmost popover ancestor
- given this, null, and false. If hideUntil is null, then set hideUntil to this's
- node document. If hideUntil is null, then set hideUntil to the result of running
+ topmost popover ancestor given this, document's
+ showing auto popover list, null, and false. If hideUntil is null, then set hideUntil to
+ document. Run hide all popovers until given
hideUntil, false, and true. Set this's previously focused element to the
focused element. Let document be this's node document. Let hideUntil be the result of running topmost popover ancestor
- given this, null, and false. If hideUntil is null, then set hideUntil to this's
- node document. If hideUntil is null, then set hideUntil to the result of running
+ topmost popover ancestor given this, document's
+ showing auto popover list, null, and false. If hideUntil is null, then set hideUntil to
+ document. Run hide all popovers until given
hideUntil, false, and true. If all of the following are true: element is an HTML element; element's opened in popover mode is " element's popover visibility state is showing,
- then append element to
- popovers. then append element to
+ popovers.
Date: Thu, 4 Apr 2024 16:04:05 -0700
Subject: [PATCH 24/36] some nits
---
source | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/source b/source
index 6812b4630e5..708d52b49fc 100644
--- a/source
+++ b/source
@@ -85195,7 +85195,7 @@ dictionary DragEventInit : MouseEventInit {
From e9f877d11d45c1ce2e4359f714d07d04e56f8bf3 Mon Sep 17 00:00:00 2001
From: Joey Arhar
@@ -85529,11 +85547,29 @@ dictionary DragEventInit : MouseEventInit {
Element
element in
- document's top layer: if element's opened in popover
- mode is "auto
" and element's popover visibility
- state is showing, then append element to popovers.Element
element in
+ document's top layer:
+
+
+
+ auto
"; and
From 7848e393e72cf0ef741f499b32a2c2935664a596 Mon Sep 17 00:00:00 2001
From: Joey Arhar Element
element in
- document's top layer: if element's opened in popover
- mode is "hint
" and element's popover visibility
- state is showing, then append element to popovers.Element
element in
+ document's top layer:
+
+
+
+ hint
"; and
+
-
DragEventInit : MouseEventInit {
If all of the following are true:
-element is an HTML element;
element's opened in popover mode is " element's popover visibility state is showing,
- DragEventInit : MouseEventInit {
then append element to - popovers.
then append element to + popovers.
Let invokerPopover be the result of running nearest inclusive target popover for invoker given node.
Let getStackPosition be an algorithm which performs the following steps given - an HTML element popover:
+If the result of running get the popover stack position given + clickedPopover is greater than the result of running get the popover stack + position given invokerPopover, then return clickedPopover.
Let hintList be popover's node document's - showing hint popover list.
Return invokerPopover.
Let autoList be popover's node document's - showing auto popover list.
To get the popover stack position, given an HTML + element popover:
-If popover is in hintList, then return the index of - popover in hintList + the size of autoList + 1.
Let hintList be popover's node document's + showing hint popover list.
If popover is in autoList, then return the index of - popover in autoList + 1.
Let autoList be popover's node document's + showing auto popover list.
Return 0.
If popover is in hintList, then return the index of + popover in hintList + the size of autoList + 1.
If the result of running getStackPosition given clickedPopover is - greater than the result of running getStackPosition given invokerPopover, - then return clickedPopover.
If popover is in autoList, then return the index of + popover in autoList + 1.
Return invokerPopover.
Return 0.
To find the nearest inclusive target popover for invoker given a Let hideStackUntil be the following steps given an HTML element element and a list
- popoverList: If document's showing hint popover list contains
+ endpoint: Let repeatingHide be false. Assert: endpoint's Perform the following steps at least once: Run hide popover stack until given endpoint and
+ document's showing hint popover list. Let lastToHide be null. Return. For each popover in popoverList: Run close entire popover list given document's showing hint
+ popover list, focusPreviousElement, and fireEvents. If popover is endpoint, then break. Assert: document's showing auto popover list contains
+ endpoint. Set lastToHide to popover. Run hide popover stack until given endpoint and
+ document's showing auto popover list. If lastToHide is null, then return. To hide popover stack until, given an HTML
+ element element and a list popoverList: While lastToHide's popover visibility state is showing: Let repeatingHide be false. Assert: popoverList is not empty. Perform the following steps at least once: Run the hide popover algorithm given the last item in
- popoverList, focusPreviousElement, fireEvents, and
- false. Let lastToHide be null. Assert: repeatingHide is false or popoverList's
- last item is endpoint. For each popover in popoverList: Set repeatingHide to true if popoverList contains
- endpoint and popoverList's last item is not endpoint,
- otherwise false. If popover is endpoint, then break. If repeatingHide is true, then set fireEvents to false. Set lastToHide to popover. and keep performing them while repeatingHide is true. If document's showing hint popover list contains
- endpoint: If lastToHide is null, then return. Assert: endpoint's While lastToHide's popover visibility state is showing: Run hideStackUntil given endpoint and document's
- showing hint popover list. Assert: popoverList is not empty. Return. Run the hide popover algorithm given the last item in
+ popoverList, focusPreviousElement, fireEvents, and
+ false. Run close entire popover list given document's showing hint
- popover list, focusPreviousElement, and fireEvents. Assert: repeatingHide is false or popoverList's
+ last item is endpoint. Assert: document's showing auto popover list contains
- endpoint. Set repeatingHide to true if popoverList contains
+ endpoint and popoverList's last item is not endpoint,
+ otherwise false. Run hideStackUntil given endpoint and document's
- showing auto popover list. If repeatingHide is true, then set fireEvents to false. and keep performing them while repeatingHide is true. The hide all popovers until
From 579f2e1e6898b837316c338716062b3b3736f5d9 Mon Sep 17 00:00:00 2001
From: Joey Arhar element's popover visibility state is showing,
- then append element to
- popovers. then append element to
+ popovers. element's popover visibility state is showing,
- then append element to
- popovers. then append element to
+ popovers. Let invokerPopover be the result of running nearest inclusive target
popover for invoker given node. If the result of running get the popover stack position given
- clickedPopover is greater than the result of running get the popover stack
+ If the result of get the popover stack position given
+ clickedPopover is greater than the result of get the popover stack
position given invokerPopover, then return clickedPopover. Return invokerPopover. Let invokerPopover be the result of running nearest inclusive target
popover for invoker given node. If the result of get the popover stack position given
- clickedPopover is greater than the result of get the popover stack
- position given invokerPopover, then return clickedPopover. If the result of getting the popover stack
+ position given clickedPopover is greater than the result of getting the popover stack position given
+ invokerPopover, then return clickedPopover. Return invokerPopover. Assert: endpoint's Run hide popover stack until given endpoint and
- document's showing hint popover list. Run hide popover stack until given endpoint,
+ document's showing hint popover list, focusPreviousElement,
+ fireEvents. Return. Assert: document's showing auto popover list contains
endpoint. Run hide popover stack until given endpoint and
- document's showing auto popover list. Run hide popover stack until given endpoint, document's
+ showing auto popover list, focusPreviousElement, and
+ fireEvents. To hide popover stack until, given an HTML
- element element and a list popoverList: Let repeatingHide be false. Run close entire popover list given document's showing hint
popover list, focusPreviousElement, and fireEvents. Assert: document's showing auto popover list contains
- endpoint. If document's showing auto popover list does not contain
+ endpoint, then return. Run hide popover stack until given endpoint, document's
showing auto popover list, focusPreviousElement, and
From aac88012ca127a3eb5d2a69b78488a2b757ca3e8 Mon Sep 17 00:00:00 2001
From: Domenic Denicola Run hide popover stack until given endpoint,
document's showing hint popover list, focusPreviousElement,
- fireEvents. Return. element's popover visibility state is showing,
-
- then append element to
- popovers. then append element to
+ popovers. element's popover visibility state is showing,
-
- then append element to
- popovers. then append element to
+ popovers. Let autoAncestor be the result of running the topmost popover
ancestor algorithm given element, document's showing auto
- popover list, and invoker. Let hintAncestor be the result of running the topmost popover
ancestor algorithm given element, document's showing hint
- popover list, and invoker.Node
From d8a134bd69c077bd2fb0f38fcdbb697b44207b70 Mon Sep 17 00:00:00 2001
From: Joey Arhar
-
popover
+ attribute is in the hint state.
-
+
-
-
+
+
-
-
+
-
-
+
-
-
-
+
- popover
- attribute is in the hint state.
+
-
+ popover
attribute is in the hint state.
@@ -86178,10 +86178,10 @@ dictionary DragEventInit : MouseEventInit {
If originalType is the auto state,