Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: only invoke response's location URL once #6340

Merged
merged 3 commits into from
Feb 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 24 additions & 26 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -84530,14 +84530,17 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface

<li><p>Let <var>finalSandboxFlags</var> be an empty <span>sandboxing flag set</span>.</p></li>

<li><p>Let <var>locationURL</var> be null.</p></li>

<li><p>Let <var>currentURL</var> be <var>request</var>'s <span
data-x="concept-request-current-url">current URL</span>.</p></li>

<li>
<p>While true:</p>

<ol>
<li><p>Let <var>currentURL</var> be <var>response</var>'s <span
data-x="concept-response-location-url">location URL</span>, if <var>response</var> is not null,
and <var>request</var>'s <span data-x="concept-request-current-url">current URL</span>
otherwise.</p></li>
<li><p>If <var>locationURL</var> is non-null, then set <var>currentURL</var> to
<var>locationURL</var>.</p></li>

<li>
<p>If <var>reservedEnvironment</var> is not null and <var>currentURL</var>'s
Expand Down Expand Up @@ -84669,12 +84672,13 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
embedded content against the parent context, not the navigation source.</p>
</li>

<li><p>Set <var>locationURL</var> to <var>response</var>'s <span
data-x="concept-response-location-url">location URL</span>.</p></li>

<li>
<p>If <var>response</var> does not have a <span
data-x="concept-response-location-url">location URL</span> or the <span
data-x="concept-response-location-url">location URL</span> is not a <span>URL</span> whose
<span data-x="concept-url-scheme">scheme</span> is an <span>HTTP(S) scheme</span>,
then <span>break</span>.</p>
<p>If <var>locationURL</var> is not a <span>URL</span> whose <span
data-x="concept-url-scheme">scheme</span> is an <span>HTTP(S) scheme</span>, then
<span>break</span>.</p>

<p class="note">Navigation handles redirects manually as navigation is the only place in
the web platform that cares for redirects to <code data-x="mailto protocol">mailto:</code>
Expand All @@ -84685,31 +84689,25 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
</ol>
</li>

<li><p>If <var>response</var> has a <span data-x="concept-response-location-url">location
URL</span> that is failure, then set <var>response</var> to a <span>network
<li><p>If <var>locationURL</var> is failure, then set <var>response</var> to a <span>network
error</span>.</p></li>

<li><p>Otherwise, if <var>response</var> has a <span
data-x="concept-response-location-url">location URL</span> that is a <span>URL</span> whose <span
<li><p>Otherwise, if <var>locationURL</var> is a <span>URL</span> whose <span
data-x="concept-url-scheme">scheme</span> is "<code data-x="">blob</code>", "<code
data-x="">file</code>", "<code data-x="">filesystem</code>", or "<code
data-x="">javascript</code>", then set <var>response</var> to a network error.</p></li>

<li><p>Otherwise, if <var>response</var> has a <span
data-x="concept-response-location-url">location URL</span> that is a <span>URL</span> whose <span
<li><p>Otherwise, if <var>locationURL</var> is a <span>URL</span> whose <span
data-x="concept-url-scheme">scheme</span> is a <span>fetch scheme</span>, then run
<span>process a navigate fetch</span> with a new <span data-x="concept-request">request</span>
whose <span data-x="concept-request-url">url</span> is <var>response</var>'s <span
data-x="concept-response-location-url">location URL</span>, <var>sourceBrowsingContext</var>,
<var>browsingContext</var>, <var>navigationType</var>, <var>sandboxFlags</var>,
<var>incumbentNavigationOrigin</var>, <var>activeDocumentNavigationOrigin</var>, and
<var>historyHandling</var>, and return.

<li><p>Otherwise, if <var>response</var> has a <span
data-x="concept-response-location-url">location URL</span> that is a <span>URL</span>, run the
<span>process a navigate URL scheme</span> given <var>response</var>'s <span
data-x="concept-response-location-url">location URL</span> and
<var>browsingContext</var>, and return.</p></li>
whose <span data-x="concept-request-url">url</span> is <var>locationURL</var>,
<var>sourceBrowsingContext</var>, <var>browsingContext</var>, <var>navigationType</var>,
<var>sandboxFlags</var>, <var>incumbentNavigationOrigin</var>,
<var>activeDocumentNavigationOrigin</var>, and <var>historyHandling</var>, and return.

<li><p>Otherwise, if <var>locationURL</var> is a <span>URL</span>, run the <span>process a
navigate URL scheme</span> given <var>locationURL</var> and <var>browsingContext</var>, and
return.</p></li>

<li><p>Let <var>navigationParams</var> be a new <span>navigation params</span> whose <span
data-x="navigation-params-request">request</span> is <var>request</var>, <span
Expand Down