Permalink
Browse files

Editorial: clarify "check the usability of the image argument"

The algorithm stated it returned good, bad, or aborted, but in fact it
returned either good or bad or threw an exception.

This is fallout from 99e2cdf.
  • Loading branch information...
annevk authored and domenic committed Jan 12, 2018
1 parent 29d8343 commit 0d7aa2e0b6c57d7475e72f4355ec64bd4b7dfcf8
Showing with 6 additions and 10 deletions.
  1. +6 −10 source
View
16 source
@@ -62251,13 +62251,10 @@ try {
<p class="note">The <code>ImageBitmap</code> interface can be created from a number of other
image-representing types, including <code>ImageData</code>.</p>
<p>When a user agent is required to <dfn>check the usability of the <var>image</var>
argument</dfn>, where <var>image</var> is a <code>CanvasImageSource</code> object, the
user agent must run these steps, which return either <i>good</i>, <i>bad</i>, or
<i>aborted</i>:</p>
<p>To <dfn>check the usability of the <var>image</var> argument</dfn>, where <var>image</var> is a
<code>CanvasImageSource</code> object, run these steps:</p>
<ol>
<li><p>If <var>image</var> is an <code>HTMLOrSVGImageElement</code> object whose <span>current
request</span>'s <span data-x="img-req-state">state</span> is <span
data-x="img-error">broken</span>, then throw an <span>"<code>InvalidStateError</code>"</span>
@@ -62282,7 +62279,6 @@ try {
<span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p></li>
<li><p>Return <i>good</i>.</p></li>
</ol>
<p>When a <code>CanvasImageSource</code> object represents an <code>HTMLOrSVGImageElement</code>,
@@ -63650,10 +63646,10 @@ v6DVT (also check for '- -' bits in the part above) -->
<ol>
<li><p>If any of the arguments are infinite or NaN, then return.</p></li>
<li><p><span>Check the usability of the <var>image</var> argument</span>. If this
returns <i>aborted</i>, then an exception has been thrown and the method doesn't return anything.
If it returns <i>bad</i>, without drawing anything.
Otherwise it returns <i>good</i>; continue with these steps.</p></li>
<li><p>Let <var>usability</var> be the result of <span data-x="check the usability of the image
argument">checking the usability of <var>image</var></span>.</p></li>
<li><p>If <var>usability</var> is <i>bad</i>, then return (without drawing anything).</p></li>
<li>

0 comments on commit 0d7aa2e

Please sign in to comment.