From dd32b3d838fbce739e8e0d1200eaa85db3fef11e Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 2 May 2017 16:14:29 +0200 Subject: [PATCH] Centralize checks for , ,
, and Require that they are all connected to a document that is fully active. There is enough difference between implementations that this appears to be web compatible. Tests: * https://github.com/w3c/web-platform-tests/pull/5758 * https://github.com/w3c/web-platform-tests/pull/5759 * https://github.com/w3c/web-platform-tests/pull/5761 Fixes #2615. --- source | 64 +++++++++++++++++++++++----------------------------------- 1 file changed, 25 insertions(+), 39 deletions(-) diff --git a/source b/source index 0628b9fe1d3..282e343e5bd 100644 --- a/source +++ b/source @@ -13488,19 +13488,10 @@ interface HTMLLinkElement : HTMLElement {

User agents could also include other information, such as the type of the resource (as given by the type attribute).

+

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

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

  2. - -
  3. Follow the hyperlink created by the - link element.

  4. - -
- + data-x="hyperlink">hyperlinks is to follow the + hyperlink created by the link element.

@@ -19360,10 +19351,6 @@ interface HTMLAnchorElement : HTMLElement { data-x="hyperlink">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 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:

    @@ -22935,11 +22922,23 @@ interface HTMLHyperlinkElementUtils {

    Following hyperlinks

    +

    An element element cannot navigate if one of the following is true:

    + +
      +
    • element's node document is not fully active
    • +
    • element is not an a element and is not connected.
    • +
    + +

    This is also used by form submission for + the form element. The exception for a elements is for compatibility with + web content.

    +

    When a user follows a hyperlink created by an element subject, optionally with a hyperlink suffix, the user agent must run the following steps:

      +
    1. If subject cannot navigate, then return.

    2. Let replace be false.

    3. @@ -23038,6 +23037,7 @@ interface HTMLHyperlinkElementUtils { run the following steps:

        +
      1. If subject cannot navigate, then return.

      2. Parse the URL given by subject's href attribute, relative to @@ -38616,18 +38616,12 @@ 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. 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.

        4. -
        + +

        The activation behavior of area elements is to 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, coords,

          -
        1. -

          If form is not connected, then return.

          +
        2. If form cannot navigate, then return.

        3. -

          This check is currently under discussion, and may be - either removed or expanded. See issue - #2615 and issue #2708.

          - - -
        4. Let form document be the form's - node document.

        5. +
        6. Let form document be form's node document.

        7. -
        8. If form document has no associated browsing context, or its active sandboxing flag +

        9. If form document's active sandboxing flag set has its sandboxed forms browsing context flag set, then return.

        10. Let form browsing context be the browsing