@@ -2157,6 +2157,11 @@ Unless stated otherwise, it is false.
21572157
21582158<p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
21592159
2160+ <p> A <a for=/>request</a> has an associated <dfn export for=request>navigation id</dfn>
2161+ (null or a string). Unless stated otherwise, it is null.
2162+
2163+ <p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2164+
21602165<p> A <a for=/>request</a> has an associated boolean <dfn export for=request>render-blocking</dfn> .
21612166Unless stated otherwise, it is false.
21622167
@@ -2198,6 +2203,14 @@ otherwise, it is unset.
21982203<a for=request>done flag</a> , and <a for=request>timing allow failed flag</a> are used as
21992204bookkeeping details by the <a for=/>fetch</a> algorithm.
22002205
2206+ <p> A <a for=/>request</a> has an associated <dfn export for=request id=concept-id>id</dfn>
2207+ which is a unique string automatically set when the <a for=/>request</a> is created.
2208+
2209+ <p class=note> The [=request/id=] is used by WebDriver-BiDi. It remains constant
2210+ across all requests resulting from a redirect of an initial request. When a
2211+ request is [=request/cloned=] , the created request gets a unique
2212+ [=request/id=] . [[!WEBDRIVER-BIDI]]
2213+
22012214<hr>
22022215
22032216<p> A <dfn export>subresource request</dfn> is a <a for=/>request</a>
@@ -2274,7 +2287,9 @@ is to return the result of <a>serializing a request origin</a> with <var>request
22742287
22752288<ol>
22762289 <li><p> Let <var> newRequest</var> be a copy of <var> request</var> , except for its
2277- <a for=request>body</a> .
2290+ <a for=request>body</a> and <a for=request>id</a> .
2291+
2292+ <li><p> Set <var> newRequest</var> 's <a for=request>id</a> to a new unique string.
22782293
22792294 <li><p> If <var> request</var> 's <a for=request>body</a> is non-null, set <var>newRequest</var>' s
22802295 <a for=request>body</a> to the result of <a lt=clone for=body>cloning</a> <var> request</var> 's
@@ -4824,6 +4839,11 @@ steps:
48244839 <a for=request>URL</a> , <var> fetchParams</var> 's <a for="fetch params">request</a>' s
48254840 <a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
48264841 <var> bodyInfo</var> , and <var> responseStatus</var> .
4842+
4843+ <li><p> If <var> response</var> is a <a>network error</a> , run
4844+ the <a>WebDriver BiDi fetch error</a> steps with <var> request</var> . Otherwise
4845+ run the <a>WebDriver BiDi response completed</a> steps with
4846+ <var> request</var> and <var> response</var> .
48274847 </ol>
48284848
48294849 <li>
@@ -5165,6 +5185,13 @@ these steps:
51655185 <a>filtered response</a> ; otherwise to <var> response</var> 's
51665186 <a for="filtered response">internal response</a> .
51675187
5188+ <li><p> Run the [=WebDriver BiDi response started=] steps with
5189+ <var> request</var> and <var> response</var> .
5190+ <!-- Service Workers is responsible for emmitting the WebDriver BiDi
5191+ request events in this case. That's necessary to ensure that the events are
5192+ only generated if the service worker will handle the fetch, and to get the
5193+ correct event ordering in the case of network fallback -->
5194+
51685195 <li>
51695196 <p> If one of the following is true
51705197
@@ -5292,8 +5319,12 @@ these steps:
52925319
52935320 <dt> "<code> follow</code> "
52945321 <dd>
5295- <ol><li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5296- <var> fetchParams</var> and <var> response</var> .</ol>
5322+ <ol>
5323+ <li> Run the <a>WebDriver BiDi response completed</a> steps with <var> request</var> and
5324+ <var> response</var> .
5325+ <li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5326+ <var> fetchParams</var> and <var> response</var> .
5327+ </ol>
52975328 </dl>
52985329 <!-- not resetting internalResponse since it's no longer used anyway -->
52995330 </ol>
@@ -5699,6 +5730,10 @@ run these steps:
56995730 <p class=note> This intentionally does not depend on <var> httpRequest</var> 's
57005731 <a for=request>credentials mode</a> .
57015732
5733+ <!-- After this point the request is not further modified before being either
5734+ retrieved from the cache or sent -->
5735+ <li><p> Run the <a>WebDriver BiDi before request sent</a> steps with <var> request</var> .
5736+
57025737 <li><p> Set <var> httpCache</var> to the result of <a>determining the HTTP cache partition</a> ,
57035738 given <var> httpRequest</var> .
57045739
@@ -5794,6 +5829,8 @@ run these steps:
57945829 <li><p> <a>If aborted</a> , then return the <a for=/>appropriate network error</a> for
57955830 <var> fetchParams</var> .
57965831
5832+ <li><p> If <var> response</var> is not null, run the <a>WebDriver BiDi response
5833+ started</a> steps with <var> request</var> and <var> response</var> .
57975834
57985835 <!-- If response is still null, we require a forwarded request. -->
57995836 <li>
@@ -6057,6 +6094,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
60576094
60586095 <li><p> Wait until all the HTTP response headers are transmitted.
60596096
6097+ <li><p> Run the [=WebDriver BiDi response started=] steps with
6098+ |request| and |response|.
6099+
60606100 <li><p> Let <var> status</var> be the HTTP response's status code.
60616101
60626102 <li>
0 commit comments