From abcc68dd2571d63614ee78d000bd4d2f8ee2ef9a Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Mon, 1 May 2023 13:02:40 -0700 Subject: [PATCH 1/5] Make auto popover list an algorithm Fixes https://github.com/whatwg/html/issues/9036 This patch also fixes a call to topmost auto popover which was passing an element instead of a document. --- source | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/source b/source index 9e11deef691..c619651b2cf 100644 --- a/source +++ b/source @@ -82002,11 +82002,6 @@ dictionary DragEventInit : MouseEventInit { data-x="popover-showing-state">showing

-

The Document has an auto popover list, which is a list of - all the elements in the Document's top layer whose popover attribute is in the auto state, in the same order.

-

The Document has a popover pointerdown target, which is an HTML element or null, initially null.

@@ -82581,6 +82576,25 @@ dictionary DragEventInit : MouseEventInit {
  • Return true.

  • +

    To get the auto popover list for a Document document:

    + +
      +
    1. Let popovers be an empty list.

    2. + +
    3. +

      For each Element element in document's top + layer:

      + +
        +
      1. If element's popover visibility state is showing, then append + element to popovers.

      2. +
      +
    4. + +
    5. Return popovers.

    6. +
    +

    The popover target attributes

    Buttons may have the following content attributes:

    @@ -82757,13 +82771,13 @@ dictionary DragEventInit : MouseEventInit {
  • Let target be event's target.

  • +
  • Let document be target's node document.

  • +
  • Let topmostPopover be the result of running topmost auto popover - given target.

  • + given document.

  • If topmostPopover is null, then return.

  • -
  • Let document be target's node document.

  • -
  • If event is a PointerEvent and event's type is pointerdown, then: set document's popover pointerdown target to the result of running From c2b78222959a2f386391a1d14fe20b304e5827ef Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 2 May 2023 08:55:18 -0700 Subject: [PATCH 2/5] fix auto state check --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index c619651b2cf..caed739f171 100644 --- a/source +++ b/source @@ -82586,9 +82586,9 @@ dictionary DragEventInit : MouseEventInit { layer:

      -
    1. If element's popover visibility state is showing, then append - element to popovers.

    2. +
    3. If element's popover attribute is in the + auto state, then append element to popovers.

  • From 64f58e1cff9b90321badbea194f043f82d917265 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 2 May 2023 10:12:53 -0700 Subject: [PATCH 3/5] use list syntax --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index caed739f171..180588d4600 100644 --- a/source +++ b/source @@ -82579,7 +82579,7 @@ dictionary DragEventInit : MouseEventInit {

    To get the auto popover list for a Document document:

      -
    1. Let popovers be an empty list.

    2. +
    3. Let popovers the list « ».

    4. For each Element element in document's top From 0974bfcce1900024c0bc1aa2431c60479882f693 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Mon, 8 May 2023 10:14:48 -0700 Subject: [PATCH 4/5] change list language --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 20d40d531d1..a708ec74db4 100644 --- a/source +++ b/source @@ -82775,7 +82775,7 @@ dictionary DragEventInit : MouseEventInit {

      To get the auto popover list for a Document document:

        -
      1. Let popovers the list « ».

      2. +
      3. Let popovers be « ».

      4. For each Element element in document's top From 4154b517d517273e89bae5b81b1f67c258123a7f Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 9 May 2023 08:57:36 +0200 Subject: [PATCH 5/5] more nits --- source | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/source b/source index a708ec74db4..647fdd40696 100644 --- a/source +++ b/source @@ -82777,16 +82777,11 @@ dictionary DragEventInit : MouseEventInit {

        1. Let popovers be « ».

        2. -
        3. -

          For each Element element in document's top - layer:

          - -
            -
          1. If element's popover attribute is in the - auto state, then append element to popovers.

          2. -
          -
        4. +
        5. For each Element element in + document's top layer: if element's popover attribute is in the auto state, then append + element to popovers.

        6. Return popovers.