diff --git a/source b/source index 9d1cc3e1a4e..d910c825ed7 100644 --- a/source +++ b/source @@ -19182,32 +19182,11 @@ interface HTMLAnchorElement : HTMLElement {

The activation behavior of a elements that create hyperlinks is to run the following steps:

-
    - +
    1. If the a element's node document is not fully active, then abort these steps.

    2. -
    3. - -

      If the user has not indicated a specific browsing context for following the - link, and the element's target attribute is present, - and applying the rules for choosing a browsing context given a browsing context - name, using the value of the target attribute - as the browsing context name, would result in there not being a chosen browsing context, - then:

      - -
        - -
      1. If there is an entry settings object, throw an - "InvalidAccessError" DOMException.

      2. - -
      3. Abort these steps without following the hyperlink.

      4. - -
      - -
    4. -
    5. If the target of the click event is an img element with an ismap attribute specified, then server-side image map processing must be performed, as follows:

      @@ -19238,12 +19217,11 @@ interface HTMLAnchorElement : HTMLElement {
    6. -
    7. Finally, the user agent must follow the - hyperlink or download the hyperlink created - by the a element, as determined by the download attribute and any expressed user preference, - passing hyperlink suffix, if the steps above defined it.

    8. - +
    9. Follow the hyperlink or download the hyperlink created by the a + element, as determined by the download attribute + and any expressed user preference, passing hyperlink suffix, if the steps above + defined it.

    @@ -22779,34 +22757,25 @@ interface HTMLHyperlinkElementUtils {
  1. Let source be subject's node document's browsing context.

  2. -
  3. - -

    If the user indicated a specific browsing context when following the hyperlink, - or if the user agent is configured to follow hyperlinks by navigating a particular browsing - context, then let target be that browsing context. If this is a new - top-level browsing context (e.g. when the user followed the hyperlink using "Open - in New Tab"), then source must be set as the new browsing context's - one permitted sandboxed navigator.

    +
  4. Let targetAttributeValue be null.

  5. -

    Otherwise, if subject is an a or area element - that has a target attribute, then let target be the browsing context that is chosen by applying the - rules for choosing a browsing context given a browsing context name, using the value of - the target attribute as the browsing context name. If - these rules result in the creation of a new browsing context, set replace to true.

    +
  6. If subject is an a or area element that has a target attribute, then set targetAttributeValue + to that attribute's value.

  7. -

    Otherwise, if target is an a or area element - with no target attribute, but the - Document contains a base element with a target attribute, then let target be the - browsing context that is chosen by applying the rules for choosing a browsing - context given a browsing context name, using the value of the target attribute of the first such base element as - the browsing context name. If these rules result in the creation of a new browsing - context, set replace to true.

    +
  8. Otherwise, if subject is an a or area element with no + target attribute, but subject's node + document contains a base element with a target attribute, then set targetAttributeValue to + the value of target attribute of the first such + base element.

  9. + -

    Otherwise, let target be source.

    +
  10. Let target and replace be the result of applying the rules for + choosing a browsing context given targetAttributeValue and + source.

  11. - +
  12. If target is null, then return.

  13. If subject's link types include the noreferrer or noopener keyword, @@ -38254,37 +38223,14 @@ interface HTMLAreaElement : HTMLElement {

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

    -
      - -
    1. If the area element's node document is not fully active, - then abort these steps.

    2. - -
    3. - -

      If the user has not indicated a specific browsing context for following the - link, and the element's target attribute is present, - and applying the rules for choosing a browsing context given a browsing context - name, using the value of the target attribute - as the browsing context name, would result in there not being a chosen browsing context, - then:

      - -
        - -
      1. If there is an entry settings object, throw an - "InvalidAccessError" DOMException.

      2. - -
      3. Abort these steps without following the hyperlink.

      4. - -
      - -
    4. - -
    5. Otherwise, the user agent must follow the - hyperlink or download the hyperlink created - by the area element, if any, and as determined by the download attribute and any expressed user - preference.

    6. +
        +
      1. If the area element's node document is not fully + active, then abort these steps.

      2. +
      3. Follow the hyperlink or download the hyperlink created by the area + element, if any, and as determined by the download + attribute and any expressed user preference.

      The IDL attributes alt, HTMLLegendElement : HTMLElement {

      The target of an element is the value of the element's formtarget attribute, if the element is a submit button and has such an attribute; or the value of its - form owner's target attribute, if it has - such an attribute; or, if the Document contains a base element with a - target attribute, then the value of the target attribute of the first such base element; or, - if there is no such element, the empty string.

      + form owner's target attribute, if it + has such an attribute; or, if the element's node document contains a + base element with a target attribute, then the + value of the target attribute of the first such + base element; or, if there is no such element, null.

      +
      @@ -55371,18 +55318,15 @@ fur
    7. Let target be the submitter element's target.

    8. -
    9. If the user indicated a specific browsing context to use when submitting the - form, then let target browsing context be that browsing context. - Otherwise, apply the rules for choosing a browsing context given a browsing context - name using target as the name and form browsing - context as the context in which the algorithm is executed, and let target - browsing context be the resulting browsing context.

    10. - -
    11. If target browsing context was created in the previous step, or, - alternatively, if the form document has not yet completely - loaded and the submitted from submit() - method flag is set, then let replace be true. Otherwise, let it be - false.

    12. +
    13. Let target browsing context and replace be the result of applying + the rules for choosing a browsing context using target and form + browsing context.

    14. + +
    15. If target browsing context is null, then return.

    16. + +
    17. If form document has not yet completely loaded and the + submitted from submit() method flag is set, then + set replace to true.

    18. @@ -77883,136 +77827,128 @@ console.assert(iframeWindow.frameElement === null);

      Most of the restrictions on sandboxed browsing contexts are applied by - other algorithms, e.g. the navigation algorithm, not the rules - for choosing a browsing context given a browsing context name given below.

      + other algorithms, e.g. the navigation algorithm, not the + rules for choosing a browsing context given below.


      -

      The rules for choosing a browsing context given a browsing context name are as - follows. The rules assume that they are being applied in the context of a browsing - context, as part of the execution of a task.

      +

      The rules for + choosing a browsing context, given null or a browsing context name + name and a browsing context current, are as follows:

        +
      1. Let chosen be null.

      2. -
      3. - -

        If the given browsing context name is the empty string or _self, then - the chosen browsing context must be the current one.

        +
      4. Let new be false.

      5. - +
      6. If name is the empty string or an ASCII case-insensitive match for + "_self", then set chosen to current.

      7. -
      8. If the given browsing context name is _parent, then the chosen - browsing context must be the parent browsing context of the current one, - unless there isn't one, in which case the chosen browsing context must be the current browsing - context.

      9. +
      10. If name is an ASCII case-insensitive match for "_parent", then set chosen to current's parent + browsing context, if any, and current otherwise.

      11. -
      12. If the given browsing context name is _top, then the chosen browsing - context must be the top-level browsing context of the current one, if there is one, - or else the current browsing context.

      13. +
      14. If name is an ASCII case-insensitive match for "_top", then set chosen to current's top-level + browsing context, if any, and current otherwise.

      15. +

        If name is not an ASCII case-insensitive match for "_blank" and there exists a browsing context whose name is the same as name, and current is + familiar with that browsing context, and the user agent determines that the two + browsing contexts are related enough that it is ok if they reach each other, then set + chosen to that browsing context. If there are multiple matching browsing contexts, + the user agent should set chosen to one in some arbitrary consistent manner, such as + the most recently opened, most recently focused, or more closely related.

        -

        If the given browsing context name is not _blank and there exists a - browsing context whose name is the same as the given - browsing context name, and the current browsing context is familiar with that - browsing context, and the user agent determines that the two browsing contexts are related - enough that it is ok if they reach each other, then that browsing context must be the chosen - one. If there are multiple matching browsing contexts, the user agent should select one in some - arbitrary consistent manner, such as the most recently opened, most recently focused, or more - closely related.

        - +

        This will be made more precise in issue #2126.

      16. -

        Otherwise, a new browsing context is being requested, and what happens depends on the user agent's configuration and abilities — it is determined by the rules given for the first applicable option from the following list:

        - -
        - -

        There is no chosen browsing context. The user agent may inform the user that a popup has - been blocked.

        - -
        +

        The user agent may inform the user that a popup has been blocked.

        -
        If the current browsing context's active document's - active sandboxing flag set has the sandboxed auxiliary navigation browsing - context flag set.
        +
        If current's active document's active + sandboxing flag set has the sandboxed auxiliary navigation browsing context + flag set.
        +

        The user agent may offer the user one of: -

        Typically, there is no chosen browsing context.

        +
          +
        1. Set chosen to a new + top-level browsing context and new to true.

        2. -

          The user agent may offer to create a new top-level browsing context or reuse - an existing top-level browsing context. If the user picks one of those options, - then the designated browsing context must be the chosen one (the browsing context's name isn't - set to the given browsing context name). The default behavior (if the user agent doesn't - offer the option to the user, or if the user declines to allow a browsing context to be used) - must be that there must not be a chosen browsing context.

          +
        3. Set chosen to an existing top-level browsing context.

          +

        If this case occurs, it means that an author has explicitly sandboxed the document that is trying to open a link.

        +

        If the user declines or the user agent doesn't offer the above, the variables + remain unchanged.

        -
        If the user agent has been configured such that in this instance it will create a new browsing context:
        -

        A new auxiliary browsing context must be created, with the opener - browsing context being the current one. If the given browsing context name is not - _blank, then the new auxiliary browsing context's name must be the - given browsing context name (otherwise, it has no name). The chosen browsing context must be - this new browsing context.

        +

        Set chosen to a new + auxiliary browsing context, with the opener browsing context being + current, and set new to true. If name is not an ASCII + case-insensitive match for "_blank", then chosen's + name must be set to name (otherwise, it + has no name).

        If the newly created browsing context is immediately navigated, then the navigation will be done with replacement enabled.

        -
        If the user agent has been configured such that in this instance it will reuse the current - browsing context
        +
        If the user agent has been configured such that in this instance it will reuse + current
        -

        The chosen browsing context is the current browsing context.

        +

        Set chosen to current.

        If the user agent has been configured such that in this instance it will not find a browsing context
        -

        There must not be a chosen browsing context.

        - +

        Do nothing.

        -

        User agent implementors are encouraged to provide a way for users to configure the user agent - to always reuse the current browsing context.

        +

        User agents are encouraged to provide a way for users to configure the user + agent to always reuse current.

        -

        If the chosen browsing context picked above, if any, is a new browsing context, then:

        +

        If new is true, then:

          -
        1. Let flagSet be the current browsing context's active document's +

        2. Let flagSet be current's active document's active sandboxing flag set.

        3. If flagSet's sandboxed navigation browsing context flag is set, - then the current browsing context must be set as the new browsing context's one permitted - sandboxed navigator.

        4. + then current must be set as chosen's one permitted sandboxed + navigator.

        5. If flagSet's sandbox propagates to auxiliary browsing contexts - flag is set, then all the flags that are set in flagSet must be set in the - new browsing context's popup sandboxing flag set.

        6. + flag is set, then all the flags that are set in flagSet must be set in + chosen's popup sandboxing flag set.

        -
      17. +
      18. Return chosen and new.

      @@ -78684,47 +78620,26 @@ callback FrameRequestCallback = void (DOMHighResTimeStamp_blank
      " instead.

    19. +

      Let target browsing context and new be the result of applying + the rules for choosing a browsing context given target and + source browsing context. -

      If the user has indicated a preference for which browsing context to navigate, - follow these substeps:

      - -
        - -
      1. Let target browsing context be the browsing context indicated by - the user.

      2. - -
      3. If target browsing context is a new top-level browsing context, - let the source browsing context be set as target browsing context's - one permitted sandboxed navigator.

      4. - -
      - -

      For example, suppose there is a user agent that supports control-clicking a - link to open it in a new tab. If a user clicks in that user agent on an element whose If there is a user agent that supports control-clicking a link to open it in + a new tab, and the user control-clicks on an element whose onclick handler uses the window.open() API to open a page in an iframe, but, while doing so, - holds the control key down, the user agent could override the selection of the target browsing - context to instead target a new tab.

      - -

      Otherwise, apply the rules for choosing a browsing context given a browsing context - name using target as the name and source browsing context as the - context in which the algorithm is executed. If this results in there not being a chosen browsing - context, then return null. Otherwise, let target browsing context be the - browsing context so obtained.

      - + data-x="dom-open">window.open()
      API to open a page in an iframe, the user + agent could override the selection of the target browsing context to instead target a new + tab.

    20. -
    21. If target browsing context was just created, either as part of the rules - for choosing a browsing context given a browsing context name or due to the user - indicating a preference for navigating a new top-level browsing context, then let - new be true. Otherwise, let it be false.

    22. +
    23. If target browsing context is null, then return null.

    24. Let tokenizedFeatures be the result of tokenizing features.

    25. -
    26. If target browsing context is a new auxiliary browsing context, - then set up browsing context features for target browsing context given - tokenizedFeatures.

    27. +
    28. If new is true, then set up browsing context features for + target browsing context given tokenizedFeatures.

    29. @@ -80397,7 +80312,7 @@ callback FrameRequestCallback = void (DOMHighResTimeStampEvery top-level browsing context has a popup sandboxing flag set, which is a sandboxing flag set. When a browsing context is created, its popup sandboxing flag set must be empty. It is populated by the rules for - choosing a browsing context given a browsing context name.

      + choosing a browsing context.

      Every browsing context that is a nested browsing context has an iframe sandboxing flag set, which is a sandboxing flag set.