[html5] r8776 - [giow] (3) Try to fix the logic around opening new tabs because the user said so [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Sep 16 13:32:54 PDT 2014
Author: ianh
Date: 2014-09-16 13:32:51 -0700 (Tue, 16 Sep 2014)
New Revision: 8776
Modified:
complete.html
index
source
Log:
[giow] (3) Try to fix the logic around opening new tabs because the user said so, even in sandboxed environments
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26317
Affected topics: DOM APIs, HTML
Modified: complete.html
===================================================================
--- complete.html 2014-09-16 18:50:13 UTC (rev 8775)
+++ complete.html 2014-09-16 20:32:51 UTC (rev 8776)
@@ -13610,8 +13610,8 @@
<ol><li><p>If the <code id=the-a-element:the-a-element-7><a href=#the-a-element>a</a></code> element's <a id=the-a-element:node-document href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> is not <a href=#fully-active id=the-a-element:fully-active>fully active</a>, then abort these steps.<li>
<p>If either the <code id=the-a-element:the-a-element-8><a href=#the-a-element>a</a></code> element has a <code id=the-a-element:attr-hyperlink-download-4><a href=#attr-hyperlink-download>download</a></code> attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-a-element:allowed-to-show-a-popup>allowed
- to show a popup</a>, or the element's <code id=the-a-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code>
- attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-a-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a
+ to show a popup</a>; or, if the user has not indicated a specific <a href=#browsing-context id=the-a-element:browsing-context-2>browsing context</a> for following the link, and the element's <code id=the-a-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code>
+ attribute is present, and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-a-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a
browsing context name</a>, using the value of the <code id=the-a-element:attr-hyperlink-target-5><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would result
in there not being a chosen browsing context, then run these substeps:</p>
@@ -15948,13 +15948,16 @@
<p>If the user indicated a specific <a href=#browsing-context id=following-hyperlinks:browsing-context-2>browsing context</a> when following the hyperlink,
or if the user agent is configured to follow hyperlinks by navigating a particular browsing
- context, then let <var>target</var> be that <a href=#browsing-context id=following-hyperlinks:browsing-context-3>browsing context</a>.</p>
+ context, then let <var>target</var> be that <a href=#browsing-context id=following-hyperlinks:browsing-context-3>browsing context</a>. If this is a new
+ <a href=#top-level-browsing-context id=following-hyperlinks:top-level-browsing-context>top-level browsing context</a> (e.g. when the user followed the hyperlink using "Open
+ in New Tab"), then <var>source</var> must be set as the new <a href=#browsing-context id=following-hyperlinks:browsing-context-4>browsing context</a>'s
+ <a href=#one-permitted-sandboxed-navigator id=following-hyperlinks:one-permitted-sandboxed-navigator>one permitted sandboxed navigator</a>.</p>
<p>Otherwise, if <var>subject</var> is an <code id=following-hyperlinks:the-a-element><a href=#the-a-element>a</a></code> or <code id=following-hyperlinks:the-area-element><a href=#the-area-element>area</a></code> element
- that has a <code id=following-hyperlinks:attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute, then let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-4>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the
+ that has a <code id=following-hyperlinks:attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute, then let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-5>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the
rules for choosing a browsing context given a browsing context name</a>, using the value of
the <code id=following-hyperlinks:attr-hyperlink-target-2><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name. If
- these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-5>browsing context</a>, set <var>replace</var> to true.</p>
+ these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-6>browsing context</a>, set <var>replace</var> to true.</p>
<p>Otherwise, if the hyperlink is a <a href=#rel-sidebar-hyperlink id=following-hyperlinks:rel-sidebar-hyperlink>sidebar
hyperlink</a>, the user agent implements a feature that can be considered a <a href=#secondary-browsing-context id=following-hyperlinks:secondary-browsing-context>secondary
@@ -15964,12 +15967,12 @@
<p>Otherwise, if <var>target</var> is an <code id=following-hyperlinks:the-a-element-2><a href=#the-a-element>a</a></code> or <code id=following-hyperlinks:the-area-element-2><a href=#the-area-element>area</a></code> element
with no <code id=following-hyperlinks:attr-hyperlink-target-3><a href=#attr-hyperlink-target>target</a></code> attribute, but the
<code id=following-hyperlinks:document-2><a href=#document>Document</a></code> contains a <code id=following-hyperlinks:the-base-element><a href=#the-base-element>base</a></code> element with a <code id=following-hyperlinks:attr-base-target><a href=#attr-base-target>target</a></code> attribute, then let <var>target</var> be the
- <a href=#browsing-context id=following-hyperlinks:browsing-context-6>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing
+ <a href=#browsing-context id=following-hyperlinks:browsing-context-7>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing
context given a browsing context name</a>, using the value of the <code id=following-hyperlinks:attr-base-target-2><a href=#attr-base-target>target</a></code> attribute of the first such <code id=following-hyperlinks:the-base-element-2><a href=#the-base-element>base</a></code> element as
- the browsing context name. If these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-7>browsing
+ the browsing context name. If these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-8>browsing
context</a>, set <var>replace</var> to true.</p>
- <p>Otherwise, let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-8>browsing context</a> that <var>subject</var> itself is in.</p>
+ <p>Otherwise, let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-9>browsing context</a> that <var>subject</var> itself is in.</p>
<li><p><a href=#resolve-a-url id=following-hyperlinks:resolve-a-url>Resolve</a> the <a href=#url id=following-hyperlinks:url>URL</a> given by the <code id=following-hyperlinks:attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of that element, relative to that
element.<li>
@@ -15980,13 +15983,13 @@
<p>Otherwise, if <a href=#resolve-a-url id=following-hyperlinks:resolve-a-url-2>resolving</a> the <a href=#url id=following-hyperlinks:url-2>URL</a> failed, the
user agent may report the error to the user in a user-agent-specific manner, may <a href=#queue-a-task id=following-hyperlinks:queue-a-task>queue a
task</a> to <a href=#navigate id=following-hyperlinks:navigate>navigate</a> the <var>target</var>
- <a href=#browsing-context id=following-hyperlinks:browsing-context-9>browsing context</a> to an error page to report the error, or may ignore the error and
+ <a href=#browsing-context id=following-hyperlinks:browsing-context-10>browsing context</a> to an error page to report the error, or may ignore the error and
do nothing. In any case, the user agent must then abort these steps.</p>
<li><p>In the case of server-side image maps, append the <var id=following-hyperlinks:hyperlink-suffix><a href=#hyperlink-suffix>hyperlink
suffix</a></var> to <var>URL</var>.<li>
- <p><a href=#queue-a-task id=following-hyperlinks:queue-a-task-2>Queue a task</a> to <a href=#navigate id=following-hyperlinks:navigate-2>navigate</a> the <var>target</var> <a href=#browsing-context id=following-hyperlinks:browsing-context-10>browsing context</a> to <var>URL</var>. If <var>replace</var> is true, the navigation must be performed with <a href=#replacement-enabled id=following-hyperlinks:replacement-enabled>replacement
+ <p><a href=#queue-a-task id=following-hyperlinks:queue-a-task-2>Queue a task</a> to <a href=#navigate id=following-hyperlinks:navigate-2>navigate</a> the <var>target</var> <a href=#browsing-context id=following-hyperlinks:browsing-context-11>browsing context</a> to <var>URL</var>. If <var>replace</var> is true, the navigation must be performed with <a href=#replacement-enabled id=following-hyperlinks:replacement-enabled>replacement
enabled</a>. The <a href=#source-browsing-context id=following-hyperlinks:source-browsing-context>source browsing context</a> must be <var>source</var>.</p>
</ol>
@@ -27240,7 +27243,7 @@
then abort these steps.<li>
<p>If the <code id=the-area-element:the-area-element-15><a href=#the-area-element>area</a></code> element has a <code id=the-area-element:attr-hyperlink-download-4><a href=#attr-hyperlink-download>download</a></code>
- attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-area-element:allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code id=the-area-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-area-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
+ attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-area-element:allowed-to-show-a-popup>allowed to show a popup</a>; or, if the user has not indicated a specific <a href=#browsing-context id=the-area-element:browsing-context-2>browsing context</a> for following the link, and the element's <code id=the-area-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code> attribute is present, and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-area-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
for choosing a browsing context given a browsing context name</a>, using the value of the
<code id=the-area-element:attr-hyperlink-target-5><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would
result in there not being a chosen browsing context, then run these substeps:</p>
@@ -57644,7 +57647,10 @@
name</a> using the <var>target</var> argument as the name and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing
context</a> of the script as the context in which the algorithm is executed, unless the user
has indicated a preference, in which case the browsing context to navigate may instead be the one
- indicated by the user.</p>
+ indicated by the user, and, if this is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>, the
+ <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a>
+ must be set as the new <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
+ navigator</a></p>
<p class=example>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 <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so, holds
@@ -57652,36 +57658,36 @@
to instead target a new tab.</p>
<p>If applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing context given a browsing context
- name</a> using the <var>target</var> argument would result in there not being a chosen
+ name</a> using the <var>target</var> argument results in there not being a chosen
browsing context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
- steps.</p>
+ steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
<p>Otherwise, if <var>url</var> is not "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>", the user agent must
- <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a> to the
- <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> was just created as part
+ <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> to the
+ <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> was just created as part
of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-3>the rules for choosing a browsing context given a browsing context name</a>, then
<a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled-2>replacement must be enabled</a> also. The navigation must be
- done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings
+ done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
object</a> as the <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a>. If the <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-3>resolve a URL</a>
algorithm failed, then the user agent may either instead <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> to an inline error
page, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled-2>exceptions enabled</a> and using the same replacement behavior and source
browsing context behavior as described earlier in this paragraph; or treat the <var>url</var> as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>", acting as described in the next paragraph.</p>
- <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing
+ <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing
context</a> was just created as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-4>the rules for choosing a browsing context given a
browsing context name</a>, then the user agent must instead <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at the selected
- <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
+ <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
- <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>
+ <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>
that was navigated, or null if no browsing context was navigated.</p>
<hr>
<p>The <dfn id=dom-name><code>name</code></dfn> attribute of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-3><a href=#window>Window</a></code> object
must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the
- <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
- the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a> to the
+ <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
+ the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> to the
new value.</p>
<p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
@@ -57690,27 +57696,27 @@
<hr>
<p>The <dfn id=dom-window-close><code>close()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-4><a href=#window>Window</a></code>
- objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> <var>A</var>:
+ objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var>:
- <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var> is
- <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
- object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the
- <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing
+ <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var> is
+ <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings
+ object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
+ <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-4>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing
context</a> <var>A</var>.</ul>
- <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
+ <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
browsing context</a> that was created by a script (as opposed to by an action of the user), or
- if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
+ if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
only one <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:document><a href=#document>Document</a></code>.</p>
<p>The <dfn id=dom-window-closed><code>closed</code></dfn> attribute on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-5><a href=#window>Window</a></code>
- objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> has
+ objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing context</a> has
been <a href=#a-browsing-context-is-discarded id=apis-for-creating-and-navigating-browsing-contexts-by-name:a-browsing-context-is-discarded>discarded</a>, and false otherwise.</p>
<p>The <dfn id=dom-window-stop><code>stop()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-7><a href=#window>Window</a></code>
- objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing
+ objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
context</a> and that attempt is not currently running the <a href=#unload-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:unload-a-document>unload a document</a>
- algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
+ algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-20>browsing
context</a> of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-8><a href=#window>Window</a></code> object on which it was invoked.</p>
Modified: index
===================================================================
--- index 2014-09-16 18:50:13 UTC (rev 8775)
+++ index 2014-09-16 20:32:51 UTC (rev 8776)
@@ -13610,8 +13610,8 @@
<ol><li><p>If the <code id=the-a-element:the-a-element-7><a href=#the-a-element>a</a></code> element's <a id=the-a-element:node-document href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> is not <a href=#fully-active id=the-a-element:fully-active>fully active</a>, then abort these steps.<li>
<p>If either the <code id=the-a-element:the-a-element-8><a href=#the-a-element>a</a></code> element has a <code id=the-a-element:attr-hyperlink-download-4><a href=#attr-hyperlink-download>download</a></code> attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-a-element:allowed-to-show-a-popup>allowed
- to show a popup</a>, or the element's <code id=the-a-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code>
- attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-a-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a
+ to show a popup</a>; or, if the user has not indicated a specific <a href=#browsing-context id=the-a-element:browsing-context-2>browsing context</a> for following the link, and the element's <code id=the-a-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code>
+ attribute is present, and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-a-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a
browsing context name</a>, using the value of the <code id=the-a-element:attr-hyperlink-target-5><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would result
in there not being a chosen browsing context, then run these substeps:</p>
@@ -15948,13 +15948,16 @@
<p>If the user indicated a specific <a href=#browsing-context id=following-hyperlinks:browsing-context-2>browsing context</a> when following the hyperlink,
or if the user agent is configured to follow hyperlinks by navigating a particular browsing
- context, then let <var>target</var> be that <a href=#browsing-context id=following-hyperlinks:browsing-context-3>browsing context</a>.</p>
+ context, then let <var>target</var> be that <a href=#browsing-context id=following-hyperlinks:browsing-context-3>browsing context</a>. If this is a new
+ <a href=#top-level-browsing-context id=following-hyperlinks:top-level-browsing-context>top-level browsing context</a> (e.g. when the user followed the hyperlink using "Open
+ in New Tab"), then <var>source</var> must be set as the new <a href=#browsing-context id=following-hyperlinks:browsing-context-4>browsing context</a>'s
+ <a href=#one-permitted-sandboxed-navigator id=following-hyperlinks:one-permitted-sandboxed-navigator>one permitted sandboxed navigator</a>.</p>
<p>Otherwise, if <var>subject</var> is an <code id=following-hyperlinks:the-a-element><a href=#the-a-element>a</a></code> or <code id=following-hyperlinks:the-area-element><a href=#the-area-element>area</a></code> element
- that has a <code id=following-hyperlinks:attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute, then let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-4>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the
+ that has a <code id=following-hyperlinks:attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute, then let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-5>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the
rules for choosing a browsing context given a browsing context name</a>, using the value of
the <code id=following-hyperlinks:attr-hyperlink-target-2><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name. If
- these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-5>browsing context</a>, set <var>replace</var> to true.</p>
+ these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-6>browsing context</a>, set <var>replace</var> to true.</p>
<p>Otherwise, if the hyperlink is a <a href=#rel-sidebar-hyperlink id=following-hyperlinks:rel-sidebar-hyperlink>sidebar
hyperlink</a>, the user agent implements a feature that can be considered a <a href=#secondary-browsing-context id=following-hyperlinks:secondary-browsing-context>secondary
@@ -15964,12 +15967,12 @@
<p>Otherwise, if <var>target</var> is an <code id=following-hyperlinks:the-a-element-2><a href=#the-a-element>a</a></code> or <code id=following-hyperlinks:the-area-element-2><a href=#the-area-element>area</a></code> element
with no <code id=following-hyperlinks:attr-hyperlink-target-3><a href=#attr-hyperlink-target>target</a></code> attribute, but the
<code id=following-hyperlinks:document-2><a href=#document>Document</a></code> contains a <code id=following-hyperlinks:the-base-element><a href=#the-base-element>base</a></code> element with a <code id=following-hyperlinks:attr-base-target><a href=#attr-base-target>target</a></code> attribute, then let <var>target</var> be the
- <a href=#browsing-context id=following-hyperlinks:browsing-context-6>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing
+ <a href=#browsing-context id=following-hyperlinks:browsing-context-7>browsing context</a> that is chosen by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=following-hyperlinks:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing
context given a browsing context name</a>, using the value of the <code id=following-hyperlinks:attr-base-target-2><a href=#attr-base-target>target</a></code> attribute of the first such <code id=following-hyperlinks:the-base-element-2><a href=#the-base-element>base</a></code> element as
- the browsing context name. If these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-7>browsing
+ the browsing context name. If these rules result in the creation of a new <a href=#browsing-context id=following-hyperlinks:browsing-context-8>browsing
context</a>, set <var>replace</var> to true.</p>
- <p>Otherwise, let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-8>browsing context</a> that <var>subject</var> itself is in.</p>
+ <p>Otherwise, let <var>target</var> be the <a href=#browsing-context id=following-hyperlinks:browsing-context-9>browsing context</a> that <var>subject</var> itself is in.</p>
<li><p><a href=#resolve-a-url id=following-hyperlinks:resolve-a-url>Resolve</a> the <a href=#url id=following-hyperlinks:url>URL</a> given by the <code id=following-hyperlinks:attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of that element, relative to that
element.<li>
@@ -15980,13 +15983,13 @@
<p>Otherwise, if <a href=#resolve-a-url id=following-hyperlinks:resolve-a-url-2>resolving</a> the <a href=#url id=following-hyperlinks:url-2>URL</a> failed, the
user agent may report the error to the user in a user-agent-specific manner, may <a href=#queue-a-task id=following-hyperlinks:queue-a-task>queue a
task</a> to <a href=#navigate id=following-hyperlinks:navigate>navigate</a> the <var>target</var>
- <a href=#browsing-context id=following-hyperlinks:browsing-context-9>browsing context</a> to an error page to report the error, or may ignore the error and
+ <a href=#browsing-context id=following-hyperlinks:browsing-context-10>browsing context</a> to an error page to report the error, or may ignore the error and
do nothing. In any case, the user agent must then abort these steps.</p>
<li><p>In the case of server-side image maps, append the <var id=following-hyperlinks:hyperlink-suffix><a href=#hyperlink-suffix>hyperlink
suffix</a></var> to <var>URL</var>.<li>
- <p><a href=#queue-a-task id=following-hyperlinks:queue-a-task-2>Queue a task</a> to <a href=#navigate id=following-hyperlinks:navigate-2>navigate</a> the <var>target</var> <a href=#browsing-context id=following-hyperlinks:browsing-context-10>browsing context</a> to <var>URL</var>. If <var>replace</var> is true, the navigation must be performed with <a href=#replacement-enabled id=following-hyperlinks:replacement-enabled>replacement
+ <p><a href=#queue-a-task id=following-hyperlinks:queue-a-task-2>Queue a task</a> to <a href=#navigate id=following-hyperlinks:navigate-2>navigate</a> the <var>target</var> <a href=#browsing-context id=following-hyperlinks:browsing-context-11>browsing context</a> to <var>URL</var>. If <var>replace</var> is true, the navigation must be performed with <a href=#replacement-enabled id=following-hyperlinks:replacement-enabled>replacement
enabled</a>. The <a href=#source-browsing-context id=following-hyperlinks:source-browsing-context>source browsing context</a> must be <var>source</var>.</p>
</ol>
@@ -27240,7 +27243,7 @@
then abort these steps.<li>
<p>If the <code id=the-area-element:the-area-element-15><a href=#the-area-element>area</a></code> element has a <code id=the-area-element:attr-hyperlink-download-4><a href=#attr-hyperlink-download>download</a></code>
- attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-area-element:allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code id=the-area-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-area-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
+ attribute and the algorithm is not <a href=#allowed-to-show-a-popup id=the-area-element:allowed-to-show-a-popup>allowed to show a popup</a>; or, if the user has not indicated a specific <a href=#browsing-context id=the-area-element:browsing-context-2>browsing context</a> for following the link, and the element's <code id=the-area-element:attr-hyperlink-target-4><a href=#attr-hyperlink-target>target</a></code> attribute is present, and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=the-area-element:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
for choosing a browsing context given a browsing context name</a>, using the value of the
<code id=the-area-element:attr-hyperlink-target-5><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would
result in there not being a chosen browsing context, then run these substeps:</p>
@@ -57644,7 +57647,10 @@
name</a> using the <var>target</var> argument as the name and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing
context</a> of the script as the context in which the algorithm is executed, unless the user
has indicated a preference, in which case the browsing context to navigate may instead be the one
- indicated by the user.</p>
+ indicated by the user, and, if this is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>, the
+ <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a>
+ must be set as the new <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
+ navigator</a></p>
<p class=example>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 <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so, holds
@@ -57652,36 +57658,36 @@
to instead target a new tab.</p>
<p>If applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing context given a browsing context
- name</a> using the <var>target</var> argument would result in there not being a chosen
+ name</a> using the <var>target</var> argument results in there not being a chosen
browsing context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
- steps.</p>
+ steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
<p>Otherwise, if <var>url</var> is not "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>", the user agent must
- <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a> to the
- <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> was just created as part
+ <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> to the
+ <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> was just created as part
of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-3>the rules for choosing a browsing context given a browsing context name</a>, then
<a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled-2>replacement must be enabled</a> also. The navigation must be
- done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings
+ done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
object</a> as the <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a>. If the <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-3>resolve a URL</a>
algorithm failed, then the user agent may either instead <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> to an inline error
page, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled-2>exceptions enabled</a> and using the same replacement behavior and source
browsing context behavior as described earlier in this paragraph; or treat the <var>url</var> as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>", acting as described in the next paragraph.</p>
- <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing
+ <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing
context</a> was just created as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-4>the rules for choosing a browsing context given a
browsing context name</a>, then the user agent must instead <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at the selected
- <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
+ <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
- <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>
+ <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>
that was navigated, or null if no browsing context was navigated.</p>
<hr>
<p>The <dfn id=dom-name><code>name</code></dfn> attribute of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-3><a href=#window>Window</a></code> object
must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the
- <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
- the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a> to the
+ <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
+ the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> to the
new value.</p>
<p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
@@ -57690,27 +57696,27 @@
<hr>
<p>The <dfn id=dom-window-close><code>close()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-4><a href=#window>Window</a></code>
- objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> <var>A</var>:
+ objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var>:
- <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var> is
- <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
- object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the
- <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing
+ <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var> is
+ <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings
+ object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
+ <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-4>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing
context</a> <var>A</var>.</ul>
- <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
+ <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
browsing context</a> that was created by a script (as opposed to by an action of the user), or
- if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
+ if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
only one <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:document><a href=#document>Document</a></code>.</p>
<p>The <dfn id=dom-window-closed><code>closed</code></dfn> attribute on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-5><a href=#window>Window</a></code>
- objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> has
+ objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing context</a> has
been <a href=#a-browsing-context-is-discarded id=apis-for-creating-and-navigating-browsing-contexts-by-name:a-browsing-context-is-discarded>discarded</a>, and false otherwise.</p>
<p>The <dfn id=dom-window-stop><code>stop()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-7><a href=#window>Window</a></code>
- objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing
+ objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
context</a> and that attempt is not currently running the <a href=#unload-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:unload-a-document>unload a document</a>
- algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
+ algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-20>browsing
context</a> of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-8><a href=#window>Window</a></code> object on which it was invoked.</p>
Modified: source
===================================================================
--- source 2014-09-16 18:50:13 UTC (rev 8775)
+++ source 2014-09-16 20:32:51 UTC (rev 8776)
@@ -18951,8 +18951,8 @@
<p>If either the <code>a</code> element has a <code
data-x="attr-hyperlink-download">download</code> attribute and the algorithm is not <span>allowed
- to show a popup</span>, or the element's <code data-x="attr-hyperlink-target">target</code>
- attribute is present and applying <span>the rules for choosing a browsing context given a
+ to show a popup</span>; or, if the user has not indicated a specific <span>browsing context</span> for following the link, and the element's <code data-x="attr-hyperlink-target">target</code>
+ attribute is present, and applying <span>the rules for choosing a browsing context given a
browsing context name</span>, using the value of the <code
data-x="attr-hyperlink-target">target</code> attribute as the browsing context name, would result
in there not being a chosen browsing context, then run these substeps:</p>
@@ -21979,7 +21979,10 @@
<p>If the user indicated a specific <span>browsing context</span> when following the hyperlink,
or if the user agent is configured to follow hyperlinks by navigating a particular browsing
- context, then let <var>target</var> be that <span>browsing context</span>.</p>
+ context, then let <var>target</var> be that <span>browsing context</span>. If this is a new
+ <span>top-level browsing context</span> (e.g. when the user followed the hyperlink using "Open
+ in New Tab"), then <var>source</var> must be set as the new <span>browsing context</span>'s
+ <span>one permitted sandboxed navigator</span>.</p>
<p>Otherwise, if <var>subject</var> is an <code>a</code> or <code>area</code> element
that has a <code data-x="attr-hyperlink-target">target</code> attribute, then let <var>target</var> be the <span>browsing context</span> that is chosen by applying <span>the
@@ -35311,8 +35314,8 @@
<li>
<p>If the <code>area</code> element has a <code data-x="attr-hyperlink-download">download</code>
- attribute and the algorithm is not <span>allowed to show a popup</span>, or the element's <code
- data-x="attr-hyperlink-target">target</code> attribute is present and applying <span>the rules
+ attribute and the algorithm is not <span>allowed to show a popup</span>; or, if the user has not indicated a specific <span>browsing context</span> for following the link, and the element's <code
+ data-x="attr-hyperlink-target">target</code> attribute is present, and applying <span>the rules
for choosing a browsing context given a browsing context name</span>, using the value of the
<code data-x="attr-hyperlink-target">target</code> attribute as the browsing context name, would
result in there not being a chosen browsing context, then run these substeps:</p>
@@ -77612,7 +77615,10 @@
name</span> using the <var>target</var> argument as the name and the <span>browsing
context</span> of the script as the context in which the algorithm is executed, unless the user
has indicated a preference, in which case the browsing context to navigate may instead be the one
- indicated by the user.</p>
+ indicated by the user, and, if this is a new <span>top-level browsing context</span>, the
+ <span>responsible browsing context</span> specified by the <span>incumbent settings object</span>
+ must be set as the new <span>browsing context</span>'s <span>one permitted sandboxed
+ navigator</span></p>
<p class="example">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 <code
@@ -77622,9 +77628,9 @@
to instead target a new tab.</p>
<p>If applying <span>the rules for choosing a browsing context given a browsing context
- name</span> using the <var>target</var> argument would result in there not being a chosen
+ name</span> using the <var>target</var> argument results in there not being a chosen
browsing context, then throw an <code>InvalidAccessError</code> exception and abort these
- steps.</p>
+ steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
<p>Otherwise, if <var>url</var> is not "<code>about:blank</code>", the user agent must
<span>navigate</span><!--DONAV window.open()--> the selected <span>browsing context</span> to the
More information about the Commit-Watchers
mailing list