diff --git a/source b/source index 1d4de3a60e2..0b76e283e62 100644 --- a/source +++ b/source @@ -56934,7 +56934,8 @@ interface HTMLButtonElement : HTMLElement { validity be false.

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

  • + algorithm given target, false, element, and + element's node document.

  • Otherwise:

    @@ -56961,7 +56962,8 @@ interface HTMLButtonElement : HTMLElement { validity be false.

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

  • + algorithm given target, false, element, and + element's node document.

    @@ -57409,7 +57411,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.

    @@ -66407,6 +66410,10 @@ interface HTMLDialogElement : HTMLElement { method steps are:

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

    2. +
    3. If this has an open attribute and is modal of this is false, then return.

    4. @@ -66441,14 +66448,23 @@ interface HTMLDialogElement : HTMLElement {
    5. Run hide popovers until given document, hideUntil, false, and true.

    6. -
    7. Run the dialog focusing steps given this.

    8. +
    9. 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 +66641,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 +66717,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.

    @@ -66781,7 +66799,8 @@ interface HTMLDialogElement : HTMLElement {
  • If command is the Show Modal state and element does not have an open attribute, then - show a modal dialog given element and source.

  • + show a modal dialog given element, source, and + source's node document.

    @@ -66973,12 +66992,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 subject's node document is not fully active, then + return.

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

    4. + document and focusSetterDocument return false, then return.

    5. Let control be null.

    6. @@ -87402,8 +87424,13 @@ dictionary CommandEventInit : EventInit {
    7. If current is null, then return.

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

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

    12. + data-x="nav-document">active document and focusSetterDocument return false, + then return.

    13. Run the focusing steps with current.

    14. @@ -87430,8 +87457,12 @@ 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. Let focusSetterDocument be the incumbent global object's associated Document.

      4. + +
      5. If the allow focus steps given this's node + document and focusSetterDocument return false, then return.

      6. Run the focusing steps for this.

      7. @@ -87468,8 +87499,8 @@ dictionary CommandEventInit : EventInit {
        -

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

        +

        The allow focus steps, given a Document object target + and a Document object focusSetterDocument, are:

        1. If target is allowed to use the "CommandEventInit : EventInit {

        2. If target's relevant global object has transient activation, then return true.

        3. +
        4. If target is not fully active, then return false.

        5. + +
        6. If running the has focus steps given target returns true, then + return true.

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

        9. + +
        10. If focusSetterDocument's inclusive descendant navigables does not + contain target's node navigable, then + return false.

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

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

        15. + +
        16. If running the has focus steps given focusSetterDocument returns + true, then return true.

        17. +
        18. Return false.

        @@ -87563,8 +87616,8 @@ dictionary CommandEventInit : EventInit {
      8. If target's active sandboxing flag set has the sandboxed automatic features browsing context flag, then return.

      9. -
      10. If the allow focus steps given target return false, then - return.

      11. +
      12. If the allow focus steps given target and target return + false, then return.

      13. Let topDocument be target's node navigable's top-level traversable's active @@ -92218,19 +92271,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 +92529,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 { data-x="dom-togglePopover">togglePopover(options) method steps are:

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

      2. +
      3. Let force be null.

      4. If options is a boolean, set force to options.

      5. @@ -92757,7 +92820,7 @@ dictionary DragEventInit : MouseEventInit { null.

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

      7. + this, true, source, and focusSetterDocument.

      8. 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. + document and focusSetterDocument return false, then return.

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

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

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

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

        7. + 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,