@@ -2157,6 +2157,11 @@ Unless stated otherwise, it is false.
2157
2157
2158
2158
<p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2159
2159
2160
+ <p> A <a for=/>request</a> has an associated <dfn export for=request>WebDriver 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
+
2160
2165
<p> A <a for=/>request</a> has an associated boolean <dfn export for=request>render-blocking</dfn> .
2161
2166
Unless stated otherwise, it is false.
2162
2167
@@ -2198,6 +2203,15 @@ otherwise, it is unset.
2198
2203
<a for=request>done flag</a> , and <a for=request>timing allow failed flag</a> are used as
2199
2204
bookkeeping details by the <a for=/>fetch</a> algorithm.
2200
2205
2206
+ <p> A <a for=/>request</a> has an associated
2207
+ <dfn export for=request id=concept-webdriver-id>WebDriver id</dfn>
2208
+ which is a unique string automatically set when the <a for=/>request</a> is created.
2209
+
2210
+ <p class=note> The [=request/WebDriver id=] is used by WebDriver-BiDi. It remains constant
2211
+ across all requests resulting from a redirect of an initial request. When a
2212
+ request is [=request/cloned=] , the created request gets a unique
2213
+ [=request/WebDriver id=] . [[!WEBDRIVER-BIDI]]
2214
+
2201
2215
<hr>
2202
2216
2203
2217
<p> A <dfn export>subresource request</dfn> is a <a for=/>request</a>
@@ -2274,7 +2288,9 @@ is to return the result of <a>serializing a request origin</a> with <var>request
2274
2288
2275
2289
<ol>
2276
2290
<li><p> Let <var> newRequest</var> be a copy of <var> request</var> , except for its
2277
- <a for=request>body</a> .
2291
+ <a for=request>body</a> and <a for=request>WebDriver id</a> .
2292
+
2293
+ <li><p> Set <var> newRequest</var> 's <a for=request>WebDriver id</a> to a new unique string.
2278
2294
2279
2295
<li><p> If <var> request</var> 's <a for=request>body</a> is non-null, set <var>newRequest</var>' s
2280
2296
<a for=request>body</a> to the result of <a lt=clone for=body>cloning</a> <var> request</var> 's
@@ -4824,6 +4840,11 @@ steps:
4824
4840
<a for=request>URL</a> , <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4825
4841
<a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
4826
4842
<var> bodyInfo</var> , and <var> responseStatus</var> .
4843
+
4844
+ <li><p> If <var> response</var> is a <a>network error</a> , run
4845
+ the <a>WebDriver BiDi fetch error</a> steps with <var> request</var> . Otherwise
4846
+ run the <a>WebDriver BiDi response completed</a> steps with
4847
+ <var> request</var> and <var> response</var> .
4827
4848
</ol>
4828
4849
4829
4850
<li>
@@ -5165,6 +5186,13 @@ these steps:
5165
5186
<a>filtered response</a> ; otherwise to <var> response</var> 's
5166
5187
<a for="filtered response">internal response</a> .
5167
5188
5189
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
5190
+ <var> request</var> and <var> response</var> .
5191
+ <!-- Service Workers is responsible for emmitting the WebDriver BiDi
5192
+ request events in this case. That's necessary to ensure that the events are
5193
+ only generated if the service worker will handle the fetch, and to get the
5194
+ correct event ordering in the case of network fallback -->
5195
+
5168
5196
<li>
5169
5197
<p> If one of the following is true
5170
5198
@@ -5292,8 +5320,12 @@ these steps:
5292
5320
5293
5321
<dt> "<code> follow</code> "
5294
5322
<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>
5323
+ <ol>
5324
+ <li> Run the <a>WebDriver BiDi response completed</a> steps with <var> request</var> and
5325
+ <var> response</var> .
5326
+ <li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5327
+ <var> fetchParams</var> and <var> response</var> .
5328
+ </ol>
5297
5329
</dl>
5298
5330
<!-- not resetting internalResponse since it's no longer used anyway -->
5299
5331
</ol>
@@ -5699,6 +5731,10 @@ run these steps:
5699
5731
<p class=note> This intentionally does not depend on <var> httpRequest</var> 's
5700
5732
<a for=request>credentials mode</a> .
5701
5733
5734
+ <!-- After this point the request is not further modified before being either
5735
+ retrieved from the cache or sent -->
5736
+ <li><p> Run the <a>WebDriver BiDi before request sent</a> steps with <var> request</var> .
5737
+
5702
5738
<li><p> Set <var> httpCache</var> to the result of <a>determining the HTTP cache partition</a> ,
5703
5739
given <var> httpRequest</var> .
5704
5740
@@ -5794,6 +5830,8 @@ run these steps:
5794
5830
<li><p> <a>If aborted</a> , then return the <a for=/>appropriate network error</a> for
5795
5831
<var> fetchParams</var> .
5796
5832
5833
+ <li><p> If <var> response</var> is not null, run the <a>WebDriver BiDi response
5834
+ started</a> steps with <var> request</var> and <var> response</var> .
5797
5835
5798
5836
<!-- If response is still null, we require a forwarded request. -->
5799
5837
<li>
@@ -6057,6 +6095,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
6057
6095
6058
6096
<li><p> Wait until all the HTTP response headers are transmitted.
6059
6097
6098
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
6099
+ |request| and |response|.
6100
+
6060
6101
<li><p> Let <var> status</var> be the HTTP response's status code.
6061
6102
6062
6103
<li>
0 commit comments