Skip to content

Commit

Permalink
[giow] (1) Add a 'resize' event to <video> elements for when the vide…
Browse files Browse the repository at this point in the history
…o data changes dimensions.

Affected topics: HTML, Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@8347 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 12, 2013
1 parent da7a93b commit fdb94d7
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 8 deletions.
28 changes: 26 additions & 2 deletions complete.html
Expand Up @@ -24562,6 +24562,13 @@ <h4 id=the-video-element><span class=secno>4.7.6 </span>The <dfn id=video><code>
the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video in CSS
pixels. If the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the attributes must return 0.</p>

<p id=dimUpdate>Whenever the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>
or <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video changes
(including, for example, because the <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected video
track</a> was changed), if the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, the user agent must
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-resize><a href=#event-media-resize>resize</a></code> at the <a href=#media-element>media element</a>.</p>

</div>

<p>The <code><a href=#the-video-element>video</a></code> element supports <a href=#dimension-attributes>dimension attributes</a>.</p>
Expand Down Expand Up @@ -26139,7 +26146,14 @@ <h5 id=loading-the-media-resource><span class=secno>4.7.10.5 </span>Loading the

</li>

<li><p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</li>
<li>

<p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</p>

<p class=note>At this point, <code title=event-media-resize><a href=#event-media-resize>resize</a></code> events can
start firing.</p>

</li>

<li>

Expand Down Expand Up @@ -28066,7 +28080,8 @@ <h6 id=audiotracklist-and-videotracklist-objects><span class=secno>4.7.10.10.1 <
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<p>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object. This <a href=#concept-task title=concept-task>task</a> must be <a href=#queue-a-task title="queue a task">queued</a> before the
<a href=#concept-task title=concept-task>task</a> that fires the <code title=event-media-resize><a href=#event-media-resize>resize</a></code> event, if any.</p>

<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) <span class=impl>that must be</span> supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>,
Expand Down Expand Up @@ -30916,6 +30931,14 @@ <h5 id=mediaevents><span class=secno>4.7.10.16 </span>Event summary</h5>

<td>

<tbody><tr><td><dfn id=event-media-resize title=event-media-resize><code>resize</code></dfn>

<td><code><a href=#event>Event</a></code>

<td>One or both of the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes have just been updated.

<td><a href=#media-element>Media element</a> is a <code><a href=#the-video-element>video</a></code> element; <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>

<tr><td><dfn id=event-media-volumechange title=event-media-volumechange><code>volumechange</code></dfn>

<td><code><a href=#event>Event</a></code>
Expand Down Expand Up @@ -101837,6 +101860,7 @@ <h2 class=no-num id=references>References</h2><!--REFS-->
&Acy;&lcy;&iecy;&kcy;&scy;&iecy;&jcy; &Pcy;&rcy;&ocy;&scy;&kcy;&ucy;&rcy;&yacy;&kcy;&ocy;&vcy; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,
Expand Down
28 changes: 26 additions & 2 deletions index
Expand Up @@ -24562,6 +24562,13 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video in CSS
pixels. If the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the attributes must return 0.</p>

<p id=dimUpdate>Whenever the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>
or <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video changes
(including, for example, because the <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected video
track</a> was changed), if the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, the user agent must
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-resize><a href=#event-media-resize>resize</a></code> at the <a href=#media-element>media element</a>.</p>

</div>

<p>The <code><a href=#the-video-element>video</a></code> element supports <a href=#dimension-attributes>dimension attributes</a>.</p>
Expand Down Expand Up @@ -26139,7 +26146,14 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement

</li>

<li><p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</li>
<li>

<p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</p>

<p class=note>At this point, <code title=event-media-resize><a href=#event-media-resize>resize</a></code> events can
start firing.</p>

</li>

<li>

Expand Down Expand Up @@ -28066,7 +28080,8 @@ interface <dfn id=videotrack>VideoTrack</dfn> {
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<p>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object. This <a href=#concept-task title=concept-task>task</a> must be <a href=#queue-a-task title="queue a task">queued</a> before the
<a href=#concept-task title=concept-task>task</a> that fires the <code title=event-media-resize><a href=#event-media-resize>resize</a></code> event, if any.</p>

<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) <span class=impl>that must be</span> supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>,
Expand Down Expand Up @@ -30916,6 +30931,14 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>Even

<td>

<tbody><tr><td><dfn id=event-media-resize title=event-media-resize><code>resize</code></dfn>

<td><code><a href=#event>Event</a></code>

<td>One or both of the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes have just been updated.

<td><a href=#media-element>Media element</a> is a <code><a href=#the-video-element>video</a></code> element; <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>

<tr><td><dfn id=event-media-volumechange title=event-media-volumechange><code>volumechange</code></dfn>

<td><code><a href=#event>Event</a></code>
Expand Down Expand Up @@ -101837,6 +101860,7 @@ if (s = prompt('What is your name?')) {
&Acy;&lcy;&iecy;&kcy;&scy;&iecy;&jcy; &Pcy;&rcy;&ocy;&scy;&kcy;&ucy;&rcy;&yacy;&kcy;&ocy;&vcy; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,
Expand Down
41 changes: 37 additions & 4 deletions source
Expand Up @@ -25928,6 +25928,14 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
pixels. If the element's <code data-x="dom-media-readyState">readyState</code> attribute is <code
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then the attributes must return 0.</p>

<p id="dimUpdate">Whenever the <span data-x="concept-video-intrinsic-width">intrinsic width</span>
or <span data-x="concept-video-intrinsic-height">intrinsic height</span> of the video changes
(including, for example, because the <span data-x="dom-VideoTrack-selected">selected video
track</span> was changed), if the element's <code data-x="dom-media-readyState">readyState</code>
attribute is not <code data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, the user agent must
<span>queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-resize">resize</code> at the <span>media element</span>.</p>

</div>

<p>The <code>video</code> element supports <span>dimension attributes</span>.</p>
Expand Down Expand Up @@ -27745,9 +27753,16 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {

</li>

<li><p>For <code>video</code> elements, set the <code
data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes.</p></li>
<li>

<p>For <code>video</code> elements, set the <code
data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes.</p>

<p class="note">At this point, <code data-x="event-media-resize">resize</code> events can
start firing.</p>

</li>

<li>

Expand Down Expand Up @@ -30015,7 +30030,10 @@ interface <dfn>VideoTrack</dfn> {

<p>Whenever a track in a <code>VideoTrackList</code> that was previously not selected is selected,
the user agent must <span>queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-change">change</code> at the <code>VideoTrackList</code> object.</p>
data-x="event-media-change">change</code> at the <code>VideoTrackList</code> object. This <span
data-x="concept-task">task</span> must be <span data-x="queue a task">queued</span> before the
<span data-x="concept-task">task</span> that fires the <code
data-x="event-media-resize">resize</code> event, if any.</p>

<hr>

Expand Down Expand Up @@ -33357,6 +33375,20 @@ dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {

<td>

<tbody>
<tr>

<td><dfn data-x="event-media-resize"><code>resize</code></dfn>

<td><code>Event</code>

<td>One or both of the <code data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes have just been updated.

<td><span>Media element</span> is a <code>video</code> element; <code
data-x="dom-media-readyState">readyState</code> is not <code
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>

<tr>

<td><dfn data-x="event-media-volumechange"><code>volumechange</code></dfn>
Expand Down Expand Up @@ -113800,6 +113832,7 @@ if (s = prompt('What is your name?')) {
&#1040;&#1083;&#1077;&#1082;&#1089;&#1077;&#1081; &#1055;&#1088;&#1086;&#1089;&#1082;&#1091;&#1088;&#1103;&#1082;&#1086;&#1074; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,
Expand Down

0 comments on commit fdb94d7

Please sign in to comment.