HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3685[Gecko] [Opera] [Webkit] drawImage() and createPattern() no longer throw an exception if the image isn't ready.2009-08-28 01:03
@@ -26558,32 +26558,27 @@ idea from Mihai:
 
   <p>The <var title="">image</var> argument is an instance of either
   <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>, or
   <code>HTMLVideoElement</code>. If the <var title="">image</var> is
   of the wrong type or null, the implementation must raise a
   <code>TYPE_MISMATCH_ERR</code> exception.</p>
   <!-- drawImage() has an equivalent paragraph -->
 
   <p>If the <var title="">image</var> argument is an
   <code>HTMLImageElement</code> object whose <code
-  title="dom-img-complete">complete</code> attribute is false, then
-  the implementation must raise an <code>INVALID_STATE_ERR</code>
-  exception.</p>
-  <!-- drawImage() has an equivalent paragraph -->
-
-  <p>If the <var title="">image</var> argument is an
+  title="dom-img-complete">complete</code> attribute is false, or
+  if the <var title="">image</var> argument is an
   <code>HTMLVideoElement</code> object whose <code
   title="dom-media-readyState">readyState</code> attribute is either
   <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code> or <code
   title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, then the
-  implementation must raise an <code>INVALID_STATE_ERR</code>
-  exception.</p>
+  implementation must return null.</p>
   <!-- drawImage() has an equivalent paragraph -->
 
   <p>If the <var title="">image</var> argument is an
   <code>HTMLCanvasElement</code> object with either a horizontal
   dimension or a vertical dimension equal to zero, then the
   implementation must raise an <code>INVALID_STATE_ERR</code>
   exception.</p>
   <!-- drawImage() has an equivalent paragraph -->
 
   <p>Patterns must be painted so that the top left of the first image
@@ -28154,41 +28149,27 @@ v4DVT (also check for '- -' bits in the part above) -->
 
   <p>The <var title="">image</var> argument is an instance of either
   <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>, or
   <code>HTMLVideoElement</code>. If the <var title="">image</var> is
   of the wrong type or null, the implementation must raise a
   <code>TYPE_MISMATCH_ERR</code> exception.</p>
   <!-- createPattern() has an equivalent paragraph -->
 
   <p>If the <var title="">image</var> argument is an
   <code>HTMLImageElement</code> object whose <code
-  title="dom-img-complete">complete</code> attribute is false, then
-  the implementation must raise an <code>INVALID_STATE_ERR</code>
-  exception.</p>
-  <!-- createPattern() has an equivalent paragraph -->
-
-  <!-- handled by a later paragraph
-  <p>If the <var title="">image</var> argument is an
-  <code>HTMLCanvasElement</code> object with either a horizontal
-  dimension or a vertical dimension equal to zero, then the
-  implementation must raise an <code>INVALID_SIZE_ERR</code>
-  exception.</p>
-  -->
-  <!-- createPattern() has an equivalent paragraph -->
-
-  <p>If the <var title="">image</var> argument is an
+  title="dom-img-complete">complete</code> attribute is false, or
+  if the <var title="">image</var> argument is an
   <code>HTMLVideoElement</code> object whose <code
   title="dom-media-readyState">readyState</code> attribute is either
   <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code> or <code
   title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, then the
-  implementation must raise an <code>INVALID_STATE_ERR</code>
-  exception.</p>
+  implementation must return without drawing anything.</p>
   <!-- createPattern() has an equivalent paragraph -->
 
   <p>If the <var title="">image</var> argument is an
   <code>HTMLCanvasElement</code> object with either a horizontal
   dimension or a vertical dimension equal to zero, then the
   implementation must raise an <code>INVALID_STATE_ERR</code>
   exception.</p>
   <!-- createPattern() has an equivalent paragraph -->
 
   <p>The source rectangle is the rectangle whose corners are the four

|