HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/6880

SVNBugCommentTime (UTC)
6880[Gecko] [Internet Explorer] [Opera] [Webkit] Define what should happen with canvas.toBlob() for zero-sized canvases.2012-01-07 00:13
Index: source
===================================================================
--- source	(revision 6879)
+++ source	(revision 6880)
@@ -40097,10 +40097,18 @@
    <li><p>Let <var title="">arguments</var> be the second and
    subsequent arguments to the method, if any.</p></li>
 
-   <li><p>Let <var title="">file</var> be <span>a serialization of the
-   image as a file</span>, using <var
-   title="">arguments</var>.</p></li>
+   <li>
 
+    <p>If the canvas has no pixels (i.e. either its horizontal
+    dimension or its vertical dimension is zero) then let <var
+    title="">result</var> be null.</p>
+
+    <p>Otherwise, let <var title="">result</var> be a
+    <code>Blob</code> object representing <span>a serialization of the
+    image as a file</span>, using <var title="">arguments</var>.</p>
+
+   </li>
+
    <li><p>Return, but continue running these steps
    asynchronously.</p></li>
 
@@ -40108,11 +40116,10 @@
    steps.</p></li>
 
    <li><p><span>Queue a task</span> to invoke the
-   <code>FileCallback</code> <var title="">callback</var> with a
-   <code>Blob</code> object representing <var title="">file</var> as
-   its argument. The <span>task source</span> for this task is the
-   <dfn>canvas blob serialization task source</dfn>. <a
-   href="#refsFILESYSTEMAPI">[FILESYSTEMAPI]</a> <a
+   <code>FileCallback</code> <var title="">callback</var> with <var
+   title="">result</var> as its argument. The <span>task source</span>
+   for this task is the <dfn>canvas blob serialization task
+   source</dfn>. <a href="#refsFILESYSTEMAPI">[FILESYSTEMAPI]</a> <a
    href="#refsFILEAPI">[FILEAPI]</a> </p></li>
 
   </ol>

|