[html5] r6880 - [giow] (1) Define what should happen with canvas.toBlob() for zero-sized canvase [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Jan 6 16:13:59 PST 2012


Author: ianh
Date: 2012-01-06 16:13:58 -0800 (Fri, 06 Jan 2012)
New Revision: 6880

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Define what should happen with canvas.toBlob() for zero-sized canvases.
Affected topics: Canvas, DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2012-01-06 20:46:22 UTC (rev 6879)
+++ complete.html	2012-01-07 00:13:58 UTC (rev 6880)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 6 January 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 7 January 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -34438,9 +34438,17 @@
    <li><p>Let <var title="">arguments</var> be the second and
    subsequent arguments to the method, if any.</li>
 
-   <li><p>Let <var title="">file</var> be <a href=#a-serialization-of-the-image-as-a-file>a serialization of the
-   image as a file</a>, using <var title="">arguments</var>.</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><a href=#blob>Blob</a></code> object representing <a href=#a-serialization-of-the-image-as-a-file>a serialization of the
+    image as a file</a>, using <var title="">arguments</var>.</p>
+
+   </li>
+
    <li><p>Return, but continue running these steps
    asynchronously.</li>
 
@@ -34448,10 +34456,9 @@
    steps.</li>
 
    <li><p><a href=#queue-a-task>Queue a task</a> to invoke the
-   <code>FileCallback</code> <var title="">callback</var> with a
-   <code><a href=#blob>Blob</a></code> object representing <var title="">file</var> as
-   its argument. The <a href=#task-source>task source</a> for this task is the
-   <dfn id=canvas-blob-serialization-task-source>canvas blob serialization task source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li>
+   <code>FileCallback</code> <var title="">callback</var> with <var title="">result</var> as its argument. The <a href=#task-source>task source</a>
+   for this task is the <dfn id=canvas-blob-serialization-task-source>canvas blob serialization task
+   source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li>
 
   </ol><p>When a user agent is to create <dfn id=a-serialization-of-the-image-as-a-file>a serialization of the image
   as a file</dfn>, optionally with some given <var title="">arguments</var>, it must create an image file in the format

Modified: index
===================================================================
--- index	2012-01-06 20:46:22 UTC (rev 6879)
+++ index	2012-01-07 00:13:58 UTC (rev 6880)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 6 January 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 7 January 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -34438,9 +34438,17 @@
    <li><p>Let <var title="">arguments</var> be the second and
    subsequent arguments to the method, if any.</li>
 
-   <li><p>Let <var title="">file</var> be <a href=#a-serialization-of-the-image-as-a-file>a serialization of the
-   image as a file</a>, using <var title="">arguments</var>.</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><a href=#blob>Blob</a></code> object representing <a href=#a-serialization-of-the-image-as-a-file>a serialization of the
+    image as a file</a>, using <var title="">arguments</var>.</p>
+
+   </li>
+
    <li><p>Return, but continue running these steps
    asynchronously.</li>
 
@@ -34448,10 +34456,9 @@
    steps.</li>
 
    <li><p><a href=#queue-a-task>Queue a task</a> to invoke the
-   <code>FileCallback</code> <var title="">callback</var> with a
-   <code><a href=#blob>Blob</a></code> object representing <var title="">file</var> as
-   its argument. The <a href=#task-source>task source</a> for this task is the
-   <dfn id=canvas-blob-serialization-task-source>canvas blob serialization task source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li>
+   <code>FileCallback</code> <var title="">callback</var> with <var title="">result</var> as its argument. The <a href=#task-source>task source</a>
+   for this task is the <dfn id=canvas-blob-serialization-task-source>canvas blob serialization task
+   source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li>
 
   </ol><p>When a user agent is to create <dfn id=a-serialization-of-the-image-as-a-file>a serialization of the image
   as a file</dfn>, optionally with some given <var title="">arguments</var>, it must create an image file in the format

Modified: source
===================================================================
--- source	2012-01-06 20:46:22 UTC (rev 6879)
+++ source	2012-01-07 00:13:58 UTC (rev 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>




More information about the Commit-Watchers mailing list