From 25edd1c684073e56660a96845e44ad5006bb36cd Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Mon, 19 Jun 2023 11:04:12 +0200 Subject: [PATCH 1/3] Change "show popover" to call "check popover validity" first This is what implementations (at least Gecko and Chromium) do and it's analogous to what happens in "hide popover". Fixes #9429. --- source | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source b/source index 70e9a24f618..cde8a180e37 100644 --- a/source +++ b/source @@ -82457,6 +82457,9 @@ dictionary DragEventInit : MouseEventInit { element or null invoker:

    +
  1. If the result of running check popover validity given element, + false, throwExceptions, and null is false, then return.

  2. +
  3. Let document be element's node document.

  4. Assert: element's popover invoker is null.

  5. @@ -82472,10 +82475,6 @@ dictionary DragEventInit : MouseEventInit {
-
  • If the result of running check popover validity given element, - false, throwExceptions, and null is false, then run cleanupShowingFlag and - return.

  • -
  • Assert: element is not in document's top layer.

  • From 112639027044093ee0dc9e39886d08b6caef8982 Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Mon, 19 Jun 2023 11:11:48 +0200 Subject: [PATCH 2/3] Define "cleanupShowingFlag" in "show popover" after defining "nestedShow" Simplifies understanding the spec. --- source | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/source b/source index cde8a180e37..2e049e78b7c 100644 --- a/source +++ b/source @@ -82466,6 +82466,14 @@ dictionary DragEventInit : MouseEventInit {
  • Set element's popover invoker to invoker.

  • +
  • Assert: element is not in document's top + layer.

  • + +
  • Let nestedShow be element's popover showing or hiding. +

  • + +
  • Set element's popover showing or hiding to true.

  • +
  • Let cleanupShowingFlag be the following steps:

    @@ -82475,16 +82483,6 @@ dictionary DragEventInit : MouseEventInit {
  • -
  • Assert: element is not in document's top - layer.

  • - -
  • Let nestedShow be false.

  • - -
  • If element's popover showing or hiding is true, then set - nestedShow to true.

  • - -
  • Set element's popover showing or hiding to true.

  • -
  • If the result of firing an event named beforetoggle, using ToggleEvent, with the cancelable attribute initialized to true, the Date: Mon, 19 Jun 2023 11:55:18 +0200 Subject: [PATCH 3/3] Start new line earlier so that `.` isn't at the line's end Otherwise, the rendered page would contain a space character after the `.`. --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 2e049e78b7c..1c3b6bddb03 100644 --- a/source +++ b/source @@ -82469,8 +82469,8 @@ dictionary DragEventInit : MouseEventInit {

  • Assert: element is not in document's top layer.

  • -
  • Let nestedShow be element's popover showing or hiding. -

  • +
  • Let nestedShow be element's popover showing or + hiding.

  • Set element's popover showing or hiding to true.