@@ -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 > 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+
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,15 @@ 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
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+
22012215< hr >
22022216
22032217< 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
22742288
22752289< ol >
22762290 < 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.
22782294
22792295 < li > < p > If < var > request</ var > 's < a for =request > body</ a > is non-null, set < var > newRequest</ var > 's
22802296 < 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:
48244840 < a for =request > URL</ a > , < var > fetchParams</ var > 's < a for ="fetch params "> request</ a > 's
48254841 < a for =request > initiator type</ a > , < var > global</ var > , < var > cacheState</ var > ,
48264842 < 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 > .
48274848 </ ol >
48284849
48294850 < li >
@@ -5165,6 +5186,13 @@ these steps:
51655186 < a > filtered response</ a > ; otherwise to < var > response</ var > 's
51665187 < a for ="filtered response "> internal response</ a > .
51675188
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+
51685196 < li >
51695197 < p > If one of the following is true
51705198
@@ -5292,8 +5320,12 @@ these steps:
52925320
52935321 < dt > "< code > follow</ code > "
52945322 < 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 >
52975329 </ dl >
52985330 <!-- not resetting internalResponse since it's no longer used anyway -->
52995331 </ ol >
@@ -5699,6 +5731,10 @@ run these steps:
56995731 < p class =note > This intentionally does not depend on < var > httpRequest</ var > 's
57005732 < a for =request > credentials mode</ a > .
57015733
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+
57025738 < li > < p > Set < var > httpCache</ var > to the result of < a > determining the HTTP cache partition</ a > ,
57035739 given < var > httpRequest</ var > .
57045740
@@ -5794,6 +5830,8 @@ run these steps:
57945830 < li > < p > < a > If aborted</ a > , then return the < a for =/ > appropriate network error</ a > for
57955831 < var > fetchParams</ var > .
57965832
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 > .
57975835
57985836 <!-- If response is still null, we require a forwarded request. -->
57995837 < li >
@@ -6057,6 +6095,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
60576095
60586096 < li > < p > Wait until all the HTTP response headers are transmitted.
60596097
6098+ < li > < p > Run the [=WebDriver BiDi response started=] steps with
6099+ |request| and |response|.
6100+
60606101 < li > < p > Let < var > status</ var > be the HTTP response's status code.
60616102
60626103 < li >
0 commit comments