Skip to content

Commit

Permalink
Report Resource Timing for <iframe> and <frame>
Browse files Browse the repository at this point in the history
Part of #6542.
  • Loading branch information
noamr authored Mar 30, 2022
1 parent cac6b41 commit 89f9bcb
Showing 1 changed file with 93 additions and 34 deletions.
127 changes: 93 additions & 34 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -31302,11 +31302,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 @@ -87918,6 +87928,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>

<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 @@ -87968,8 +87982,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 @@ -88222,8 +88239,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 @@ -88268,8 +88288,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="navigation-params-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-params-request">request</span> is <var>resource</var>, <span
data-x="navigation-params-response">response</span> is <var>response</var>, <span
data-x="navigation-params-origin">origin</span> is <var>browsingContext</var>'s <span>active
document</span>'s <span data-x="concept-document-origin">origin</span>, <span
data-x="navigation-params-origin">origin</span> is <var>browsingContext</var>'s
<span>active document</span>'s <span data-x="concept-document-origin">origin</span>, <span
data-x="navigation-params-policy-container">policy container</span> is
<var>browsingContext</var>'s <span>active document</span>'s <span>policy container</span>,
<span data-x="navigation-params-sandboxing">final sandboxing flag set</span> is
Expand All @@ -88281,8 +88301,10 @@ 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>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 @@ -88312,7 +88334,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 @@ -88325,16 +88348,17 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
</li>
</ol>

<p>To <dfn export>process a navigate fetch</dfn>, given a <span
data-x="navigation-id">navigation id</span> <var>navigationId</var>, <span
data-x="concept-request">request</span> <var>request</var>, two <span data-x="browsing
context">browsing contexts</span> <var>sourceBrowsingContext</var> and <var>browsingContext</var>,
a string <var>navigationType</var>, a <span>sandboxing flag set</span> <var>sandboxFlags</var>,
two <span data-x="policy container">policy containers</span> <var>historyPolicyContainer</var> and
<p>To <dfn export>process a navigate fetch</dfn>, given a <span data-x="navigation-id">navigation
id</span> <var>navigationId</var>, <span data-x="concept-request">request</span>
<var>request</var>, two <span data-x="browsing context">browsing contexts</span>
<var>sourceBrowsingContext</var> and <var>browsingContext</var>, a string
<var>navigationType</var>, a <span>sandboxing flag set</span> <var>sandboxFlags</var>, 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
<var>unsafeNavigationStartTime</var>:</p>
<var>hasTransientActivation</var>, an <span>origin</span> <var>incumbentNavigationOrigin</var>, a
<span>history handling behavior</span> <var>historyHandling</var>,
<var>processResponseEndOfBody</var>, which is an algorithm accepting a <span
data-x="concept-response">response</span>, and a number <var>unsafeNavigationStartTime</var>:</p>

<ol>
<li><p>Let <var>response</var> be null.</p></li>
Expand Down Expand Up @@ -88620,10 +88644,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="concept-request-reserved-client">reserved client</span>, <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 data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</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
<var>hasCrossOriginRedirects</var>.</p></li>

<li><p>Run <span>process a navigate response</span> with <var>navigationType</var>,
Expand Down Expand Up @@ -88676,6 +88701,10 @@ 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>navigationParams</var>'s <span
data-x="navigation-params-process-response-end-of-body">process response end of body</span>
with <var>response</var>.</p></li>

<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 @@ -88700,7 +88729,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> with
<var>response</var>, 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 @@ -89455,8 +89486,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 run the following steps:</p>

<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>Have the parser process the implied EOF character, which eventually causes 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 @@ -89496,6 +89535,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 @@ -89553,8 +89598,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 run the following steps:</p>

<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>Have the parser process the implied EOF character, which eventually causes a <code
data-x="event-load">load</code> event to be fired.</p></li>
</ol>

<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 @@ -89660,6 +89713,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 @@ -89733,11 +89791,12 @@ new PaymentRequest(&hellip;); // Allowed to use
data-x="navigation-params-coop">cross-origin opener policy</span> is a new <span>cross-origin
opener policy</span>, <span data-x="navigation-params-coop-enforcement-result">COOP enforcement
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-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
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
<var>browsingContext</var>.</p>

<p class="XXX">The algorithm called in the next step is not prepared to deal with a null <span
Expand Down

0 comments on commit 89f9bcb

Please sign in to comment.