diff --git a/source b/source index 1d4de3a60e2..6a98c80c634 100644 --- a/source +++ b/source @@ -56881,6 +56881,9 @@ interface HTMLButtonElement : HTMLElement {

If target is not null:

    +
  1. Let focusSetterDocument be element's node + document.

  2. +
  3. Let command be element's command attribute.

  4. @@ -56934,7 +56937,8 @@ interface HTMLButtonElement : HTMLElement { validity be false.

  5. If validity is true, then run the show popover - algorithm given target, false, and element.

  6. + algorithm given target, false, element, and + focusSetterDocument.

  7. Otherwise:

    @@ -56961,14 +56965,15 @@ interface HTMLButtonElement : HTMLElement { validity be false.

  8. If validity is true, then run the show popover - algorithm given target, false, and element.

  9. + algorithm given target, false, element, and + focusSetterDocument.

  • Otherwise, if this standard defines command steps for target's local name, then run the corresponding command steps given target, element, - and command.

  • + command, and focusSetterDocument.

    @@ -57409,7 +57414,8 @@ interface HTMLSelectElement : HTMLElement { data-x="dom-MouseEvent-button">button attribute is not 0, then return.

  • Run the show popover algorithm given select's select - popover, false, and select.

  • + popover, false, select, and select's node + document.

    @@ -66413,6 +66419,10 @@ interface HTMLDialogElement : HTMLElement {
  • If this has an open attribute, then throw an "InvalidStateError" DOMException.

  • +
  • Let focusSetterDocument be the incumbent global object's associated Document.

  • +
  • If the result of firing an event named beforetoggle, using ToggleEvent, with the cancelable attribute initialized to true, the HTMLDialogElement : HTMLElement {

  • Run hide popovers until given document, hideUntil, false, and true.

  • -
  • Run the dialog focusing steps given this.

  • +
  • Run the dialog focusing steps given this and + focusSetterDocument.

  • The showModal() method steps are to show a modal - dialog given this and null.

    + data-x="dom-dialog-showModal">showModal()
    method steps are:

    + +
      +
    1. Let focusSetterDocument be the incumbent global object's associated Document.

    2. + +
    3. Show a modal dialog given this, null, and + focusSetterDocument.

    4. +
    @@ -66625,8 +66644,9 @@ interface HTMLDialogElement : HTMLElement {
    -

    To show a modal dialog given a dialog element subject and an - Element or null source:

    +

    To show a modal dialog given a dialog element subject, an + Element or null source, and a Document + focusSetterDocument:

    1. If subject has an open attribute and @@ -66700,7 +66720,8 @@ interface HTMLDialogElement : HTMLElement {

    2. Run hide popovers until given document, hideUntil, false, and true.

    3. -
    4. Run the dialog focusing steps given subject.

    5. +
    6. Run the dialog focusing steps given subject and + focusSetterDocument.

    @@ -66758,8 +66779,9 @@ interface HTMLDialogElement : HTMLElement {

    The command steps for dialog elements, given an element - element, an element source, and a command attribute command, are:

    + element, an element source, a command attribute command, and a + Document focusSetterDocument, are:

    1. If element is in the HTMLDialogElement : HTMLElement {

    2. If command is the Show Modal state and element does not have an open attribute, then - show a modal dialog given element and source.

    3. + show a modal dialog given element, source, and + focusSetterDocument.

    @@ -66973,12 +66996,15 @@ interface HTMLDialogElement : HTMLElement {
    -

    The dialog focusing steps, given a dialog element subject, - are as follows:

    +

    The dialog focusing steps, given a dialog element subject + and a Document focusSetterDocument, are as follows:

      -
    1. If the allow focus steps given subject's node - document return false, then return.

    2. +
    3. If subject's node document is not fully active, then + return.

    4. + +
    5. If the allow focus steps given focusSetterDocument return false, + then return.

    6. Let control be null.

    7. @@ -87402,8 +87428,15 @@ dictionary CommandEventInit : EventInit {
    8. If current is null, then return.

    9. -
    10. If the allow focus steps given current's active document return false, then return.

    11. +
    12. If current's active document is not + fully active, then return.

    13. + +
    14. Let focusSetterDocument be the incumbent global object's associated Document.

    15. + +
    16. If the allow focus steps given focusSetterDocument return false, + then return.

    17. Run the focusing steps with current.

    18. @@ -87430,8 +87463,15 @@ dictionary CommandEventInit : EventInit { data-x="dom-focus">focus(options) method steps are:

        -
      1. If the allow focus steps given this's node document - return false, then return.

      2. +
      3. If this's node document is not fully active, then + return.

      4. + +
      5. Let focusSetterDocument be the incumbent global object's associated Document.

      6. + +
      7. If the allow focus steps given focusSetterDocument return false, + then return.

      8. Run the focusing steps for this.

      9. @@ -87469,17 +87509,21 @@ dictionary CommandEventInit : EventInit {

        The allow focus steps, given a Document object - target, are:

        + focusSetterDocument, are:

          -
        1. If target is allowed to use the "

          If focusSetterDocument is not fully active, then return + false.

        2. + +
        3. If focusSetterDocument is allowed to use the "focus-without-user-activation" feature, then return true.

        4. -
        5. If target's relevant global object has transient - activation, then return true.

        6. +
        7. If focusSetterDocument's relevant global object has + transient activation, then return true.

        8. -
        9. Return false.

        10. +
        11. Return the result of running the has focus steps given + focusSetterDocument.

        @@ -87638,6 +87682,9 @@ dictionary CommandEventInit : EventInit {
      10. Remove element from candidates.

      11. +
      12. If the allow focus steps given doc return false, then + continue.

      13. +
      14. Let inclusiveAncestorDocuments be a list consisting of the active document of doc's inclusive ancestor navigables.

      15. @@ -92218,19 +92265,24 @@ dictionary DragEventInit : MouseEventInit { data-x="dom-showPopover">showPopover(options)
        method steps are:

          +
        1. Let focusSetterDocument be the incumbent global object's associated Document.

        2. +
        3. Let source be options["source"] if it exists; otherwise, null.

        4. -
        5. Run show popover given this, true, and - source.

        6. +
        7. Run show popover given this, true, source, and + focusSetterDocument.

    To show popover, given an HTML element - element, a boolean throwExceptions, and an HTML - element or null source:

    + element, a boolean throwExceptions, an HTML + element or null source, and a Document + focusSetterDocument:

    1. Let document be element's node document.

    2. @@ -92471,7 +92523,8 @@ dictionary DragEventInit : MouseEventInit {
    3. Set element's implicit anchor element to source.

    4. -
    5. Run the popover focusing steps given element.

    6. +
    7. Run the popover focusing steps given element and + focusSetterDocument.

    8. If shouldRestoreFocus is true and element's popover attribute is not in the DragEventInit : MouseEventInit { the hide popover algorithm given this, true, true, true, and null.

    9. -
    10. Otherwise, if force is null or true, then run show popover given - this, true, and source.

    11. +
    12. +

      Otherwise, if force is null or true:

      + +
        +
      1. Let focusSetterDocument be the incumbent global object's associated Document.

      2. + +
      3. Run show popover given this, true, source, and + focusSetterDocument.

      4. +
      +
    13. Otherwise:

      @@ -93002,14 +93065,15 @@ dictionary DragEventInit : MouseEventInit {

      To perform the popover focusing steps for an HTML - element subject:

      + element subject and a Document + focusSetterDocument:

        -
      1. If the allow focus steps given subject's node - document return false, then return.

      2. +
      3. If the allow focus steps given focusSetterDocument return false, + then return.

      4. If subject is a dialog element, then run the dialog focusing - steps given subject and return.

      5. + steps given subject and focusSetterDocument, and return.

      6. If subject has the autofocus attribute, then let control be subject. @@ -93292,7 +93356,8 @@ dictionary DragEventInit : MouseEventInit { validity be false.

      7. If validity is true, then run show popover given - popover, false, and node.

      8. + popover, false, node, and node's node + document.

    @@ -162133,6 +162198,7 @@ INSERT INTERFACES HERE Félix Sanz, Felix Sasaki, Fernando Altomare Serboncini, + Fernando Fiori, Forbes Lindesay, Francesco Schwarz, Francis Brosnan Blazquez,