From cb872fb052357d16dacd38e0c5f2d5a06a497683 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Thu, 23 Sep 2021 15:28:16 +0300 Subject: [PATCH 1/3] Expose a mechanism for hiding internal timing info This is needed for https://github.com/whatwg/html/issues/7104 and later on for https://github.com/whatwg/fetch/issues/1215. Navigation timing reports the timing info from the HTML spec, so it needs a mechanism to obfuscate the internals. So far that obfuscation was internal to fetch and was done upon reporting. --- fetch.bs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fetch.bs b/fetch.bs index a1d323376..dee8b0485 100644 --- a/fetch.bs +++ b/fetch.bs @@ -231,6 +231,12 @@ following items: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
Null or a connection timing info. +

To create an +opaque timing info, given a fetch timing info timingInfo, + create a new fetch timing info whose start time and + post-redirect start time are timingInfo's + start time. +

To update timing info from stored response, given a connection timing info timingInfo and a response response, perform the following steps: @@ -4131,10 +4137,8 @@ steps:

If response's timing allow passed flag is not set, then:

    -
  1. Set timingInfo to a new fetch timing info whose - start time and - post-redirect start time are timingInfo's - start time. +

  2. Set timingInfo to a the result of creating an opaque timing info for + timingInfo.

  3. Set cacheState to the empty string.

From d0858fb0992434d06da05cde85ec929708106c54 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 28 Sep 2021 17:29:08 +0300 Subject: [PATCH 2/3] Update fetch.bs Co-authored-by: Anne van Kesteren --- fetch.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index dee8b0485..337270b4b 100644 --- a/fetch.bs +++ b/fetch.bs @@ -233,7 +233,7 @@ following items: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]

To create an opaque timing info, given a fetch timing info timingInfo, - create a new fetch timing info whose start time and + return a new fetch timing info whose start time and post-redirect start time are timingInfo's start time. From d6889b0da88e61e5fdbe03cbe9e3ac582fd46d2b Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 28 Sep 2021 17:32:59 +0300 Subject: [PATCH 3/3] Nits --- fetch.bs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fetch.bs b/fetch.bs index 337270b4b..cfaaf6693 100644 --- a/fetch.bs +++ b/fetch.bs @@ -231,11 +231,12 @@ following items: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]

Null or a connection timing info. -

To create an -opaque timing info, given a fetch timing info timingInfo, - return a new fetch timing info whose start time and - post-redirect start time are timingInfo's - start time. +

To +create an opaque timing info, +given a fetch timing info timingInfo, return a new +fetch timing info whose start time and +post-redirect start time are timingInfo's +start time.

To update timing info from stored response, given a connection timing info timingInfo and a response