@@ -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
@@ -4830,6 +4846,11 @@ steps:
4830
4846
<a for=request>URL</a> , <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4831
4847
<a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
4832
4848
<var> bodyInfo</var> , and <var> responseStatus</var> .
4849
+
4850
+ <li><p> If <var> response</var> is a <a>network error</a> , run
4851
+ the <a>WebDriver BiDi fetch error</a> steps with <var> request</var> . Otherwise
4852
+ run the <a>WebDriver BiDi response completed</a> steps with
4853
+ <var> request</var> and <var> response</var> .
4833
4854
</ol>
4834
4855
4835
4856
<li>
@@ -5171,6 +5192,13 @@ these steps:
5171
5192
<a>filtered response</a> ; otherwise to <var> response</var> 's
5172
5193
<a for="filtered response">internal response</a> .
5173
5194
5195
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
5196
+ <var> request</var> and <var> response</var> .
5197
+ <!-- Service Workers is responsible for emmitting the WebDriver BiDi
5198
+ request events in this case. That's necessary to ensure that the events are
5199
+ only generated if the service worker will handle the fetch, and to get the
5200
+ correct event ordering in the case of network fallback -->
5201
+
5174
5202
<li>
5175
5203
<p> If one of the following is true
5176
5204
@@ -5298,8 +5326,12 @@ these steps:
5298
5326
5299
5327
<dt> "<code> follow</code> "
5300
5328
<dd>
5301
- <ol><li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5302
- <var> fetchParams</var> and <var> response</var> .</ol>
5329
+ <ol>
5330
+ <li> Run the <a>WebDriver BiDi response completed</a> steps with <var> request</var> and
5331
+ <var> response</var> .
5332
+ <li><p> Set <var> response</var> to the result of running <a>HTTP-redirect fetch</a> given
5333
+ <var> fetchParams</var> and <var> response</var> .
5334
+ </ol>
5303
5335
</dl>
5304
5336
<!-- not resetting internalResponse since it's no longer used anyway -->
5305
5337
</ol>
@@ -5705,6 +5737,10 @@ run these steps:
5705
5737
<p class=note> This intentionally does not depend on <var> httpRequest</var> 's
5706
5738
<a for=request>credentials mode</a> .
5707
5739
5740
+ <!-- After this point the request is not further modified before being either
5741
+ retrieved from the cache or sent -->
5742
+ <li><p> Run the <a>WebDriver BiDi before request sent</a> steps with <var> request</var> .
5743
+
5708
5744
<li><p> Set <var> httpCache</var> to the result of <a>determining the HTTP cache partition</a> ,
5709
5745
given <var> httpRequest</var> .
5710
5746
@@ -5800,6 +5836,8 @@ run these steps:
5800
5836
<li><p> <a>If aborted</a> , then return the <a for=/>appropriate network error</a> for
5801
5837
<var> fetchParams</var> .
5802
5838
5839
+ <li><p> If <var> response</var> is not null, run the <a>WebDriver BiDi response
5840
+ started</a> steps with <var> request</var> and <var> response</var> .
5803
5841
5804
5842
<!-- If response is still null, we require a forwarded request. -->
5805
5843
<li>
@@ -6063,6 +6101,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
6063
6101
6064
6102
<li><p> Wait until all the HTTP response headers are transmitted.
6065
6103
6104
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
6105
+ |request| and |response|.
6106
+
6066
6107
<li><p> Let <var> status</var> be the HTTP response's status code.
6067
6108
6068
6109
<li>
0 commit comments