Skip to content

Commit 200ac13

Browse files
authored
Move exception up in createImageBitmap()
The algorithm where it the rejected promise was returned could only return a bitmap. Also tidy up the dictionary member language a little bit.
1 parent d720617 commit 200ac13

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

source

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92921,6 +92921,12 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9292192921
<li><p>If either <var>sw</var> or <var>sh</var> is given and is 0, then return <var>p</var>
9292292922
rejected with a <code data-x="js-RangeError">RangeError</code>.</p></li>
9292392923

92924+
<li><p>If either <var>options</var>'s <dfn><code
92925+
data-x="dom-ImageBitmapOptions-resizeWidth">resizeWidth</code></dfn> or <var>options</var>'s
92926+
<dfn><code data-x="dom-ImageBitmapOptions-resizeHeight">resizeHeight</code></dfn> is present and
92927+
is 0, then return <var>p</var> rejected with an <span>"<code>InvalidStateError</code>"</span>
92928+
<code>DOMException</code>.</p></li>
92929+
9292492930
<li><p>Let <var>imageBitmap</var> be a new <code>ImageBitmap</code> object.</p></li>
9292592931

9292692932
<li>
@@ -92936,11 +92942,11 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9293692942
<code>DOMException</code>.</p></li>
9293792943

9293892944
<li><p>If <var>image</var>'s media data has no <span>intrinsic dimensions</span> (e.g., it's
92939-
a vector graphic with no specified content size), and both or either of the <dfn><code
92940-
data-x="dom-ImageBitmapOptions-resizeWidth">resizeWidth</code></dfn> and <dfn><code
92941-
data-x="dom-ImageBitmapOptions-resizeHeight">resizeHeight</code></dfn> options are not
92942-
specified, then return <var>p</var> rejected with an
92943-
<span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p></li>
92945+
a vector graphic with no specified content size) and either <var>options</var>'s <code
92946+
data-x="dom-ImageBitmapOptions-resizeWidth">resizeWidth</code> or <var>options</var>'s <code
92947+
data-x="dom-ImageBitmapOptions-resizeHeight">resizeHeight</code> is not present, then return
92948+
<var>p</var> rejected with an <span>"<code>InvalidStateError</code>"</span>
92949+
<code>DOMException</code>.</p></li>
9294492950

9294592951
<li><p>If <var>image</var>'s media data has no <span>intrinsic dimensions</span> (e.g., it's
9294692952
a vector graphics with no specified content size), it should be rendered to a bitmap of the
@@ -93143,11 +93149,6 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9314393149
<li><p>Let <var>input</var> be the <span data-x="concept-ImageBitmap-bitmap-data">bitmap
9314493150
data</span> being transformed.</p></li>
9314593151

93146-
<li><p>If either or both of <code data-x="dom-ImageBitmapOptions-resizeWidth">resizeWidth</code>
93147-
and <code data-x="dom-ImageBitmapOptions-resizeHeight">resizeHeight</code> members of
93148-
<var>options</var> are less than or equal to 0, then return a promise rejected with
93149-
<span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p></li>
93150-
9315193152
<li>
9315293153

9315393154
<p>If <var>sx</var>, <var>sy</var>, <var>sw</var> and <var>sh</var> are specified, let

0 commit comments

Comments
 (0)