Skip to content

Commit

Permalink
[giow] (3) Clarify how to handle zero-width <img>s in drawImage(), an…
Browse files Browse the repository at this point in the history
…d make zero-width <canvas>es not throw.

Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@8228 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 16, 2013
1 parent a580aec commit 76782de
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions complete.html
Expand Up @@ -36126,9 +36126,13 @@ <h6 id=image-sources-for-2d-rendering-contexts><span class=secno>4.8.11.2.9 </sp
argument is an <code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then return <i>bad</i> and abort these
steps.</li>

<li><p>If the <var title="">image</var> argument is an <code><a href=#htmlimageelement>HTMLImageElement</a></code> object with
an intrinsic width or intrinsic height (or both) equal to zero, then return <i>bad</i> and abort
these steps.</p> <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2567 -->

<li><p>If the <var title="">image</var> argument is an <code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with
either a horizontal dimension or a vertical dimension equal to zero, then throw an
<code><a href=#invalidstateerror>InvalidStateError</a></code> exception, return <i>aborted</i>, and abort these steps.</p>
either a horizontal dimension or a vertical dimension equal to zero, then return <i>bad</i> and
abort these steps.</p>

<li><p>Return <i>good</i>.</li>

Expand Down
8 changes: 6 additions & 2 deletions index
Expand Up @@ -36126,9 +36126,13 @@ try {
argument is an <code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then return <i>bad</i> and abort these
steps.</li>

<li><p>If the <var title="">image</var> argument is an <code><a href=#htmlimageelement>HTMLImageElement</a></code> object with
an intrinsic width or intrinsic height (or both) equal to zero, then return <i>bad</i> and abort
these steps.</p> <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2567 -->

<li><p>If the <var title="">image</var> argument is an <code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with
either a horizontal dimension or a vertical dimension equal to zero, then throw an
<code><a href=#invalidstateerror>InvalidStateError</a></code> exception, return <i>aborted</i>, and abort these steps.</p>
either a horizontal dimension or a vertical dimension equal to zero, then return <i>bad</i> and
abort these steps.</p>

<li><p>Return <i>good</i>.</li>

Expand Down
8 changes: 6 additions & 2 deletions source
Expand Up @@ -39289,9 +39289,13 @@ try {
title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, then return <i>bad</i> and abort these
steps.</p></li>

<li><p>If the <var title="">image</var> argument is an <code>HTMLImageElement</code> object with
an intrinsic width or intrinsic height (or both) equal to zero, then return <i>bad</i> and abort
these steps.</p> <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2567 -->

<li><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 throw an
<code>InvalidStateError</code> exception, return <i>aborted</i>, and abort these steps.</p>
either a horizontal dimension or a vertical dimension equal to zero, then return <i>bad</i> and
abort these steps.</p>

<li><p>Return <i>good</i>.</p></li>

Expand Down

0 comments on commit 76782de

Please sign in to comment.