From 8e9551669105bcf08dffcb6f9e1cfc0ef5f5d366 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 6 Jan 2025 07:27:38 +0000 Subject: [PATCH 1/7] Editorial: fix typo in textarea cloning steps --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 91a98c390ef..734166989d9 100644 --- a/source +++ b/source @@ -54851,7 +54851,7 @@ interface HTMLTextAreaElement : HTMLElement {

The cloning steps for textarea elements given node, copy, and subtree are to propagate the raw value and dirty - value flag from node to node.

+ value flag from node to copy.

The children changed steps for textarea elements must, if the element's dirty value flag is false, set the element's From 8d2829a075d76841af876732d8e73baedc560f3e Mon Sep 17 00:00:00 2001 From: Shannon Booth <35911232+shannonbooth@users.noreply.github.com> Date: Tue, 7 Jan 2025 04:06:51 +1300 Subject: [PATCH 2/7] Editorial: minor editorial fixes to storage broadcast and remove The remove steps do not return anything, so we do not need to return null. Additionally, the url attribute of StorageEvent is a USVString, so let's initialize the event with the serialization of URL for clarity. --- source | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source b/source index 734166989d9..4b88e013a05 100644 --- a/source +++ b/source @@ -122913,7 +122913,8 @@ interface Storage {

  1. Let thisDocument be storage's relevant global object's associated Document.

  2. -
  3. Let url be thisDocument's URL.

  4. +
  5. Let url be the serialization of + thisDocument's URL.

  6. Let remoteStorages be all Storage objects excluding @@ -123032,7 +123033,7 @@ interface Storage {

    1. If this's map[key] does - not exist, then return null.

    2. + not exist, then return.

    3. Set oldValue to this's map[key].

    4. From 7536a8fa69ce6303c0c2ccbcb93fdc068d0b27f6 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 6 Jan 2025 16:18:29 +0100 Subject: [PATCH 3/7] Editorial: improve fragment parsing This makes the argument order consistent and corrects a false statement about what the XML fragment parser returns. It also generally improves alignment with Infra and other best practices, though it does not improve the actual integration with the parsers. --- source | 223 +++++++++++++++++++++++---------------------------------- 1 file changed, 88 insertions(+), 135 deletions(-) diff --git a/source b/source index 4b88e013a05..6dec90001bf 100644 --- a/source +++ b/source @@ -114897,28 +114897,27 @@ enum DOMParserSupportedType { context and a string markup, are:

        -
      1. Let algorithm be the HTML fragment parsing algorithm.

      2. +
      3. Let algorithm be the HTML fragment parsing algorithm.

      4. -
      5. If context's node document is an XML document, then set algorithm to the XML fragment parsing - algorithm.

      6. +
      7. If context's node document is an XML + document, then set algorithm to the XML fragment parsing + algorithm.

      8. -
      9. Let new children be the result of invoking algorithm given - markup, with context set to - context.

      10. +
      11. Let newChildren be the result of invoking algorithm given + context and markup.

      12. -
      13. Let fragment be a new DocumentFragment whose node - document is context's node document.

      14. +
      15. Let fragment be a new DocumentFragment whose node + document is context's node document.

      16. -
      17. -

        Append each Node in new - children to fragment (in tree order).

        +
      18. +

        For each node of newChildren, in tree order: append node to fragment.

        -

        This ensures the node document for the new nodes is correct.

        -
      19. +

        This ensures the node document for the new nodes is correct.

        + -
      20. Return fragment.

      21. +
      22. Return fragment.

      Element's Parsing HTML fragments -

      The following steps form the HTML fragment parsing algorithm. The algorithm - takes as input an Element node, referred to as the context element, which gives the context for - the parser, input, a string to parse, and an optional boolean - allowDeclarativeShadowRoots (default false). It returns a list of zero or more - nodes.

      - -

      Parts marked fragment case in algorithms in the parser section are - parts that only occur if the parser was created for the purposes of this algorithm. The algorithms have been annotated - with such markings for informational purposes only; such markings have no normative weight. If it - is possible for a condition described as a fragment case to occur even when the - parser wasn't created for the purposes of handling this algorithm, then that is an error in the - specification.

      +

      The HTML fragment parsing algorithm, given an Element node context, string input, and an + optional boolean allowDeclarativeShadowRoots (default false) is the following steps. + They return a list of zero or more nodes.

      + +

      Parts marked fragment case in algorithms in the HTML + parser section are parts that only occur if the parser was created for the purposes of this + algorithm. The algorithms have been annotated with such markings for informational purposes only; + such markings have no normative weight. If it is possible for a condition described as a + fragment case to occur even when the parser wasn't created for the purposes of + handling this algorithm, then that is an error in the specification.

        -
      1. -

        Create a new Document node, and mark it as being an HTML document.

        -
      2. +
      3. Let document be a Document node whose type is "html".

      4. -
      5. -

        If the - node document of the context element is in - quirks mode, then let the Document be in quirks mode. - Otherwise, if the - node document of the context element is in - limited-quirks mode, then let the Document be in limited-quirks - mode. Otherwise, leave the Document in no-quirks mode.

        -
      6. +
      7. If context's node document is + in quirks mode, then set document's mode to "quirks".

      8. -
      9. If allowDeclarativeShadowRoots is true, then set the Document's - allow declarative shadow - roots to true.

      10. +
      11. Otherwise, if context's node + document is in limited-quirks mode, then set document's mode to "limited-quirks".

      12. -
      13. -

        Create a new HTML parser, and associate it with the just created - Document node.

        -
      14. +
      15. If allowDeclarativeShadowRoots is true, then set document's allow declarative shadow roots to + true.

      16. + +
      17. Create a new HTML parser, and associate it with document.

      18. Set the state of the HTML parser's tokenization stage as follows, switching on the context element:

        -
        title
        textarea
        -
        Switch the tokenizer to the RCDATA state.
        -
        style
        xmp
        iframe
        noembed
        noframes
        -
        Switch the tokenizer to the RAWTEXT state.
        -
        script
        -
        Switch the tokenizer to the script data state.
        -
        noscript
        -
        If the scripting flag is enabled, switch the tokenizer to the RAWTEXT state. Otherwise, leave the tokenizer in the data state.
        -
        plaintext
        -
        Switch the tokenizer to the PLAINTEXT state.
        -
        Any other element
        -
        Leave the tokenizer in the data state.
        @@ -134365,35 +134343,29 @@ console.assert(container.firstChild instanceof SuperP); transitions.

      19. -
      20. -

        Let root be a new html element with no attributes.

        -
      21. +
      22. Let root be the result of creating an + element given document, "html", and the HTML + namespace.

      23. -
      24. -

        Append the element root to the Document node created - above.

        -
      25. +
      26. Append root to + document.

      27. -
      28. -

        Set up the parser's stack of open elements so that it contains just the single - element root.

        -
      29. +
      30. Set up the HTML parser's stack of open elements so that it + contains just the single element root.

      31. -
      32. -

        If the context element is a - template element, push "in - template" onto the stack of template insertion modes so that it is the new - current template insertion mode.

        -
      33. +
      34. If context is a template + element, then push "in template" onto the + stack of template insertion modes so that it is the new current template + insertion mode.

      35. Create a start tag token whose name is the local name of context and whose attributes are the attributes of context.

        -

        Let this start tag token be the start tag token of the context node, e.g. for the purposes of determining - if it is an HTML integration point.

        +

        Let this start tag token be the start tag token of context; e.g. for the purposes of determining if it is + an HTML integration point.

      36. @@ -134404,29 +134376,22 @@ console.assert(container.firstChild instanceof SuperP); data-x="concept-frag-parse-context">context element as part of that algorithm.

      37. -
      38. -

        Set the parser's form element pointer to the nearest node to the - context element that is a form - element (going straight up the ancestor chain, and including the element itself, if it is a - form element), if any. (If there is no such form element, the - form element pointer keeps its initial value, null.)

        -
      39. +
      40. Set the HTML parser's form element pointer to the + nearest node to context that is a + form element (going straight up the ancestor chain, and including the element + itself, if it is a form element), if any. (If there is no such form + element, the form element pointer keeps its initial value, + null.)

      41. -
      42. -

        Place the input into the input stream for the HTML - parser just created. The encoding confidence is irrelevant.

        -
      43. +
      44. Place the input into the input stream for the HTML + parser just created. The encoding confidence is irrelevant.

      45. -
      46. -

        Start the parser and let it run until it has consumed all the characters just inserted into - the input stream.

        -
      47. +
      48. Start the HTML parser and let it run until it has consumed all the characters + just inserted into the input stream.

      49. -
      50. -

        Return the child - nodes of root, in tree order.

        -
      51. +
      52. Return root's children, in tree + order.

      @@ -134740,22 +134705,18 @@ console.assert(container.firstChild instanceof SuperP);

      Parsing XML fragments

      -

      The XML fragment parsing algorithm either returns a Document or throws - a "SyntaxError" DOMException. Given a string - input and a context element context, the - algorithm is as follows:

      +

      The XML fragment parsing algorithm given an Element node context and a string input, runs the + following steps. They return a list of nodes.

        -
      1. -

        Create a new XML parser.

        -
      2. +
      3. Create a new XML parser.

      4. -

        Feed the - parser just created the string corresponding to the start tag of the context element, declaring - all the namespace prefixes that are in scope on that element in the DOM, as well as declaring - the default namespace (if any) that is in scope on that element in the DOM.

        +

        Feed the parser just created the string corresponding to the start tag of context, declaring all the namespace prefixes that are + in scope on that element in the DOM, as well as declaring the default namespace (if any) that is + in scope on that element in the DOM.

        A namespace prefix is in scope if the DOM lookupNamespaceURI() method on the element would return a non-null value for that prefix.

        @@ -134763,34 +134724,26 @@ console.assert(container.firstChild instanceof SuperP);

        The default namespace is the namespace for which the DOM isDefaultNamespace() method on the element would return true.

        -

        No - DOCTYPE is passed to the parser, and therefore no external subset is - referenced, and therefore no entities will be recognized.

        -
      5. - -
      6. -

        Feed the parser just created the string input.

        +

        No DOCTYPE is passed to the parser, and therefore no + external subset is referenced, and therefore no entities will be recognized.

      7. -
      8. -

        Feed the parser just created the string corresponding to the end tag of the context element.

        -
      9. +
      10. Feed the parser just created the string input.

      11. -
      12. -

        If there is an XML well-formedness or XML namespace well-formedness error, then throw a - "SyntaxError" DOMException.

        -
      13. +
      14. Feed the parser just created the string corresponding to the end tag of context.

      15. -
      16. -

        If the document element of the resulting Document has any sibling - nodes, then throw a "SyntaxError" DOMException.

        +
      17. If there is an XML well-formedness or XML namespace well-formedness error, then throw a + "SyntaxError" DOMException.

      18. - - +
      19. If the document element of the resulting Document has any + sibling nodes, then throw a "SyntaxError" + DOMException.

      20. + -
      21. Return the child nodes of the document element of the resulting - Document, in tree order.

      22. +
      23. Return the resulting Document node's document element's children, in tree order.

      From 420093b276f51b41ceffaeb180bccc48c84be92e Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 6 Jan 2025 15:46:47 +0100 Subject: [PATCH 4/7] Editorial: fix :target cross-reference Closes #10889. --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 6dec90001bf..5eeed7af23a 100644 --- a/source +++ b/source @@ -74743,7 +74743,7 @@ Demos:
      :target
      -

      For the purposes of the CSS :target +

      For the purposes of the CSS :target pseudo-class, the Document's target elements are a list containing the Document's target element, if it is not null, or containing no elements, if it is. SELECTORS

      From d1c086ac838c8a831f0cf0ba0d8e0cb69f438a84 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 7 Jan 2025 15:39:56 +0000 Subject: [PATCH 5/7] Editorial: correct userNavigationInvolvement -> userInvolvement This was missed in #10818. --- source | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source b/source index 5eeed7af23a..fe547662c0c 100644 --- a/source +++ b/source @@ -103348,9 +103348,8 @@ location.href = '#foo';
    5. Assert: navigationType is not null.

    6. Deactivate - displayedDocument, given userNavigationInvolvement, - targetEntry, navigationType, and - afterPotentialUnloads.

    7. + displayedDocument, given userInvolvement, targetEntry, + navigationType, and afterPotentialUnloads.

  7. From 7a307cdfdee23d28e9c043afd70fe46e27e40d45 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Fri, 10 Jan 2025 08:10:06 -0800 Subject: [PATCH 6/7] Add popover=hint Adds the hint value to the popover attribute. Popovers with popover=hint cant be light dismissed like auto popovers, but there can only be one hint open at a time. See the explainer: https://open-ui.org/components/popover-hint.research.explainer/#popoverhint-behavior. Fixes #9776. --- source | 413 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 330 insertions(+), 83 deletions(-) diff --git a/source b/source index fe547662c0c..53c89f6498a 100644 --- a/source +++ b/source @@ -61865,11 +61865,18 @@ interface HTMLDialogElement : HTMLElement {
  8. Set this's previously focused element to the focused element.

  9. +
  10. Let document be this's node document.

  11. +
  12. Let hideUntil be the result of running topmost popover ancestor - given this, null, and false.

  13. + given this, document's showing hint popover list, null, and + false.

    -
  14. If hideUntil is null, then set hideUntil to this's - node document.

  15. +
  16. If hideUntil is null, then set hideUntil to the result of running + topmost popover ancestor given this, document's + showing auto popover list, null, and false.

  17. + +
  18. If hideUntil is null, then set hideUntil to + document.

  19. Run hide all popovers until given hideUntil, false, and true.

  20. @@ -61958,11 +61965,18 @@ interface HTMLDialogElement : HTMLElement {
  21. Set this's previously focused element to the focused element.

  22. +
  23. Let document be this's node document.

  24. +
  25. Let hideUntil be the result of running topmost popover ancestor - given this, null, and false.

  26. + given this, document's showing hint popover list, null, and + false.

    -
  27. If hideUntil is null, then set hideUntil to this's - node document.

  28. +
  29. If hideUntil is null, then set hideUntil to the result of running + topmost popover ancestor given this, document's + showing auto popover list, null, and false.

  30. + +
  31. If hideUntil is null, then set hideUntil to + document.

  32. Run hide all popovers until given hideUntil, false, and true.

  33. @@ -85527,6 +85541,16 @@ dictionary DragEventInit : MouseEventInit { manual Does not close other popovers; does not light dismiss or respond to close requests. + + + hint + hint + Closes other hint popovers when opened, but not other auto popovers; has light dismiss and responds to close requests. + +

    The attribute's missing value default is the DragEventInit : MouseEventInit { data-x="popover-showing-state">showing

    -

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

    Every HTML element has a popover invoker, which @@ -85565,6 +85589,9 @@ dictionary DragEventInit : MouseEventInit {

    Every HTML element has a popover close watcher, which is a close watcher or null, initially null.

    +

    Every HTML element has an opened in popover + mode, which is a string or null, initially null.

    +

    The following attribute change steps, given element, localName, oldValue, value, and namespace, are used for all HTML elements:

    @@ -85635,6 +85662,8 @@ dictionary DragEventInit : MouseEventInit {
  34. Let nestedShow be element's popover showing or hiding.

  35. +
  36. Let fireEvents be the boolean negation of nestedShow.

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

  39. @@ -85666,22 +85695,87 @@ dictionary DragEventInit : MouseEventInit {
  40. Let shouldRestoreFocus be false.

  41. +
  42. Let originalType be the current state of element's popover attribute.

  43. + +
  44. Let stackToAppendTo be null.

  45. + +
  46. Let autoAncestor be the result of running the topmost popover + ancestor algorithm given element, document's showing auto + popover list, invoker, and true.

  47. + +
  48. Let hintAncestor be the result of running the topmost popover + ancestor algorithm given element, document's showing hint + popover list, invoker, and true.

  49. +
  50. -

    If element's popover attribute is in the auto state, then:

    +

    If originalType is the auto state, + then:

      -
    1. Let originalType be the value of element's popover attribute.

    2. +
    3. Run close entire popover list given document's showing + hint popover list, shouldRestoreFocus, and fireEvents.

    4. Let ancestor be the result of running the topmost popover - ancestor algorithm given element, invoker, and true.

    5. + ancestor algorithm given element, document's showing auto + popover list, invoker, and true.

    6. If ancestor is null, then set ancestor to document.

    7. Run hide all popovers until given - ancestor, false, and not nestedShow.

    8. + ancestor, shouldRestoreFocus, and fireEvents.

      + +
    9. Set stackToAppendTo to "auto".

    10. +
    +
  51. + +
  52. +

    If originalType is the hint state, + then:

    + +
      +
    1. +

      If hintAncestor is not null, then:

      + +
        +
      1. Run hide all popovers until given + hintAncestor, shouldRestoreFocus, and fireEvents.

      2. + +
      3. Set stackToAppendTo to "hint".

      4. +
      +
    2. + +
    3. +

      Otherwise:

      + +
        +
      1. Run close entire popover list given document's showing + hint popover list, shouldRestoreFocus, and fireEvents.

      2. + +
      3. +

        If autoAncestor is not null, then:

        + +
          +
        1. Run hide all popovers until given + autoAncestor, shouldRestoreFocus, and fireEvents.

        2. + +
        3. Set stackToAppendTo to "auto".

        4. +
        +
      4. + +
      5. Otherwise, set stackToAppendTo to "hint".

      6. +
      +
    4. +
    +
  53. + +
  54. +

    If originalType is auto or hint, then:

    + +
      +
    1. Assert: stackToAppendTo is not null.

    2. If originalType is not equal to the value of element's DragEventInit : MouseEventInit {

    3. -

      If the result of running topmost auto popover on document is null, - then set shouldRestoreFocus to true.

      +

      If the result of running topmost auto or hint + popover on document is null, then set shouldRestoreFocus to + true.

      This ensures that focus is returned to the previously-focused element only for the first popover in a stack.

    4. +
    5. +

      If stackToAppendTo is "auto":

      + +
        +
      1. Assert: document's showing auto popover list does + not contain element.

      2. + +
      3. Set element's opened in popover mode to "auto".

      4. +
      + +

      Otherwise:

      + +
        +
      1. Assert: stackToAppendTo is "hint".

      2. + +
      3. Assert: document's showing hint popover list does + not contain element.

      4. + +
      5. Set element's opened in popover mode to "hint".

      6. +
      +
    6. +
    7. Set element's popover close watcher to the result of establishing a close watcher given @@ -85846,7 +85966,8 @@ dictionary DragEventInit : MouseEventInit {

    8. If element's popover attribute is in the auto state, then:

      + data-x="attr-popover-auto-state">auto state or the hint state, then:

      1. Run hide all popovers until given @@ -85905,6 +86026,8 @@ dictionary DragEventInit : MouseEventInit {

      2. Otherwise, remove an element from the top layer immediately given element.

      3. +
      4. Set element's opened in popover mode to null.

      5. +
      6. Set element's popover visibility state to hidden.

      7. @@ -85984,33 +86107,62 @@ dictionary DragEventInit : MouseEventInit {
      8. Let document be endpoint's node document.

      9. +
      10. Assert: endpoint is a Document or + endpoint's popover visibility state is showing.

      11. + +
      12. Assert: endpoint is a Document or + endpoint's popover attribute is in the auto state or endpoint's popover attribute is in the hint state.

      13. +
      14. -

        Let closeAllOpenPopovers be an algorithm which performs the following steps:

        +

        If endpoint is a Document:

          -
        1. Let popover be document's topmost auto - popover.

        2. +
        3. Run close entire popover list given document's showing + hint popover list, focusPreviousElement, and fireEvents.

        4. -
        5. -

          While popover is not null:

          +
        6. Run close entire popover list given document's showing + auto popover list, focusPreviousElement, and fireEvents.

        7. -
            -
          1. Run the hide popover algorithm given popover, - focusPreviousElement, fireEvents, and false.

          2. +
          3. Return.

          4. +
          + -
        8. Set popover to document's topmost auto - popover.

        9. -
        -
      15. +
      16. +

        If document's showing hint popover list contains + endpoint:

        + +
          +
        1. Assert: endpoint's popover + attribute is in the hint state.

        2. + +
        3. Run hide popover stack until given endpoint, + document's showing hint popover list, focusPreviousElement, + and fireEvents.

        4. + +
        5. Return.

      17. -
      18. If endpoint is a Document, then run - closeAllOpenPopovers and return.

      19. +
      20. Run close entire popover list given document's showing hint + popover list, focusPreviousElement, and fireEvents.

      21. + +
      22. If document's showing auto popover list does not contain + endpoint, then return.

      23. -
      24. Assert: endpoint's popover - attribute is in the auto state.

      25. +
      26. Run hide popover stack until given endpoint, document's + showing auto popover list, focusPreviousElement, and + fireEvents.

      27. +
      +

      To hide popover stack until, given an HTML + element element, a list popoverList, a boolean + focusPreviousElement, and a boolean fireEvents:

      + +
      1. Let repeatingHide be false.

      2. @@ -86019,39 +86171,37 @@ dictionary DragEventInit : MouseEventInit {
        1. Let lastToHide be null.

        2. -
        3. Let foundEndpoint be false.

        4. -
        5. -

          For each popover of document's showing auto popover - list:

          +

          For each popover in popoverList:

            -
          1. If popover is endpoint, then set foundEndpoint to - true.

          2. +
          3. If popover is endpoint, then break.

          4. -
          5. Otherwise, if foundEndpoint is true, then set lastToHide to - popover and break.

          6. +
          7. Set lastToHide to popover.

        6. -
        7. If foundEndpoint is false, then run closeAllOpenPopovers and - return.

        8. +
        9. If lastToHide is null, then return.

        10. -

          While lastToHide is not null and lastToHide's popover - visibility state is showing and - document's showing auto popover list is not empty:

          +

          While lastToHide's popover visibility state is showing:

            -
          1. Run the hide popover algorithm given document's showing - auto popover list's last element, focusPreviousElement, - fireEvents, and false.

          2. +
          3. Assert: popoverList is not empty.

          4. + +
          5. Run the hide popover algorithm given the last item in + popoverList, focusPreviousElement, fireEvents, and + false.

        11. -
        12. Set repeatingHide to true if document's showing auto popover - list contains endpoint and document's showing auto popover - list's last element is not endpoint, otherwise false.

        13. +
        14. Assert: repeatingHide is false or popoverList's last + item is endpoint.

        15. + +
        16. Set repeatingHide to true if popoverList contains + endpoint and popoverList's last item is not endpoint, + otherwise false.

        17. If repeatingHide is true, then set fireEvents to false.

        @@ -86066,9 +86216,10 @@ dictionary DragEventInit : MouseEventInit { the popovers that aren't related to the node clicked by the user.

        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.

        + newPopoverOrTopLayerElement, a list popoverList, 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 @@ -86134,8 +86285,7 @@ dictionary DragEventInit : MouseEventInit { document.

      3. -

        For each popover of document's showing auto popover - list:

        +

        For each popover of popoverList:

        1. Set popoverPositions[popover] to @@ -86159,10 +86309,35 @@ dictionary DragEventInit : MouseEventInit {

          1. If candidate is null, then return.

          2. -
          3. Let candidateAncestor be the result of running nearest inclusive open - popover given candidate.

          4. +
          5. Let okNesting be false.

          6. + +
          7. Let candidateAncestor be null.

          8. + +
          9. +

            While okNesting is false:

            + +
              +
            1. Set candidateAncestor to the result of running nearest inclusive open + popover given candidate.

            2. + +
            3. If candidateAncestor is null or popoverPositions does not + contain candidateAncestor, then return.

            4. -
            5. If candidateAncestor is null, then return.

            6. +
            7. Assert: candidateAncestor's popover attribute is not in the manual or none state.

            8. + +
            9. Set okNesting to true if newPopover's popover attribute is in the hint state or candidateAncestor's popover attribute is in the auto state.

            10. + +
            11. If okNesting is false, then set candidate to + candidateAncestor's parent in the flat tree.

            12. +
            +
          10. Let candidatePosition be popoverPositions[candidateAncestor].

          11. @@ -86206,11 +86381,14 @@ dictionary DragEventInit : MouseEventInit {
          12. Return null.

          -

          To find the topmost auto popover given a +

          To find the topmost auto or hint popover given a Document document, perform the following steps. They return an HTML element or null.

            +
          1. If document's showing hint popover list is not empty, then return + document's showing hint popover list's last element.

          2. +
          3. If document's showing auto popover list is not empty, then return document's showing auto popover list's last element.

          4. @@ -86256,8 +86434,8 @@ dictionary DragEventInit : MouseEventInit {
            1. -

              If element's popover attribute is in the - no popover state, then:

              +

              If element's popover attribute is in the no popover state, then:

              1. If throwExceptions is true, then throw a @@ -86318,16 +86496,80 @@ dictionary DragEventInit : MouseEventInit {

                1. Let popovers be « ».

                2. -
                3. For each Element element in - document's top layer: if element's popover attribute is in the auto state and element's popover - visibility state is showing, then append element to popovers.

                4. +
                5. +

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

                  + +
                    +
                  1. +

                    If all of the following are true:

                    + +
                      +
                    • element is an HTML element;

                    • + +
                    • element's opened in popover mode is "auto"; and

                    • + +
                    • element's popover visibility state is showing, +

                    + +

                    then append element to + popovers.

                    +
                  2. +
                  +
                6. Return popovers.

                +

                To get the showing hint popover list for a Document + document:

                + +
                  +
                1. Let popovers be « ».

                2. + +
                3. +

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

                  + +
                    +
                  1. +

                    If all of the following are true:

                    + +
                      +
                    • element is an HTML element;

                    • + +
                    • element's opened in popover mode is "hint"; and

                    • + +
                    • element's popover visibility state is showing, +

                    + +

                    then append element to + popovers.

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

                6. +
                + +

                To close entire popover list given a list popoverList, a + boolean focusPreviouselement, and a boolean fireEvents:

                + +
                  +
                1. +

                  While popoverList is not empty:

                  + +
                    +
                  1. Run the hide popover algorithm given popoverList's last item, + focusPreviousElement, fireEvents, and false.

                  2. +
                  +
                2. +
                +

                The popover target attributes

                Buttons may have the following content attributes:

                @@ -86546,26 +86788,31 @@ dictionary DragEventInit : MouseEventInit {
              2. Let invokerPopover be the result of running nearest inclusive target popover for invoker given node.

              3. -
              4. -

                Let getStackPosition be an algorithm which performs the following steps given - an HTML element popover:

                +
              5. If the result of getting the popover stack + position given clickedPopover is greater than the result of getting the popover stack position given + invokerPopover, then return clickedPopover.

              6. -
                  -
                1. Let popoverList be popover's node document's - showing auto popover list.

                2. +
                3. Return invokerPopover.

                4. +
                -
              7. If popover is in popoverList, then return the index of - popover in popoverList + 1.

              8. +

                To get the popover stack position, given an HTML + element popover:

                -
              9. Return 0.

              10. -
              -
            2. +
                +
              1. Let hintList be popover's node document's showing + hint popover list.

              2. -
              3. If the result of running getStackPosition given clickedPopover is - greater than the result of running getStackPosition given invokerPopover, - then return clickedPopover.

              4. +
              5. Let autoList be popover's node document's showing + auto popover list.

              6. -
              7. Return invokerPopover.

              8. +
              9. If popover is in hintList, then return the index of + popover in hintList + the size of autoList + 1.

              10. + +
              11. If popover is in autoList, then return the index of + popover in autoList + 1.

              12. + +
              13. Return 0.

              To find the nearest inclusive target popover for invoker given a Node From 290e61b1345aed03eb335586c289aecca839cf10 Mon Sep 17 00:00:00 2001 From: jmdyck Date: Mon, 13 Jan 2025 12:02:31 -0500 Subject: [PATCH 7/7] Editorial: insert some serial commas and fix some typos --- source | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source b/source index 53c89f6498a..0c7b65a152d 100644 --- a/source +++ b/source @@ -29189,7 +29189,7 @@ interface HTMLSourceElement : HTMLElement { data-x="dom-source-src">src, type, srcset, sizes and sizes, and media must reflect the respective content attributes of the same name.

              @@ -29606,7 +29606,7 @@ interface HTMLImageElement : HTMLElement {

              The alt, src, srcset and srcset, and sizes IDL attributes must reflect the respective content attributes of the same name.

              @@ -41251,7 +41251,7 @@ interface TimeRanges { zero would have a start equal to zero and an end equal to the duration of the timeline.

              The timelines used by the objects returned by the buffered, seekable and + data-x="dom-media-buffered">buffered, seekable, and played IDL attributes of media elements must be that element's media timeline.

              @@ -56260,7 +56260,7 @@ interface HTMLLegendElement : HTMLElement { default value. If it is false, value mirrors the default value. If it is true, the default value is ignored.

              -

              input, textarea and select elements have a +

              input, textarea, and select elements have a user validity boolean. It is initially set to false.

              To define the behavior of constraint validation in the face of the input @@ -58425,7 +58425,7 @@ MIT Room 32-G524 data-x="attr-fe-autocomplete-country">country" field(s), then the "country-name" field(s) must be filled using a human-readable name for the same country. When a user agent fills in multiple fields at - once, all fields with the same autofill field name, form owner and + once, all fields with the same autofill field name, form owner, and autofill scope must be filled with the same value.

              Suppose a user agent knows of two phone numbers, +1 555 123 1234 and +1 555 666 @@ -115125,7 +115125,7 @@ enum DOMParserSupportedType {

              The fragment serializing algorithm steps, given an Element, - Document or DocumentFragment node and a boolean require + Document, or DocumentFragment node and a boolean require well-formed, are:

                @@ -119070,7 +119070,7 @@ data: test data-x="dom-EventSource-readyState">readyState is CONNECTING, and the object has one or more event listeners registered for open, message or error events, there must + data-x="event-message">message, or error events, there must be a strong reference from the Window or WorkerGlobalScope object that the EventSource object's constructor was invoked from to the EventSource object itself.

                @@ -123239,7 +123239,7 @@ interface Storage {

              The setItem(key, - value) method are:

              + value) method steps are:

              1. Let oldValue be null.

              2. @@ -126915,7 +126915,7 @@ dictionary StorageEventInit : EventInit {

                A character reference is said to be consumed as part of an attribute if the return state is either attribute value (double-quoted) state, - attribute value (single-quoted) state or attribute value (unquoted) + attribute value (single-quoted) state, or attribute value (unquoted) state.

                When a state says to flush code points consumed as a character reference, it means @@ -139615,7 +139615,7 @@ interface HTMLParamElement : HTMLElement { attribute for="HTMLTableElement">frame, summary, rules, and width, IDL attributes of the + for="HTMLTableElement">width IDL attributes of the table element must reflect the respective content attributes of the same name.

                @@ -139659,7 +139659,7 @@ interface HTMLParamElement : HTMLElement {

                The vAlign IDL attribute of the tbody, - thead, and tfoot element must reflect the elements' thead, and tfoot elements must reflect the elements' valign content attributes.