From 8e312f213c1b8cc01dbf7bc477166c7e88059142 Mon Sep 17 00:00:00 2001 From: Ehsan Karamad Date: Tue, 30 Apr 2019 18:24:42 -0400 Subject: [PATCH 1/3] Spec change for focus without activation --- source | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source b/source index 9cf4924bd24..02286a2da8a 100644 --- a/source +++ b/source @@ -4395,6 +4395,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • "document-domain", which has a default allowlist of *.
  • +
  • "focus-without-user-activation", which has a default allowlist of *.
  • @@ -53257,6 +53260,11 @@ form.method === input; // => true
  • If target's active sandboxing flag set has the sandboxed automatic features browsing context flag, then return.

  • +
  • If this algorithm is not triggered by user activation and the + policy-controlled feature "focus-without-user-activation" is disabled + in target, return.

  • +
  • If target's origin is not the same as the origin of the node document of the currently focused element in target's top-level browsing context, then @@ -73752,6 +73760,11 @@ END:VCARD

  • If current is null, then return.

  • +
  • If this algorithm is not triggered by user activation and the + policy-controlled feature "focus-without-user-activation" is disabled + in current's active document, return.

  • +
  • Run the focusing steps with current.

  • If current is a top-level browsing context, user agents are @@ -73778,6 +73791,11 @@ END:VCARD

      +
    1. If this algorithm is not triggered by user activation and the + policy-controlled feature "focus-without-user-activation" is disabled + in element's node document, return.

    2. +
    3. If the element is marked as locked for focus, then return.

    4. Mark the element as locked for focus.

    5. @@ -122555,6 +122573,7 @@ INSERT INTERFACES HERE Edward Welbourne, Edward Z. Yang, Ehsan Akhgari, + Ehsan Karamad, Eira Monstad, Eitan Adler, Eli Friedman, From a4d70ee838b3f05de77eaf5f1cfef1f668e1cb4d Mon Sep 17 00:00:00 2001 From: Ehsan Karamad Date: Wed, 8 May 2019 23:29:32 -0400 Subject: [PATCH 2/3] Use the right verbiage for policy --- source | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source b/source index 02286a2da8a..6328e591fa9 100644 --- a/source +++ b/source @@ -53261,9 +53261,9 @@ form.method === input; // => true sandboxed automatic features browsing context flag, then return.

    6. If this algorithm is not triggered by user activation and the - policy-controlled feature "focus-without-user-activation" is disabled - in target, return.

    7. + target is not allowed to use the "focus-without-user-activation", + then return.

    8. If target's origin is not the same as the origin of the node document of the currently @@ -73760,10 +73760,10 @@ END:VCARD

    9. If current is null, then return.

    10. -
    11. If this algorithm is not triggered by user activation and the - policy-controlled feature "focus-without-user-activation" is disabled - in current's active document, return.

    12. +
    13. If this algorithm is not triggered by user activation and + current's active document is not allowed to use "focus-without-user-activation", then + return.

    14. Run the focusing steps with current.

    15. @@ -73791,10 +73791,10 @@ END:VCARD
        -
      1. If this algorithm is not triggered by user activation and the - policy-controlled feature "focus-without-user-activation" is disabled - in element's node document, return.

      2. +
      3. If this algorithm is not triggered by user activation and the element's + node document is not allowed to use "focus-without-user-activation", then + return.

      4. If the element is marked as locked for focus, then return.

      5. From 80db01de5719f8706624108b1e4281ff587ef029 Mon Sep 17 00:00:00 2001 From: Ehsan Karamad Date: Fri, 10 May 2019 12:54:56 -0400 Subject: [PATCH 3/3] use 'allow to use the ... feature' pattern --- source | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source b/source index 6328e591fa9..6ce30cd01d5 100644 --- a/source +++ b/source @@ -53262,7 +53262,7 @@ form.method === input; // => true
      6. If this algorithm is not triggered by user activation and the target is not allowed to use the "focus-without-user-activation", + data-x="focus-without-user-activation-feature">focus-without-user-activation" feature, then return.

      7. If target's origin is not the focus-without-user-activation", then - return.

      8. + current's active document is not allowed to use the "focus-without-user-activation" feature, + then return.

      9. Run the focusing steps with current.

      10. @@ -73792,9 +73792,9 @@ END:VCARD
        1. If this algorithm is not triggered by user activation and the element's - node document is not allowed to use "focus-without-user-activation", then - return.

        2. + node document is not allowed to use the "focus-without-user-activation" feature, + then return.

        3. If the element is marked as locked for focus, then return.