Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report iframe & frame resource timing #7531

Merged
merged 17 commits into from
Mar 30, 2022
86 changes: 73 additions & 13 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -31298,11 +31298,21 @@ interface <dfn interface>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
document</span> is not <span>completely loaded</span>, then set <var>historyHandling</var> to
"<code data-x="hh-replace">replace</code>".</p></li>

<li><p>Let <var>reportFrameTiming</var> be the following
step given <span data-x="concept-response">response</span> <var>response</var>:
<span>queue an element task</span> on the <span>networking task source</span> given
<var>element</var>'s <span>node document</span>'s <span>relevant global object</span> to
<span>finalize and report timing</span> given <var>response</var>, <var>element</var>'s
<span>node document</span>'s <span>relevant global object</span>, and <var>element</var>'s
<span data-x="concept-element-local-name">local name</span>.</p></li>

<li><p><span>Navigate</span><!--DONAV iframe or frame--> <var>element</var>'s <span>nested
browsing context</span> to <var>resource</var>, with <var
data-x="navigation-hh">historyHandling</var> set to <var>historyHandling</var> and the
data-x="navigation-hh">historyHandling</var> set to <var>historyHandling</var>, the
<span>source browsing context</span> set to <var>element</var>'s <span>node document</span>'s
<span data-x="concept-document-bc">browsing context</span>.</p></li>
<span data-x="concept-document-bc">browsing context</span>, and
<var data-x="navigation-process-end-of-body">processResponseEndOfBody</var> set to
<var>reportFrameTiming</var>.</p></li>
</ol>

<!-- see also the note near similar text for the location.assign() method -->
Expand Down Expand Up @@ -87914,6 +87924,10 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
redirects</dfn></dt>
<dd>a boolean</dd>

<dt><dfn data-x="navigation-params-process-response-end-of-body">process response end of
body</dfn></dt>
<dd>An algorithm expecting a <span data-x="concept-response">response</span></dd>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<dt><dfn data-x="navigation-params-unsafe-start-time">unsafe start time</dfn></dt>
<dd>a number, representing a value of the <span>unsafe shared current time</span> when the
navigation has started</dd>
Expand Down Expand Up @@ -87964,8 +87978,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="hh-default">default</code>"), an optional <span>policy container</span>-or-null <dfn
data-x="navigation-historypolicycontainer">historyPolicyContainer</dfn> (default null), an
optional string <dfn data-x="navigation-navigationtype"><var>navigationType</var></dfn> (default
"<code data-x="">other</code>"), and an optional <span data-x="navigation-id">navigation id</span>
<dfn data-x="navigation-navigationid"><var>navigationId</var></dfn> (default null):</p>
"<code data-x="">other</code>"), an optional <span data-x="navigation-id">navigation id</span>
<dfn data-x="navigation-navigationid"><var>navigationId</var></dfn> (default null), and an
optional <dfn data-x="navigation-process-end-of-body"><var>processResponseEndOfBody</var></dfn>,
which is an algorithm receiving a <span data-x="concept-response">response</span> (default
an algorithm that does nothing):</p>

<ol>
<li><p>Let <var>unsafeNavigationStartTime</var> be the <span>unsafe shared current time</span>.</p></li>
Expand Down Expand Up @@ -88218,8 +88235,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="navigation-params-reserved-environment">reserved environment</span> is null, <span
data-x="navigation-params-browsing-context">browsing context</span> is
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
<var>historyHandling</var>, <span data-x="navigation-params-unsafe-start-time">unsafe start
time</span> is <var>unsafeNavigationStartTime</var>, and <span
<var>historyHandling</var>,
<span data-x="navigation-params-process-response-end-of-body">process response end of
body</span> is <var>processResponseEndOfBody</var>,
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
<var>unsafeNavigationStartTime</var>, and <span
data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
false.</p></li>

Expand Down Expand Up @@ -88278,6 +88298,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="navigation-params-browsing-context">browsing context</span> is
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
<var>historyHandling</var>,
<span data-x="navigation-params-process-response-end-of-body">process response end of
body</span> is <var>processResponseEndOfBody</var>,
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
<var>unsafeNavigationStartTime</var>, and <span
data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
Expand Down Expand Up @@ -88308,7 +88330,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<var>navigationType</var>, <var>sandboxFlags</var>, <var>historyPolicyContainer</var>,
<var>initiatorPolicyContainer</var>, <var>allowedToDownload</var>,
<var>hasTransientActivation</var>, <var>incumbentNavigationOrigin</var>,
<var>historyHandling</var>, and <var>unsafeNavigationStartTime</var>.</p></dd>
<var>historyHandling</var>, <var>processResponseEndOfBody</var>, and
<var>unsafeNavigationStartTime</var>.</p></dd>

<dt>Otherwise, <var>resource</var> is a <span data-x="concept-request">request</span> whose
<span data-x="concept-request-url">URL</span>'s <span data-x="concept-url-scheme">scheme</span>
Expand All @@ -88329,7 +88352,9 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
two <span data-x="policy container">policy containers</span> <var>historyPolicyContainer</var> and
<var>initiatorPolicyContainer</var>, a boolean <var>allowedToDownload</var>, a boolean
<var>hasTransientActivation</var>, an <span>origin</span> <var>incumbentNavigationOrigin</var>,
a <span>history handling behavior</span> <var>historyHandling</var>, and a number
a <span>history handling behavior</span> <var>historyHandling</var>,
<var>processResponseEndOfBody</var>, which is null or an algorithm accepting a
domenic marked this conversation as resolved.
Show resolved Hide resolved
<span data-x="concept-response">response</span>, and a number
<var>unsafeNavigationStartTime</var>:</p>

<ol>
Expand Down Expand Up @@ -88617,6 +88642,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="navigation-params-browsing-context">browsing context</span> is
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
<var>historyHandling</var>,
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
is <var>processResponseEndOfBody</var>,
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
<var>unsafeNavigationStartTime</var>, and
<span data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
Expand Down Expand Up @@ -88672,6 +88699,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<p>If <var>failure</var> is true, then:</p>

<ol>
<li><p>Call <var>processResponseEndOfBody</var> with <var>response</var>.</p></li>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li><p><span data-x="navigate-ua-inline">Display the inline content with an appropriate error
shown to the user</span> given <var>browsingContext</var>.</p></li>

Expand All @@ -88696,7 +88725,9 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
</li>

<li><p>If <var>response</var>'s <span data-x="concept-response-status">status</span> is 204 or
205, then return.</p></li>
205, then call <var>navigationParams</var>'s
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
domenic marked this conversation as resolved.
Show resolved Hide resolved
and return.</p></li>
<!-- Theoretically, HTTP 205 processing would occur here, resetting all forms with no other
effect. However, it seems nobody actually wants to use this ability, so requiring it here
seems like unnecessary work. -->
Expand Down Expand Up @@ -89451,8 +89482,16 @@ new PaymentRequest(&hellip;); // Allowed to use

<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
<span>networking task source</span> given the newly-created <code>Document</code>'s <span>relevant
global object</span> for the parser to process the implied EOF character, which eventually causes
a <code data-x="event-load">load</code> event to be fired.</p>
global object</span> to the following:</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>Call <var>navigationParams</var>'s
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
with <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>

<li><p>Let the parser to process the implied EOF character, which eventually causes
domenic marked this conversation as resolved.
Show resolved Hide resolved
a <code data-x="event-load">load</code> event to be fired.</p></li>
</ol>

<p>After creating the <code>Document</code> object, but before any script execution, certainly
before the parser <span data-x="stop parsing">stops</span>, the user agent must <span>update the
Expand Down Expand Up @@ -89492,6 +89531,12 @@ new PaymentRequest(&hellip;); // Allowed to use
this before the complete document has been parsed (thus achieving <i>incremental rendering</i>),
and must do this before any scripts are to be executed.</p>

<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
<span>networking task source</span> given <var>document</var>'s <span>relevant
global object</span> to call <var>navigationParams</var>'s
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
with <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>

<p>Once parsing is complete, the user agent must set <var>document</var>'s <span
data-x="concept-document-navigation-id">navigation id</span> to null.</p>

Expand Down Expand Up @@ -89549,8 +89594,16 @@ new PaymentRequest(&hellip;); // Allowed to use

<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
<span>networking task source</span> given the newly-created <code>Document</code>'s <span>relevant
global object</span> for the parser to process the implied EOF character, which eventually causes
a <code data-x="event-load">load</code> event to be fired.</p>
global object</span> to the following:</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>Call <var>navigationParams</var>'s
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
with <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>

<li><p>Let the parser to process the implied EOF character, which eventually causes a
<code data-x="event-load">load</code> event to be fired.</p></li>
</ol>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<p>After creating the <code>Document</code> object, but potentially before the page has finished
parsing, the user agent must <span>update the session history with the new page</span> given
Expand Down Expand Up @@ -89656,6 +89709,11 @@ new PaymentRequest(&hellip;); // Allowed to use
script, to give the document a <code>title</code>, or to make the media <span
data-x="attr-media-autoplay">autoplay</span>.</p>

<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
<span>networking task source</span> given the newly-created <code>Document</code>'s <span>relevant
global object</span> to call <var>navigationParams</var>'s
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
with <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>

<h4 id="read-plugin"><dfn data-x="navigate-plugin">Page load processing model for content that uses plugins</dfn></h4>

Expand Down Expand Up @@ -89731,6 +89789,8 @@ new PaymentRequest(&hellip;); // Allowed to use
result</span> is a new <span data-x="coop-enforcement-result">cross-origin opener policy
enforcement result</span>, <span
data-x="navigation-params-reserved-environment">reserved environment</span> is null,
<span data-x="navigation-params-process-response-end-of-body">process response end of body</span>
is an algorithm that does nothing,
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is the
<span>unsafe shared current time</span>, and
<span data-x="navigation-params-browsing-context">browsing context</span> is
Expand Down