Skip to content

Commit

Permalink
Use resource info instead of timing info for body sizes
Browse files Browse the repository at this point in the history
Those numbers are per-response and not per-fetch, so they need to be
treated separately.
  • Loading branch information
noamr committed Mar 20, 2022
1 parent 2430830 commit 29057b4
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ <h3>
info=] <a data-dfn-for="PerformanceResourceTiming"><dfn>timing
info</dfn></a>.
</p>
<p>
A <a>PerformanceResourceTiming</a> has an associated [=fetch resource
info=] <a data-dfn-for="PerformanceResourceTiming"><dfn>resource
info</dfn></a>.
</p>
<p>
The <a>PerformanceResourceTiming</a> interface participates in the
<a data-cite=
Expand Down Expand Up @@ -652,13 +657,13 @@ <h3>
</p>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>encodedBodySize</dfn> getter steps are to return
<a>this</a>'s <a data-for="PerformanceResourceTiming">timing
info</a>'s [=fetch timing info/encoded body size=].
<a>this</a>'s <a data-for="PerformanceResourceTiming">resource
info</a>'s [=fetch resource info/encoded body size=].
</p>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>decodedBodySize</dfn> getter steps are to return
<a>this</a>'s <a data-for="PerformanceResourceTiming">timing
info</a>'s [=fetch timing info/decoded body size=].
<a>this</a>'s <a data-for="PerformanceResourceTiming">resource
info</a>'s [=fetch resource info/decoded body size=].
</p>
<p data-dfn-for="PerformanceResourceTiming">
The <dfn>transferSize</dfn> getter steps are to perform the following
Expand All @@ -680,7 +685,7 @@ <h3>
<li>
<p>
Return <a>this</a>'s <a data-for=
"PerformanceResourceTiming">timing info</a>'s [=fetch timing
"PerformanceResourceTiming">resource info</a>'s [=fetch resource
info/encoded body size=] plus 300.
</p>
<p class='note'>
Expand Down Expand Up @@ -1055,16 +1060,16 @@ <h2>
<p>
To <dfn data-export="">mark resource timing</dfn> given a [=/fetch
timing info=] |timingInfo|, a DOMString |requestedURL|, a DOMString
|initiatorType| a <a>global object</a> |global|, and a string
|cacheMode|, perform the following steps:
|initiatorType| a <a>global object</a> |global|, a string
|cacheMode|, and a [=/fetch resource info=] |resourceInfo|, perform the following steps:
</p>
<ol>
<li>Create a <a>PerformanceResourceTiming</a> object |entry| in
|global|'s [=global object/realm=].
</li>
<li>
<a>Setup the resource timing entry</a> for |entry|, given
|initiatorType|, |requestedURL|, |timingInfo|, and |cacheMode|.
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|, and |resourceInfo|.
</li>
<li>
<a data-cite=
Expand All @@ -1081,8 +1086,8 @@ <h2>
To <dfn data-export="">setup the resource timing entry</dfn> for
<a>PerformanceResourceTiming</a> |entry| given DOMString
|initiatorType|, DOMString |requestedURL|, [=/fetch timing info=]
|timingInfo|, and a DOMString |cacheMode|, perform the following
steps:
|timingInfo|, a DOMString |cacheMode|, and a [=fetch resource info=] |resourceInfo|,
perform the following steps:
</p>
<ol>
<li>Assert that |cacheMode| is the empty string or
Expand All @@ -1096,6 +1101,8 @@ <h2>
</li>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">timing
info</a> to |timingInfo|.
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">resource
info</a> to |resourceInfo|.
</li>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">cache
mode</a> to |cacheMode|.
Expand Down

0 comments on commit 29057b4

Please sign in to comment.