Skip to content

Commit

Permalink
Report ResourceTiming for video posters and image inputs
Browse files Browse the repository at this point in the history
Part of whatwg#6542.
  • Loading branch information
noamr authored and mfreed7 committed Jun 3, 2022
1 parent aa72789 commit 99ce9a6
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -32853,8 +32853,13 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>
data-x="concept-request-credentials-mode">credentials mode</span> is "<code
data-x="">include</code>", and whose <span>use-URL-credentials flag</span> is set.

<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>. This must
<span>delay the load event</span> of the element's <span>node document</span>.</p></li>
<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>, with
<i data-x="processResponseEndOfBody">processResponseEndOfBody</i> given
<span data-x="concept-response">response</span> <var>res</var> set to
<span>finalize and report timing</span> with <var>res</var>, the element's
<span>node document</span>'s <span>relevant global object</span>, and
"<code data-x="">video</code>". This must <span>delay the load event</span> of the element's
<span>node document</span>.</p></li>

<!-- could define how to sniff for an image here -->

Expand Down Expand Up @@ -48808,7 +48813,28 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
data-x="concept-request-credentials-mode">credentials mode</span> is "<code
data-x="">include</code>", and whose <span>use-URL-credentials flag</span> is set.</p></li>

<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>.</p></li>
<!--FETCH--><li>
<p><span data-x="concept-fetch">Fetch</span> <var>request</var>, with
<i data-x="processResponseEndOfBody">processResponseEndOfBody</i> set to the following steps
given <span data-x="concept-response">response</span> <var>response</var>:</p>

<ol>
<li><p><span>Finalize and report timing</span> with <var>response</var>, the <code>input</code>
element's <span>node document</span>'s <span>relevant global object</span>, and
"<code data-x="">input</code>".</p></li>

<li><p>If the download was successful and the image is
<i data-x="input-img-available">available</i>, <span>queue an element task</span> on the
<span>user interaction task source</span> given the <code>input</code> element to
<span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-load">load</code> at the <code>input</code> element; and otherwise, if the
fetching process fails without a response from the remote server, or completes but the image is
not a valid or supported image, <span>queue an element task</span> on the <span>user interaction
task source</span> given the <code>input</code> element to
<span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-error">error</code> on the <code>input</code> element.</p></li>
</ol>
</li>
</ol>

<!-- same text in <img> section and similar text elsewhere -->
Expand All @@ -48834,18 +48860,6 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
agents must not run executable code embedded in the image resource. User agents must only display
the first page of a multipage resource. User agents must not allow the resource to act in an
interactive fashion, but should honor any animation in the resource.</p>

<p>The <span data-x="concept-task">task</span> that is <span data-x="queue a task">queued</span>
by the <span>networking task source</span> once the resource has been fetched, must, if the
download was successful and the image is <i data-x="input-img-available">available</i>,
<span>queue an element task</span> on the <span>user interaction task source</span> given the
<code>input</code> element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-load">load</code> at the <code>input</code> element; and otherwise, if the fetching
process fails without a response from the remote server, or completes but the image is not a valid
or supported image, <span>queue an element task</span> on the <span>user interaction task
source</span> given the <code>input</code> element to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-error">error</code> on the <code>input</code> element.</p>

<hr>

</div>
Expand Down

0 comments on commit 99ce9a6

Please sign in to comment.