Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (1) Rewrite how poster='' works so that it is (a) clearer and …
…(b) actually requires that the poster frame goes away when you remove the attribute.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11205

git-svn-id: http://svn.whatwg.org/webapps@5749 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2011
1 parent e483d7e commit f6d5ec8
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 29 deletions.
43 changes: 34 additions & 9 deletions complete.html
Expand Up @@ -24467,17 +24467,42 @@ <h4 id=video><span class=secno>4.8.6 </span>The <dfn><code>video</code></dfn> el
attribute gives the address of an image file that the user agent can
show while no video data is available. The attribute, if present,
must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially surrounded by
spaces</a>. <span class=impl>If the specified resource is to be
used, then, when the element is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute is set, if its
value is not the empty string, its value must be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
if that is successful, the resulting <a href=#absolute-url>absolute URL</a> must
be <a href=#fetch title=fetch>fetched</a>, from the element's
<code><a href=#document>Document</a></code>'s <a href=#origin>origin</a>; this must <a href=#delay-the-load-event>delay
the load event</a> of the element's document. The <dfn id=poster-frame>poster
frame</dfn> is then the image obtained from that resource, if
any.</span></p> <!-- thus it is unaffected by changes to the base
spaces</a>.</p>

<div class=impl>

<p>If the specified resource is to be used, then, when the element
is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code>
attribute is set, changed, or removed, the user agent must run the
following steps to determine the element's <dfn id=poster-frame>poster
frame</dfn>:</p> <!-- thus it is unaffected by changes to the base
URL. -->

<ol><li><p>If there is an existing instance of this algorithm running
for this <code><a href=#video>video</a></code> element, abort that instance of this
algorithm without changing the <a href=#poster-frame>poster frame</a>.</li>

<li><p>If the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code>
attribute's value is the empty string, then there is no
<a href=#poster-frame>poster frame</a>; abort these steps.</li>

<li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute's value relative
to the element. If this fails, then there is no <a href=#poster-frame>poster
frame</a>; abort these steps.</li>

<li><p><a href=#fetch>Fetch</a> the resulting <a href=#absolute-url>absolute URL</a>,
from the element's <code><a href=#document>Document</a></code>'s <a href=#origin>origin</a>.
This must <a href=#delay-the-load-event>delay the load event</a> of the element's
document.</li>

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

<li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a>
is that image. Otherwise, there is no <a href=#poster-frame>poster
frame</a>.</li>

</ol></div>

<p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute, the <i><a href=#poster-frame>poster
frame</a></i>, is intended to be a representative frame of the video
(typically one of the first non-blank frames) that gives the user an
Expand Down
43 changes: 34 additions & 9 deletions index
Expand Up @@ -24449,17 +24449,42 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
attribute gives the address of an image file that the user agent can
show while no video data is available. The attribute, if present,
must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially surrounded by
spaces</a>. <span class=impl>If the specified resource is to be
used, then, when the element is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute is set, if its
value is not the empty string, its value must be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
if that is successful, the resulting <a href=#absolute-url>absolute URL</a> must
be <a href=#fetch title=fetch>fetched</a>, from the element's
<code><a href=#document>Document</a></code>'s <a href=#origin>origin</a>; this must <a href=#delay-the-load-event>delay
the load event</a> of the element's document. The <dfn id=poster-frame>poster
frame</dfn> is then the image obtained from that resource, if
any.</span></p> <!-- thus it is unaffected by changes to the base
spaces</a>.</p>

<div class=impl>

<p>If the specified resource is to be used, then, when the element
is created or when the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code>
attribute is set, changed, or removed, the user agent must run the
following steps to determine the element's <dfn id=poster-frame>poster
frame</dfn>:</p> <!-- thus it is unaffected by changes to the base
URL. -->

<ol><li><p>If there is an existing instance of this algorithm running
for this <code><a href=#video>video</a></code> element, abort that instance of this
algorithm without changing the <a href=#poster-frame>poster frame</a>.</li>

<li><p>If the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code>
attribute's value is the empty string, then there is no
<a href=#poster-frame>poster frame</a>; abort these steps.</li>

<li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute's value relative
to the element. If this fails, then there is no <a href=#poster-frame>poster
frame</a>; abort these steps.</li>

<li><p><a href=#fetch>Fetch</a> the resulting <a href=#absolute-url>absolute URL</a>,
from the element's <code><a href=#document>Document</a></code>'s <a href=#origin>origin</a>.
This must <a href=#delay-the-load-event>delay the load event</a> of the element's
document.</li>

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

<li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a>
is that image. Otherwise, there is no <a href=#poster-frame>poster
frame</a>.</li>

</ol></div>

<p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute, the <i><a href=#poster-frame>poster
frame</a></i>, is intended to be a representative frame of the video
(typically one of the first non-blank frames) that gives the user an
Expand Down
50 changes: 39 additions & 11 deletions source
Expand Up @@ -26290,19 +26290,47 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
attribute gives the address of an image file that the user agent can
show while no video data is available. The attribute, if present,
must contain a <span>valid non-empty URL potentially surrounded by
spaces</span>. <span class="impl">If the specified resource is to be
used, then, when the element is created or when the <code
title="attr-video-poster">poster</code> attribute is set, if its
value is not the empty string, its value must be <span
title="resolve a url">resolved</span> relative to the element, and
if that is successful, the resulting <span>absolute URL</span> must
be <span title="fetch">fetched</span>, from the element's
<code>Document</code>'s <span>origin</span>; this must <span>delay
the load event</span> of the element's document. The <dfn>poster
frame</dfn> is then the image obtained from that resource, if
any.</span></p> <!-- thus it is unaffected by changes to the base
spaces</span>.</p>

<div class="impl">

<p>If the specified resource is to be used, then, when the element
is created or when the <code title="attr-video-poster">poster</code>
attribute is set, changed, or removed, the user agent must run the
following steps to determine the element's <dfn>poster
frame</dfn>:</p> <!-- thus it is unaffected by changes to the base
URL. -->

<ol>

<li><p>If there is an existing instance of this algorithm running
for this <code>video</code> element, abort that instance of this
algorithm without changing the <span>poster frame</span>.</p></li>

<li><p>If the <code title="attr-video-poster">poster</code>
attribute's value is the empty string, then there is no
<span>poster frame</span>; abort these steps.</p></li>

<li><p><span title="resolve a url">Resolve</span> the <code
title="attr-video-poster">poster</code> attribute's value relative
to the element. If this fails, then there is no <span>poster
frame</span>; abort these steps.</p></li>

<li><p><span>Fetch</span> the resulting <span>absolute URL</span>,
from the element's <code>Document</code>'s <span>origin</span>.
This must <span>delay the load event</span> of the element's
document.</p></li>

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

<li><p>If an image is thus obtained, the <span>poster frame</span>
is that image. Otherwise, there is no <span>poster
frame</span>.</p></li>

</ol>

</div>

<p class="note">The image given by the <code
title="attr-video-poster">poster</code> attribute, the <i>poster
frame</i>, is intended to be a representative frame of the video
Expand Down

0 comments on commit f6d5ec8

Please sign in to comment.