From dcf22f0e601cbcf1ed753b77e5412ab5a5aa8504 Mon Sep 17 00:00:00 2001 From: chaals Date: Tue, 24 Apr 2018 17:05:57 +0200 Subject: [PATCH] only select browsing contextt by name within unit of related... First cut at matching Firefox/Chrome implementation fix #262 --- sections/acknowledgements.include | 3 +++ sections/browsers.include | 28 ++++++++++++++-------------- sections/changes.include | 3 +++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sections/acknowledgements.include b/sections/acknowledgements.include index 84be8fe5a9..5a16ba72f1 100644 --- a/sections/acknowledgements.include +++ b/sections/acknowledgements.include @@ -137,6 +137,7 @@ "SelenIT", Shawn Steele, Stéphane Deschamps, + Stephen Cunnliffe, Steve Orvell, Steven Faulkner, Steven Skelton, @@ -149,11 +150,13 @@ Tomek Wytrębowicz, Tomer Cohen, Travis Leithead, + Travis Safford, Trey Shugart, "Unor", "wallabag.it", William Chen, Wolfgang Illmeyer, + Xioran Wang, and Yves Lafon This specification incorporates work of the Web Performance Working Group, the diff --git a/sections/browsers.include b/sections/browsers.include index 924d1e73b0..cc458a2d1c 100644 --- a/sections/browsers.include +++ b/sections/browsers.include @@ -573,33 +573,33 @@
- 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 as part of the execution of a task, + from within a given browsing context context, for a browsing context name name, + are as follows:
    -
  1. If the given browsing context name is the empty string or _self, then +
  2. If name is the empty string or _self, then the chosen browsing context must be the current one.
  3. -
  4. If the given browsing context name is _parent, then the chosen +
  5. If 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.
  6. -
  7. If the given browsing context name is _top, then the chosen browsing +
  8. If 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.
  9. -
  10. 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 +
  11. If name is not _blank and there exists a + browsing context whose name is the same as name, + within the unit of related browsing contexts, 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.
  12. +

    This non-deterministic approach is likely to change in a future version of HTML.

    +
  13. 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 @@ -1215,7 +1215,7 @@
  14. 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 + 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.
  15. @@ -2330,8 +2330,8 @@ Every 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. + popup sandboxing flag set must be empty. It is populated by + the rules for choosing a browsing context. Every nested browsing context has an iframe sandboxing flag set, which is a sandboxing flag set. Which flags in a diff --git a/sections/changes.include b/sections/changes.include index 007269a32e..d0d3d6610d 100644 --- a/sections/changes.include +++ b/sections/changes.include @@ -13,6 +13,9 @@

    Changes since the HTML 5.3 Second Public Working Draft

    +
    Only elect a browsing context by name + from within the unit of related browsing contexts.
    +
    Match Firefox and Blink changes, to mitigate an XSS attack vector.
    Add the :defined psuedo-class selector definition
    Substantive change for custom elements.
    Add autonomous custom elements