hixie: 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. (whatwg r5749)

hixie: 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. (whatwg r5749)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4609&r2=1.4610&f=h
http://html5.org/tools/web-apps-tracker?from=5748&to=5749

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4609
retrieving revision 1.4610
diff -u -d -r1.4609 -r1.4610
--- Overview.html 7 Jan 2011 22:30:08 -0000 1.4609
+++ Overview.html 7 Jan 2011 22:43:53 -0000 1.4610
@@ -21201,16 +21201,39 @@
   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
-  URL. --><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
+  spaces</a>.<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
   idea of what the video is like.<div class="impl">

Received on Wednesday, 12 January 2011 02:44:10 UTC