From 21f0e0e0092d847da350ff52716ffc7121d12619 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Tue, 10 Jan 2017 17:10:18 -0500 Subject: [PATCH 1/8] Add activation behavior for Fixes #2246. This also fixes the value that the open attribute is set to to be the empty string, instead of "open", matching existing implementations. --- source | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/source b/source index 27eb7ae8002..1a602cf0ef4 100644 --- a/source +++ b/source @@ -55565,9 +55565,9 @@ interface HTMLDetailsElement : HTMLElement {

The user agent should allow the user to request that the additional information be shown or hidden. To honor a request for the details to be shown, the user agent must set the open attribute on the element to the value open. To honor a request for the information to be hidden, the user agent must - remove the open attribute from the element.

+ data-x="attr-details-open">open attribute on the element to the empty string. To honor a + request for the information to be hidden, the user agent must remove the open attribute from the element.

Whenever the open attribute is added to or removed from a details element, the user agent must queue a task that runs the @@ -55685,6 +55685,35 @@ interface HTMLDetailsElement : HTMLElement { rest of the contents of the summary element's parent details element, if any.

+
+ +

The activation behavior of summary elements is to run the following + steps:

+ +
    +
  1. If the summary element is not being rendered, abort these + steps.

  2. + +
  3. If the summary element has no parent node, abort these steps.

  4. + +
  5. Let parent be the summary element's parent node.

    + +
  6. If parent is not a details element, abort these steps.

    + +
  7. If parent's first element child is not the summary element, abort + these steps.

  8. + +
  9. +

    If the open attribute is present on + parent, remove it. Otherwise, set parent's open attribute to the empty string.

    + +

    This will then run the details notification task steps.

    +
  10. +
+ +
+

The menu element

@@ -72501,6 +72530,9 @@ END:VCARD
  • menuitem elements
  • +
  • summary elements that are the first element child of a details + element
  • +
  • Elements with a draggable attribute set, if that would enable the user agent to allow the user to begin a drag operations for those elements without the use of a pointing device
  • From 0af23ceaf5eba5b7e81a682143aeac8d113c3efb Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 13 Jan 2017 18:34:47 -0500 Subject: [PATCH 2/8] Address review feedback and fix bug It's OK to have previous element siblings, as long as they are not summary elements. That matches the rendering section better (and also Chrome). --- source | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/source b/source index 1a602cf0ef4..12873bff637 100644 --- a/source +++ b/source @@ -55564,11 +55564,18 @@ interface HTMLDetailsElement : HTMLElement { information should be shown.

    The user agent should allow the user to request that the additional information be shown or - hidden. To honor a request for the details to be shown, the user agent must set the set the open attribute on the element to the empty string. To honor a - request for the information to be hidden, the user agent must remove the remove the open attribute from the element.

    +

    This ability to request that additional information be shown or hidden may simply + be the activation behavior of the appropriate summary element, in the + case such an element exists. However, if no such element exists, user agents should still provide + this ability through some other user interface affordance.

    +

    Whenever the open attribute is added to or removed from a details element, the user agent must queue a task that runs the following steps, which are known as the details notification task steps, for this @@ -55691,21 +55698,22 @@ interface HTMLDetailsElement : HTMLElement { steps:

      -
    1. If the summary element is not being rendered, abort these +

    2. If this summary element is not being rendered, abort these steps.

    3. -
    4. If the summary element has no parent node, abort these steps.

    5. +
    6. If this summary element has no parent node, abort these steps.

    7. -
    8. Let parent be the summary element's parent node.

      +
    9. Let parent be this summary element's parent node.

    10. If parent is not a details element, abort these steps.

      -
    11. If parent's first element child is not the summary element, abort - these steps.

    12. +
    13. If parent's first child summary element is not this + summary element, abort these steps.

    14. If the open attribute is present on - parent, remove it. Otherwise, set parent's parent, remove it. Otherwise, + set parent's open attribute to the empty string.

      This will then run the details notification task steps.

      From fe1f47d9d694419dfb55d48cb69a1278f8cfc104 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 13 Jan 2017 18:37:58 -0500 Subject: [PATCH 3/8] Remove being-rendered check --- source | 3 --- 1 file changed, 3 deletions(-) diff --git a/source b/source index 12873bff637..7738b9fc508 100644 --- a/source +++ b/source @@ -55698,9 +55698,6 @@ interface HTMLDetailsElement : HTMLElement { steps:

        -
      1. If this summary element is not being rendered, abort these - steps.

      2. -
      3. If this summary element has no parent node, abort these steps.

      4. Let parent be this summary element's parent node.

        From 85bb4d7f122c10ca916975b5a8c0f26dc524e5c4 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Sat, 14 Jan 2017 12:50:41 +0100 Subject: [PATCH 4/8] Add 'then's --- source | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source b/source index 7738b9fc508..e5fb17bf479 100644 --- a/source +++ b/source @@ -55698,20 +55698,20 @@ interface HTMLDetailsElement : HTMLElement { steps:

          -
        1. If this summary element has no parent node, abort these steps.

        2. +
        3. If this summary element has no parent node, then abort these steps.

        4. Let parent be this summary element's parent node.

          -
        5. If parent is not a details element, abort these steps.

          +
        6. If parent is not a details element, then abort these steps.

        7. If parent's first child summary element is not this - summary element, abort these steps.

        8. + summary element, then abort these steps.

        9. If the open attribute is present on - parent, remove it. Otherwise, - set parent's open attribute to the empty string.

          + parent, then remove it. + Otherwise, set parent's + open attribute to the empty string.

          This will then run the details notification task steps.

        10. From f3dea962381c276a0fd8f01664723735f33f24a5 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 14 Jan 2017 10:13:26 -0500 Subject: [PATCH 5/8] Fix tabindex focus flag suggestion --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index e5fb17bf479..c59fe31f387 100644 --- a/source +++ b/source @@ -72535,8 +72535,8 @@ END:VCARD
        11. menuitem elements
        12. -
        13. summary elements that are the first element child of a details - element
        14. +
        15. summary elements that are the first summary child of a + details element
        16. Elements with a draggable attribute set, if that would enable the user agent to allow the user to begin a drag operations for those elements without From b3f0bc6a078ce4d1401de35fde7541736f6f6105 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 14 Jan 2017 10:15:16 -0500 Subject: [PATCH 6/8] Match wording --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index c59fe31f387..7957a824dc4 100644 --- a/source +++ b/source @@ -72535,7 +72535,7 @@ END:VCARD
        17. menuitem elements
        18. -
        19. summary elements that are the first summary child of a +
        20. summary elements that are the first child summary element of a details element
        21. Elements with a draggable attribute set, if that would From 28590b2e50fa1be675f177c40abae305a640d34e Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Thu, 19 Jan 2017 15:30:58 +0100 Subject: [PATCH 7/8] Disallow interactive content descendants of Fixes #2272. --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 7957a824dc4..d6f46957b5e 100644 --- a/source +++ b/source @@ -55680,8 +55680,8 @@ interface HTMLDetailsElement : HTMLElement {
          Contexts in which this element can be used:
          As the first child of a details element.
          Content model:
          -
          Either: phrasing content.
          -
          Or: one element of heading content.
          +
          Either: phrasing content, but there must be no interactive content descendant.
          +
          Or: one element of heading content, but there must be no interactive content descendant.
          Content attributes:
          Global attributes
          DOM interface:
          From d324ffe044bae27a60449ddf849e392cae9c15b8 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 19 Jan 2017 17:08:01 -0500 Subject: [PATCH 8/8] Revert "Disallow interactive content descendants of " This reverts commit 28590b2e50fa1be675f177c40abae305a640d34e. --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index d6f46957b5e..7957a824dc4 100644 --- a/source +++ b/source @@ -55680,8 +55680,8 @@ interface HTMLDetailsElement : HTMLElement {
          Contexts in which this element can be used:
          As the first child of a details element.
          Content model:
          -
          Either: phrasing content, but there must be no interactive content descendant.
          -
          Or: one element of heading content, but there must be no interactive content descendant.
          +
          Either: phrasing content.
          +
          Or: one element of heading content.
          Content attributes:
          Global attributes
          DOM interface: