Skip to content

Commit 89f9bcb

Browse files
authored
Report Resource Timing for <iframe> and <frame>
Part of #6542.
1 parent cac6b41 commit 89f9bcb

File tree

1 file changed

+93
-34
lines changed

1 file changed

+93
-34
lines changed

source

Lines changed: 93 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31302,11 +31302,21 @@ interface <dfn interface>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
3130231302
document</span> is not <span>completely loaded</span>, then set <var>historyHandling</var> to
3130331303
"<code data-x="hh-replace">replace</code>".</p></li>
3130431304

31305+
<li><p>Let <var>reportFrameTiming</var> be the following step given <span
31306+
data-x="concept-response">response</span> <var>response</var>: <span>queue an element
31307+
task</span> on the <span>networking task source</span> given <var>element</var>'s <span>node
31308+
document</span>'s <span>relevant global object</span> to <span>finalize and report timing</span>
31309+
given <var>response</var>, <var>element</var>'s <span>node document</span>'s <span>relevant
31310+
global object</span>, and <var>element</var>'s <span data-x="concept-element-local-name">local
31311+
name</span>.</p></li>
31312+
3130531313
<li><p><span>Navigate</span><!--DONAV iframe or frame--> <var>element</var>'s <span>nested
3130631314
browsing context</span> to <var>resource</var>, with <var
31307-
data-x="navigation-hh">historyHandling</var> set to <var>historyHandling</var> and the
31315+
data-x="navigation-hh">historyHandling</var> set to <var>historyHandling</var>, the
3130831316
<span>source browsing context</span> set to <var>element</var>'s <span>node document</span>'s
31309-
<span data-x="concept-document-bc">browsing context</span>.</p></li>
31317+
<span data-x="concept-document-bc">browsing context</span>, and
31318+
<var data-x="navigation-process-end-of-body">processResponseEndOfBody</var> set to
31319+
<var>reportFrameTiming</var>.</p></li>
3131031320
</ol>
3131131321

3131231322
<!-- see also the note near similar text for the location.assign() method -->
@@ -87918,6 +87928,10 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8791887928
redirects</dfn></dt>
8791987929
<dd>a boolean</dd>
8792087930

87931+
<dt><dfn data-x="navigation-params-process-response-end-of-body">process response end of
87932+
body</dfn></dt>
87933+
<dd>an algorithm expecting a <span data-x="concept-response">response</span></dd>
87934+
8792187935
<dt><dfn data-x="navigation-params-unsafe-start-time">unsafe start time</dfn></dt>
8792287936
<dd>a number, representing a value of the <span>unsafe shared current time</span> when the
8792387937
navigation has started</dd>
@@ -87968,8 +87982,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8796887982
data-x="hh-default">default</code>"), an optional <span>policy container</span>-or-null <dfn
8796987983
data-x="navigation-historypolicycontainer">historyPolicyContainer</dfn> (default null), an
8797087984
optional string <dfn data-x="navigation-navigationtype"><var>navigationType</var></dfn> (default
87971-
"<code data-x="">other</code>"), and an optional <span data-x="navigation-id">navigation id</span>
87972-
<dfn data-x="navigation-navigationid"><var>navigationId</var></dfn> (default null):</p>
87985+
"<code data-x="">other</code>"), an optional <span data-x="navigation-id">navigation id</span>
87986+
<dfn data-x="navigation-navigationid"><var>navigationId</var></dfn> (default null), and an
87987+
optional <dfn data-x="navigation-process-end-of-body"><var>processResponseEndOfBody</var></dfn>,
87988+
which is an algorithm receiving a <span data-x="concept-response">response</span> (default an
87989+
algorithm that does nothing):</p>
8797387990

8797487991
<ol>
8797587992
<li><p>Let <var>unsafeNavigationStartTime</var> be the <span>unsafe shared current time</span>.</p></li>
@@ -88222,8 +88239,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8822288239
data-x="navigation-params-reserved-environment">reserved environment</span> is null, <span
8822388240
data-x="navigation-params-browsing-context">browsing context</span> is
8822488241
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
88225-
<var>historyHandling</var>, <span data-x="navigation-params-unsafe-start-time">unsafe start
88226-
time</span> is <var>unsafeNavigationStartTime</var>, and <span
88242+
<var>historyHandling</var>, <span
88243+
data-x="navigation-params-process-response-end-of-body">process response end of body</span>
88244+
is <var>processResponseEndOfBody</var>, <span
88245+
data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
88246+
<var>unsafeNavigationStartTime</var>, and <span
8822788247
data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
8822888248
false.</p></li>
8822988249

@@ -88268,8 +88288,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8826888288
data-x="navigation-params-id">id</span> is <var>navigationId</var>, <span
8826988289
data-x="navigation-params-request">request</span> is <var>resource</var>, <span
8827088290
data-x="navigation-params-response">response</span> is <var>response</var>, <span
88271-
data-x="navigation-params-origin">origin</span> is <var>browsingContext</var>'s <span>active
88272-
document</span>'s <span data-x="concept-document-origin">origin</span>, <span
88291+
data-x="navigation-params-origin">origin</span> is <var>browsingContext</var>'s
88292+
<span>active document</span>'s <span data-x="concept-document-origin">origin</span>, <span
8827388293
data-x="navigation-params-policy-container">policy container</span> is
8827488294
<var>browsingContext</var>'s <span>active document</span>'s <span>policy container</span>,
8827588295
<span data-x="navigation-params-sandboxing">final sandboxing flag set</span> is
@@ -88281,8 +88301,10 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8828188301
data-x="navigation-params-reserved-environment">reserved environment</span> is null, <span
8828288302
data-x="navigation-params-browsing-context">browsing context</span> is
8828388303
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
88284-
<var>historyHandling</var>,
88285-
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
88304+
<var>historyHandling</var>, <span
88305+
data-x="navigation-params-process-response-end-of-body">process response end of body</span>
88306+
is <var>processResponseEndOfBody</var>, <span
88307+
data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
8828688308
<var>unsafeNavigationStartTime</var>, and <span
8828788309
data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
8828888310
false.</p></li>
@@ -88312,7 +88334,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8831288334
<var>navigationType</var>, <var>sandboxFlags</var>, <var>historyPolicyContainer</var>,
8831388335
<var>initiatorPolicyContainer</var>, <var>allowedToDownload</var>,
8831488336
<var>hasTransientActivation</var>, <var>incumbentNavigationOrigin</var>,
88315-
<var>historyHandling</var>, and <var>unsafeNavigationStartTime</var>.</p></dd>
88337+
<var>historyHandling</var>, <var>processResponseEndOfBody</var>, and
88338+
<var>unsafeNavigationStartTime</var>.</p></dd>
8831688339

8831788340
<dt>Otherwise, <var>resource</var> is a <span data-x="concept-request">request</span> whose
8831888341
<span data-x="concept-request-url">URL</span>'s <span data-x="concept-url-scheme">scheme</span>
@@ -88325,16 +88348,17 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8832588348
</li>
8832688349
</ol>
8832788350

88328-
<p>To <dfn export>process a navigate fetch</dfn>, given a <span
88329-
data-x="navigation-id">navigation id</span> <var>navigationId</var>, <span
88330-
data-x="concept-request">request</span> <var>request</var>, two <span data-x="browsing
88331-
context">browsing contexts</span> <var>sourceBrowsingContext</var> and <var>browsingContext</var>,
88332-
a string <var>navigationType</var>, a <span>sandboxing flag set</span> <var>sandboxFlags</var>,
88333-
two <span data-x="policy container">policy containers</span> <var>historyPolicyContainer</var> and
88351+
<p>To <dfn export>process a navigate fetch</dfn>, given a <span data-x="navigation-id">navigation
88352+
id</span> <var>navigationId</var>, <span data-x="concept-request">request</span>
88353+
<var>request</var>, two <span data-x="browsing context">browsing contexts</span>
88354+
<var>sourceBrowsingContext</var> and <var>browsingContext</var>, a string
88355+
<var>navigationType</var>, a <span>sandboxing flag set</span> <var>sandboxFlags</var>, two <span
88356+
data-x="policy container">policy containers</span> <var>historyPolicyContainer</var> and
8833488357
<var>initiatorPolicyContainer</var>, a boolean <var>allowedToDownload</var>, a boolean
88335-
<var>hasTransientActivation</var>, an <span>origin</span> <var>incumbentNavigationOrigin</var>,
88336-
a <span>history handling behavior</span> <var>historyHandling</var>, and a number
88337-
<var>unsafeNavigationStartTime</var>:</p>
88358+
<var>hasTransientActivation</var>, an <span>origin</span> <var>incumbentNavigationOrigin</var>, a
88359+
<span>history handling behavior</span> <var>historyHandling</var>,
88360+
<var>processResponseEndOfBody</var>, which is an algorithm accepting a <span
88361+
data-x="concept-response">response</span>, and a number <var>unsafeNavigationStartTime</var>:</p>
8833888362

8833988363
<ol>
8834088364
<li><p>Let <var>response</var> be null.</p></li>
@@ -88620,10 +88644,11 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8862088644
data-x="concept-request-reserved-client">reserved client</span>, <span
8862188645
data-x="navigation-params-browsing-context">browsing context</span> is
8862288646
<var>browsingContext</var>, <span data-x="navigation-params-hh">history handling</span> is
88623-
<var>historyHandling</var>,
88624-
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is
88625-
<var>unsafeNavigationStartTime</var>, and
88626-
<span data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
88647+
<var>historyHandling</var>, <span
88648+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> is
88649+
<var>processResponseEndOfBody</var>, <span data-x="navigation-params-unsafe-start-time">unsafe
88650+
start time</span> is <var>unsafeNavigationStartTime</var>, and <span
88651+
data-x="navigation-params-has-cross-origin-redirects">has cross-origin redirects</span> is
8862788652
<var>hasCrossOriginRedirects</var>.</p></li>
8862888653

8862988654
<li><p>Run <span>process a navigate response</span> with <var>navigationType</var>,
@@ -88676,6 +88701,10 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8867688701
<p>If <var>failure</var> is true, then:</p>
8867788702

8867888703
<ol>
88704+
<li><p>Call <var>navigationParams</var>'s <span
88705+
data-x="navigation-params-process-response-end-of-body">process response end of body</span>
88706+
with <var>response</var>.</p></li>
88707+
8867988708
<li><p><span data-x="navigate-ua-inline">Display the inline content with an appropriate error
8868088709
shown to the user</span> given <var>browsingContext</var>.</p></li>
8868188710

@@ -88700,7 +88729,9 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
8870088729
</li>
8870188730

8870288731
<li><p>If <var>response</var>'s <span data-x="concept-response-status">status</span> is 204 or
88703-
205, then return.</p></li>
88732+
205, then call <var>navigationParams</var>'s <span
88733+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> with
88734+
<var>response</var>, and return.</p></li>
8870488735
<!-- Theoretically, HTTP 205 processing would occur here, resetting all forms with no other
8870588736
effect. However, it seems nobody actually wants to use this ability, so requiring it here
8870688737
seems like unnecessary work. -->
@@ -89455,8 +89486,16 @@ new PaymentRequest(&hellip;); // Allowed to use
8945589486

8945689487
<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
8945789488
<span>networking task source</span> given the newly-created <code>Document</code>'s <span>relevant
89458-
global object</span> for the parser to process the implied EOF character, which eventually causes
89459-
a <code data-x="event-load">load</code> event to be fired.</p>
89489+
global object</span> to run the following steps:</p>
89490+
89491+
<ol>
89492+
<li><p>Call <var>navigationParams</var>'s <span
89493+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> with
89494+
<var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>
89495+
89496+
<li><p>Have the parser process the implied EOF character, which eventually causes a <code
89497+
data-x="event-load">load</code> event to be fired.</p></li>
89498+
</ol>
8946089499

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

89538+
<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
89539+
<span>networking task source</span> given <var>document</var>'s <span>relevant global
89540+
object</span> to call <var>navigationParams</var>'s <span
89541+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> with
89542+
<var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>
89543+
8949989544
<p>Once parsing is complete, the user agent must set <var>document</var>'s <span
8950089545
data-x="concept-document-navigation-id">navigation id</span> to null.</p>
8950189546

@@ -89553,8 +89598,16 @@ new PaymentRequest(&hellip;); // Allowed to use
8955389598

8955489599
<p>When no more bytes are available, the user agent must <span>queue a global task</span> on the
8955589600
<span>networking task source</span> given the newly-created <code>Document</code>'s <span>relevant
89556-
global object</span> for the parser to process the implied EOF character, which eventually causes
89557-
a <code data-x="event-load">load</code> event to be fired.</p>
89601+
global object</span> to run the following steps:</p>
89602+
89603+
<ol>
89604+
<li><p>Call <var>navigationParams</var>'s <span
89605+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> with
89606+
<var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>.</p>
89607+
89608+
<li><p>Have the parser process the implied EOF character, which eventually causes a <code
89609+
data-x="event-load">load</code> event to be fired.</p></li>
89610+
</ol>
8955889611

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

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

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

@@ -89733,11 +89791,12 @@ new PaymentRequest(&hellip;); // Allowed to use
8973389791
data-x="navigation-params-coop">cross-origin opener policy</span> is a new <span>cross-origin
8973489792
opener policy</span>, <span data-x="navigation-params-coop-enforcement-result">COOP enforcement
8973589793
result</span> is a new <span data-x="coop-enforcement-result">cross-origin opener policy
89736-
enforcement result</span>, <span
89737-
data-x="navigation-params-reserved-environment">reserved environment</span> is null,
89738-
<span data-x="navigation-params-unsafe-start-time">unsafe start time</span> is the
89739-
<span>unsafe shared current time</span>, and
89740-
<span data-x="navigation-params-browsing-context">browsing context</span> is
89794+
enforcement result</span>, <span data-x="navigation-params-reserved-environment">reserved
89795+
environment</span> is null, <span
89796+
data-x="navigation-params-process-response-end-of-body">process response end of body</span> is
89797+
an algorithm that does nothing, <span data-x="navigation-params-unsafe-start-time">unsafe start
89798+
time</span> is the <span>unsafe shared current time</span>, and <span
89799+
data-x="navigation-params-browsing-context">browsing context</span> is
8974189800
<var>browsingContext</var>.</p>
8974289801

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

0 commit comments

Comments
 (0)