From 573442ffe3b924b15f5e081cb53e3f72cb9d01af Mon Sep 17 00:00:00 2001
From: Joey Arhar Set this's previously focused element to the
focused element. Run hide all popovers given this's node
- document. Let hideUntil be the result of running topmost popover ancestor
+ given this, null, and false. Run hide all popovers until given
+ hideUntil, false, and true. Run the dialog focusing steps given this. Set this's previously focused element to the
focused element. Run hide all popovers given this's node
- document. Let hideUntil be the result of running topmost popover ancestor
+ given this, null, and false. Run hide all popovers until given
+ hideUntil, false, and true. Run the dialog focusing steps given this.
To hide all popovers until, given an To hide all popovers until, given an HTML element or Document
endpoint, a boolean
focusPreviousElement, and a boolean fireEvents:
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.
To find the topmost popover ancestor, given a Node
+ newPopoverOrTopLayerElement, an HTML element or
+ null invoker, and a boolean isPopover, perform the following steps. They
+ return an HTML element or null.
The topmost popover ancestor algorithm will return the topmost (latest in the @@ -84569,11 +84575,38 @@ dictionary DragEventInit : MouseEventInit {
If isPopover is true:
+ +Assert: newPopoverOrTopLayerElement is an HTML element.
Assert: newPopoverOrTopLayerElement's popover
attribute is not in the no popover state or the manual state.
Assert: newPopoverOrTopLayerElement's popover visibility + state is not in the popover showing + state.
Otherwise:
+ +Assert: invoker is null.
Let popoverPositions be an empty ordered map.
Let index be 0.
Let document be newPopover's node document.
Let document be newPopoverOrTopLayerElement's node + document.
For each popover of document's showing auto popover @@ -84587,8 +84620,8 @@ dictionary DragEventInit : MouseEventInit {
Set popoverPositions[newPopover] to - index.
If isPopover is true, then Set + popoverPositions[newPopoverOrTopLayerElement] to index.
Increment index by 1.
Run checkAncestor given newPopover's parent node within the - flat tree.
Run checkAncestor given newPopoverOrTopLayerElement's parent node + within the flat tree.
Run checkAncestor given invoker.
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.
Run hide all popovers until given hideUntil, false, and true.
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.
Run hide all popovers until given hideUntil, false, and true.
The topmost popover ancestor algorithm will return the topmost (latest in the - showing auto popover list) ancestor popover for the provided popover. Popovers can - be related to each other in several ways, creating a tree of popovers. There are two paths - through which one popover (call it the "child" popover) can have a topmost ancestor popover (call - it the "parent" popover):
+ showing auto popover list) ancestor popover for the provided popover or top layer + element. Popovers can be related to each other in several ways, creating a tree of popovers. + There are two paths through which one popover (call it the "child" popover) can have a topmost + ancestor popover (call it the "parent" popover):The popovers are nested within each other in the node tree. In this case, the descendant @@ -84578,6 +84578,10 @@ dictionary DragEventInit : MouseEventInit { containing an invoking element that points back to the containing popover), and it allows for the construction of a well-formed tree from the (possibly cyclic) graph of connections. Only auto popovers are considered.
+ +If the provided element is a top layer element such as a dialog
which is not
+ showing as a popover, then topmost popover ancestor will only look in the node tree
+ to find the first popover.
If isPopover is true, then Set +
If isPopover is true, then set popoverPositions[newPopoverOrTopLayerElement] to index.
Increment index by 1.
Run checkAncestor given invoker.
return topmostPopoverAncestor.
Return topmostPopoverAncestor.
To find the nearest inclusive open popover given a Node
From 86e134a902992c010613034b80b774efec1458db Mon Sep 17 00:00:00 2001
From: Joey Arhar
Let ancestor be the result of running the topmost popover - ancestor algorithm given element and invoker.
If ancestor is null, then set ancestor to document.
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
newPopoverOrTopLayerElement, an HTML element or
null invoker, and a boolean isPopover, perform the following steps. They