@@ -2156,6 +2156,11 @@ Unless stated otherwise, it is false.
2156
2156
2157
2157
<p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2158
2158
2159
+ <p> A <a for=/>request</a> has an associated <dfn export for=request>WebDriver navigation id</dfn>
2160
+ (null or a string). Unless stated otherwise, it is null.
2161
+
2162
+ <p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2163
+
2159
2164
<p> A <a for=/>request</a> has an associated boolean <dfn export for=request>render-blocking</dfn> .
2160
2165
Unless stated otherwise, it is false.
2161
2166
@@ -2197,6 +2202,15 @@ otherwise, it is unset.
2197
2202
<a for=request>done flag</a> , and <a for=request>timing allow failed flag</a> are used as
2198
2203
bookkeeping details by the <a for=/>fetch</a> algorithm.
2199
2204
2205
+ <p> A <a for=/>request</a> has an associated
2206
+ <dfn export for=request id=concept-webdriver-id>WebDriver 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/WebDriver 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/WebDriver id=] . [[!WEBDRIVER-BIDI]]
2213
+
2200
2214
<hr>
2201
2215
2202
2216
<p> A <dfn export>subresource request</dfn> is a <a for=/>request</a>
@@ -2273,7 +2287,9 @@ is to return the result of <a>serializing a request origin</a> with <var>request
2273
2287
2274
2288
<ol>
2275
2289
<li><p> Let <var> newRequest</var> be a copy of <var> request</var> , except for its
2276
- <a for=request>body</a> .
2290
+ <a for=request>body</a> and <a for=request>WebDriver id</a> .
2291
+
2292
+ <li><p> Set <var> newRequest</var> 's <a for=request>WebDriver id</a> to a new unique string.
2277
2293
2278
2294
<li><p> If <var> request</var> 's <a for=request>body</a> is non-null, set <var>newRequest</var>' s
2279
2295
<a for=request>body</a> to the result of <a lt=clone for=body>cloning</a> <var> request</var> 's
@@ -4829,6 +4845,11 @@ steps:
4829
4845
<a for=request>URL</a> , <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4830
4846
<a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
4831
4847
<var> bodyInfo</var> , and <var> responseStatus</var> .
4848
+
4849
+ <li><p> If <var> response</var> is a <a>network error</a> , run
4850
+ the <a>WebDriver BiDi fetch error</a> steps with <var> request</var> . Otherwise
4851
+ run the <a>WebDriver BiDi response completed</a> steps with
4852
+ <var> request</var> and <var> response</var> .
4832
4853
</ol>
4833
4854
4834
4855
<li>
@@ -5170,6 +5191,13 @@ these steps:
5170
5191
<a>filtered response</a> ; otherwise to <var> response</var> 's
5171
5192
<a for="filtered response">internal response</a> .
5172
5193
5194
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
5195
+ <var> request</var> and <var> response</var> .
5196
+ <!-- Service Workers is responsible for emmitting the WebDriver BiDi
5197
+ request events in this case. That's necessary to ensure that the events are
5198
+ only generated if the service worker will handle the fetch, and to get the
5199
+ correct event ordering in the case of network fallback -->
5200
+
5173
5201
<li>
5174
5202
<p> If one of the following is true
5175
5203
@@ -5297,8 +5325,12 @@ these steps:
5297
5325
5298
5326
<dt> "<code> follow</code> "
5299
5327
<dd>
5300
- <ol><li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5301
- <var> fetchParams</var> and <var> response</var> .</ol>
5328
+ <ol>
5329
+ <li> Run the <a>WebDriver BiDi response completed</a> steps with <var> request</var> and
5330
+ <var> response</var> .
5331
+ <li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5332
+ <var> fetchParams</var> and <var> response</var> .
5333
+ </ol>
5302
5334
</dl>
5303
5335
<!-- not resetting internalResponse since it's no longer used anyway -->
5304
5336
</ol>
@@ -5704,6 +5736,10 @@ run these steps:
5704
5736
<p class=note> This intentionally does not depend on <var> httpRequest</var> 's
5705
5737
<a for=request>credentials mode</a> .
5706
5738
5739
+ <!-- After this point the request is not further modified before being either
5740
+ retrieved from the cache or sent -->
5741
+ <li><p> Run the <a>WebDriver BiDi before request sent</a> steps with <var> request</var> .
5742
+
5707
5743
<li><p> Set <var> httpCache</var> to the result of <a>determining the HTTP cache partition</a> ,
5708
5744
given <var> httpRequest</var> .
5709
5745
@@ -5799,6 +5835,8 @@ run these steps:
5799
5835
<li><p> <a>If aborted</a> , then return the <a for=/>appropriate network error</a> for
5800
5836
<var> fetchParams</var> .
5801
5837
5838
+ <li><p> If <var> response</var> is not null, run the <a>WebDriver BiDi response
5839
+ started</a> steps with <var> request</var> and <var> response</var> .
5802
5840
5803
5841
<!-- If response is still null, we require a forwarded request. -->
5804
5842
<li>
@@ -6062,6 +6100,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
6062
6100
6063
6101
<li><p> Wait until all the HTTP response headers are transmitted.
6064
6102
6103
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
6104
+ |request| and |response|.
6105
+
6065
6106
<li><p> Let <var> status</var> be the HTTP response's status code.
6066
6107
6067
6108
<li>
0 commit comments