@@ -82092,54 +82092,79 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
82092
82092
data-x="concept-request-origin">origin</span> to that <span>browsing context scope
82093
82093
origin</span>.</p></li>
82094
82094
82095
- <li>
82096
- <p>Create a new <span>environment</span> <var>reservedEnvironment</var>, and set its <span
82097
- data-x="concept-environment-id">id</span> to a new unique opaque string, its <span
82098
- data-x="concept-environment-creation-url">creation URL</span> to <var>request</var>'s
82099
- <span>url</span>, and its <span data-x="concept-environment-target-browsing-context">target
82100
- browsing context</span> to <var>browsingContext</var>.</p>
82095
+ <li><p>Let <var>done</var> be false and <var>reservedEnvironment</var> be null.</p></li>
82101
82096
82102
- <p class="note">The created environment's <span
82103
- data-x="concept-environment-active-service-worker">active service worker</span> is set in the
82104
- <span data-x="on-fetch-request-algorithm">handle fetch</span> algorithm during the fetch if its
82105
- <span data-x="concept-environment-creation-url">creation URL</span> matches a service worker
82106
- registration. <ref spec="SW"></p>
82107
- </li>
82097
+ <li><p>Repeat the following steps until <var>done</var> is true:</p>
82108
82098
82109
- <li><p>Set <var>request</var>'s <span data-x="concept-request-reserved-client">reserved
82110
- client</span> to <var>reservedEnvironment</var>.</p></li>
82099
+ <ol>
82100
+ <li><p>If <var>reservedEnvironment</var> is not null, and <var>response</var>'s <span
82101
+ data-x="concept-response-location-url">location URL</span> does not have the
82102
+ <span>same origin</span> as <var>reservedEnvironment</var>'s <span
82103
+ data-x="concept-environment-creation-url">creation URL</span>, then:</p>
82111
82104
82112
- <li>
82113
- <p>If the <span>Should navigation request of type from source in target be blocked by Content
82114
- Security Policy?</span> algorithm returns "<code data-x="">Blocked</code>" when executed upon
82115
- <var>request</var>, <var>navigationType</var>, <var>sourceBrowsingContext</var>, and
82116
- <var>browsingContext</var>, then set <var>response</var> to a network error.
82117
- <ref spec="CSP"></p>
82105
+ <ol>
82106
+ <li><p>Run the <span>environment discarding steps</span> for <var>reservedEnvironment</var>.
82107
+ </p></li>
82118
82108
82119
- <p>Otherwise:</p>
82109
+ <li><p>Set <var>reservedEnvironment</var> to null.</p></li>
82110
+ </ol>
82111
+ </li>
82120
82112
82121
- <ol>
82122
- <!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>.</p></li>
82113
+ <li><p>If <var>reservedEnvironment</var> is null, let <var>reservedEnvironment</var> be a new
82114
+ <span>environment</span>, and set its <span data-x="concept-environment-id">id</span> to a new
82115
+ unique opaque string, its <span data-x="concept-environment-creation-url">creation URL</span>
82116
+ to <var>request</var>'s <span>url</span>, and its <span
82117
+ data-x="concept-environment-target-browsing-context">target browsing context</span> to
82118
+ <var>browsingContext</var>.</p></li>
82123
82119
82124
- <li><p>Wait for the <span data-x="concept-task">task</span> on the <span>networking task
82125
- source</span> to <span>process response</span> and set <var>response</var> to the
82126
- result.</p></li>
82127
- </ol>
82128
- </li>
82120
+ <li>
82121
+ <p>If <var>response</var> is not null, set <var>reservedEnvironment</var>'s <span
82122
+ data-x="concept-environment-creation-url">creation URL</span> to <var>response</var>'s <span
82123
+ data-x="concept-response-location-url">location URL</span>.</p>
82124
+
82125
+ <p class="note">The created environment's <span
82126
+ data-x="concept-environment-active-service-worker">active service worker</span> is set in the
82127
+ <span data-x="on-fetch-request-algorithm">Handle Fetch</span> algorithm during the fetch if
82128
+ the request URL matches a service worker registration. <ref spec="SW"></p>
82129
+ </li>
82130
+
82131
+ <li><p>Set <var>request</var>'s <span data-x="concept-request-reserved-client">reserved
82132
+ client</span> to <var>reservedEnvironment</var>.</p></li>
82133
+
82134
+ <li><p>If the <span>Should navigation request of type from source in target be blocked by Content
82135
+ Security Policy?</span> algorithm returns "<code data-x="">Blocked</code>" when executed upon
82136
+ <var>request</var>, <var>navigationType</var>, <var>sourceBrowsingContext</var>, and
82137
+ <var>browsingContext</var>, then set <var>response</var> to a network error, and set
82138
+ <var>done</var> to true. <ref spec="CSP"></p></li>
82139
+
82140
+ <li><p>Otherwise:</p>
82141
+ <ol>
82142
+ <li><p>If <var>response</var> is null, <!--FETCH--><span
82143
+ data-x="concept-fetch">fetch</span> <var>request</var>.</p></li>
82129
82144
82145
+ <li><p>Otherwise, perform <span>HTTP-redirect fetch</span> using
82146
+ <var>request</var> and <var>response</var>.</p></li>
82130
82147
82131
- <li id="navigate-redirect-step">
82132
- <p>If <var>response</var> has a <span data-x="concept-response-location-url">location URL</span>
82133
- and it is either failure or a <span>URL</span> whose <span
82134
- data-x="concept-url-scheme">scheme</span> is an <span>HTTP(S) scheme</span>, then set
82135
- <var>response</var> to the result of performing <span>HTTP-redirect fetch</span> using
82136
- <var>request</var> and <var>response</var> and then run this step again.</p>
82148
+ <li><p>Wait for the <span data-x="concept-task">task</span> on the <span>networking task
82149
+ source</span> to <span>process response</span> and set <var>response</var> to the
82150
+ result.</p></li>
82137
82151
82138
- <p class="note">Navigation handles redirects manually as navigation is the only place in the web
82139
- platform that cares for redirects to <code data-x="mailto protocol">mailto:</code> URLs and
82140
- such.</p>
82152
+ <li><p>If <var>response</var> does not have a <span
82153
+ data-x="concept-response-location-url">location URL</span> or the <span
82154
+ data-x="concept-response-location-url">location URL</span> is not a <span>URL</span> whose
82155
+ <span data-x="concept-url-scheme">scheme</span> is an <span>HTTP(S) scheme</span>,
82156
+ then set <var>done</var> to true.</p></li>
82157
+ </ol>
82158
+ </li>
82159
+ <p class="note">Navigation handles redirects manually as navigation is the only place in the web
82160
+ platform that cares for redirects to <code data-x="mailto protocol">mailto:</code> URLs and
82161
+ such.</p>
82162
+ </ol>
82141
82163
</li>
82142
82164
82165
+ <li><p>If <var>response</var> has a <span data-x="concept-response-location-url">location
82166
+ URL</span> that is failure, then set <var>response</var> to a network error.</p></li>
82167
+
82143
82168
<li><p>Otherwise, if <var>response</var> has a <span
82144
82169
data-x="concept-response-location-url">location URL</span> that is a <span>URL</span> whose <span
82145
82170
data-x="concept-url-scheme">scheme</span> is "<code data-x="">blob</code>", "<code
0 commit comments