Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (1) Define what should happen with canvas.toBlob() for zero-si…
…zed canvases.

Affected topics: Canvas, DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@6880 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2012
1 parent c1b1aa2 commit d47dc92
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 22 deletions.
21 changes: 14 additions & 7 deletions complete.html
Expand Up @@ -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 &mdash; Last Updated 6 January 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -34438,8 +34438,16 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co
<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>
Expand All @@ -34448,10 +34456,9 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co
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
Expand Down
21 changes: 14 additions & 7 deletions index
Expand Up @@ -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 &mdash; Last Updated 6 January 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -34438,8 +34438,16 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>Even
<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>
Expand All @@ -34448,10 +34456,9 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>Even
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
Expand Down
23 changes: 15 additions & 8 deletions source
Expand Up @@ -40097,9 +40097,17 @@ dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {
<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>
Expand All @@ -40108,11 +40116,10 @@ dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {
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>
Expand Down

0 comments on commit d47dc92

Please sign in to comment.