From c6b3f85bd0ba578c7036b52c85c9c2bb41462e98 Mon Sep 17 00:00:00 2001
From: Joey Arhar Each Each HTML element has a previously focused
element which is null or an element, and it is initially null. When To light dismiss open dialogs, given a To light dismiss open dialogs, given a Assert: event's Let ancestor be the result of running nearest clicked dialog
given event. If event's If event's Let sameTarget be true if ancestor is document's
- dialog pointerdown target. Set document's dialog pointerdown target to null. If sameTarget is false, then return. Let topmostDialog be the last element of document's open
- dialogs list. Let topmostDialog be the last element of document's open
+ dialogs list. If ancestor is topmostDialog, then return. If ancestor is topmostDialog, then return. If topmostDialog's computed closed-by state is not Any, then return. If topmostDialog's computed closed-by state is not Any, then return. Assert: topmostDialog's close watcher is not null. Assert: topmostDialog's close watcher is not null. Request to close
- topmostDialog's close watcher with
- false. Request to close
+ topmostDialog's close watcher with
+ false. To run light dismiss activities, given a To run light dismiss activities, given a Run light dismiss open popovers with event.
- Document has a dialog pointerdown target, which is an HTML dialog element or null, initially null.showModal() and show()
@@ -63528,7 +63525,8 @@ interface HTMLDialogElement : HTMLElement {
data-x="attr-dialog-closedby-any-state">Any state will close the dialog element. This
is in addition to how such dialogs respond to close requests.PointerEvent event:click event
+ event:
- HTMLDialogElement : HTMLElement {
type is
- "pointerdown", then set document's
- dialog pointerdown target to ancestor.type is
- "pointerup", then:
-
- PointerEvent
- event:click
+ event event:
To find the nearest clicked dialog, given a PointerEvent
- event:
To find the nearest clicked dialog, given a click
+ event event:
Let target be event's DragEventInit : MouseEventInit { data-x="popover-showing-state">showing
Every Document has a popover pointerdown target, 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.
@@ -88550,8 +88527,8 @@ dictionary DragEventInit : MouseEventInit { data-x="attr-popover-auto-state">Auto state will close the popover. This is in addition to how such popovers respond to close requests. -To light dismiss open popovers, given a PointerEvent
- event:
To light dismiss open popovers, given a click
+ event event:
Assert: event's If topmostPopover is null, then return. If event's If event's Let ancestor be the result of running topmost clicked popover
- given target. Let sameTarget be true if ancestor is document's
- popover pointerdown target. Let ancestor be the result of running topmost clicked popover
+ given target. Set document's popover pointerdown target to null. If ancestor is null, then set ancestor to
- document. If ancestor is null, then set ancestor to
+ document. If sameTarget is true, then run hide
- all popovers until given ancestor, false, and true. Run hide all popovers until given
+ ancestor, false, and true.DragEventInit : MouseEventInit {
type is "pointerdown", then: set document's popover
- pointerdown target to the result of running topmost clicked popover given
- target.type is "pointerup", then:
-
-
To find the topmost clicked popover, given a Node node:
dialog element. This
is in addition to how such dialogs respond to close requests.
- To light dismiss open dialogs, given a click event
+
To light dismiss open dialogs, given a MouseEvent event
event:
Assert: event's isTrusted attribute is true.
Assert: event's type is
+ "click".
Let document be event's target's node document.
To run light dismiss activities, given a click
- event event:
To run light dismiss activities, given a MouseEvent
+ event:
Assert: event's isTrusted attribute is true.
Assert: event's type is
+ "click".
Run light dismiss open popovers with event.
Run light dismiss open dialogs with event.
To light dismiss open popovers, given a click
- event event:
To light dismiss open popovers, given a MouseEvent
+ event:
Assert: event's isTrusted attribute is true.
Assert: event's type is
+ "click".
Let target be event's target.
dialog element. This
is in addition to how such dialogs respond to close requests.
- To light dismiss open dialogs, given a MouseEvent event
+
To light dismiss open dialogs, given a PointerEvent event
event:
To run light dismiss activities, given a MouseEvent
+
To run light dismiss activities, given a PointerEvent
event:
To light dismiss open popovers, given a MouseEvent
+
To light dismiss open popovers, given a PointerEvent
event:
scrollend eventThe following features and terms are defined in CSS Syntax:
@@ -65826,29 +65827,32 @@ interface HTMLDialogElement : HTMLElement {
is in addition to how such dialogs respond to close requests.
To light dismiss open dialogs, given a PointerEvent event
- event:
To light dismiss open dialogs, given a Node
+ pointerDownTarget, a number pointerDownX, a number pointerDownY,
+ a Node pointerUpTarget, a number pointerUpX, and a number
+ pointerUpY:
Assert: event's isTrusted attribute is true.
Assert: event's type is
- "click".
Let document be event's target's node document.
Let document be pointerDownTarget's node + document.
If document's open dialogs list is empty, then return.
Let ancestor be the result of running nearest clicked dialog - given event.
Let pointerDownDialog be the result of running nearest clicked + dialog given pointerDownTarget, pointerDownX, and + pointerDownY.
Let pointerUpDialog be the result of running nearest clicked + dialog given pointerUpTarget, pointerUpX, and + pointerUpY.
If pointerDownDialog is not pointerUpDialog, then return.
Let topmostDialog be the last element of document's open dialogs list.
If ancestor is topmostDialog, then return.
If pointerDownDialog is topmostDialog, then return.
If topmostDialog's computed closed-by state is not Any, then return.
To run light dismiss activities, given a PointerEvent
- event:
To run light dismiss activities, given a Node
+ pointerDownTarget, a number pointerDownX, a number pointerDownY,
+ a Node pointerUpTarget, a number pointerUpX, and a number
+ pointerUpY:
Assert: event's isTrusted attribute is true.
Run light dismiss open popovers given pointerDownTarget and + pointerUpTarget.
Assert: event's type is
- "click".
Run light dismiss open popovers with event.
Run light dismiss open dialogs with event.
Run light dismiss open dialogs given pointerDownTarget, + pointerDownX, pointerDownY, pointerUpTarget, + pointerUpX, and pointerUpY.
To find the nearest clicked dialog, given a click
- event event:
To find the nearest clicked dialog, given a Node target, a
+ number clientX, and a number clientY:
Let target be event's target.
If target is a dialog element, target has an open attribute, target's is modal is
- true, and event's clientX and
- clientY are outside the bounds of target,
- then return null.
+ true, and clientX and clientY are outside of target's bounding box, then return null.
The check for clientX and clientY is because a pointer event that hits the ::backdrop pseudo element of a dialog will result in event having a
- target of the dialog element itself.
::backdrop pseudo-element directly instead of the dialog
+ element.
Let currentNode be target.
To light dismiss open popovers, given a PointerEvent
- event:
To light dismiss open popovers, given a Node
+ pointerDownTarget and a Node pointerUpTarget:
Assert: event's isTrusted attribute is true.
Assert: event's type is
- "click".
Let target be event's target.
Let document be target's node document.
Let topmostPopover be the result of running topmost auto popover - given document.
If topmostPopover is null, then return.
Let pointerDownPopover be the result of running topmost clicked + popover given pointerDownTarget.
Let ancestor be the result of running topmost clicked popover - given target.
Let pointerUpPopover be the result of running topmost clicked + popover given pointerUpTarget.
If ancestor is null, then set ancestor to - document.
Run hide all popovers until given - ancestor, false, and true.
If pointerDownPopover is the same as pointerUpPopover, then run + hide all popovers until given ancestor, + false, and true.
If target is a dialog element, target has an open attribute, target's is modal is
- true, and clientX and clientY are outside of target's bounding box, then return null.
The check for clientX and clientY is because a pointer event that hits the ::backdrop pseudo element of a dialog will result in event having a
- target of the dialog element itself. This could be improved if the pointer events spec passed the
- ::backdrop pseudo-element directly instead of the dialog
- element.
If target is a dialog element, target has an open attribute, target's is modal is
+ true, and clientX and clientY are outside of target's bounding box, then return null.
The check for clientX and clientY is because a pointer event that hits the ::backdrop pseudo element of a dialog will result in event having a
+ target of the dialog element itself. This could be improved if the pointer events spec passed the
+ ::backdrop pseudo-element directly instead of the dialog
+ element.
Let currentNode be target.
If pointerDownPopover is the same as pointerUpPopover, then run - hide all popovers until given ancestor, - false, and true.