[html5] r7888 - [giow] (3) Match reality better Fixing https://www.w3.org/Bugs/Public/show_bug.c [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Jun 3 16:22:51 PDT 2013
Author: ianh
Date: 2013-06-03 16:22:49 -0700 (Mon, 03 Jun 2013)
New Revision: 7888
Modified:
complete.html
index
source
Log:
[giow] (3) Match reality better
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=21337
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2013-06-03 23:16:33 UTC (rev 7887)
+++ complete.html 2013-06-03 23:22:49 UTC (rev 7888)
@@ -37686,6 +37686,9 @@
dimensions. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData</a></code>(<var title="">imagedata</var>)</dt>
@@ -37708,6 +37711,9 @@
space unit. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData</a></code>(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</dt>
@@ -37817,6 +37823,7 @@
</dd>
</dl><div class=impl>
+<!--CLEANUP-->
<p>The <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData()</a></code> and
<code title=dom-context-2d-createImageDataHD><a href=#dom-context-2d-createimagedatahd>createImageDataHD()</a></code>
@@ -37826,19 +37833,22 @@
<p>When the <dfn id=dom-context-2d-createimagedata title=dom-context-2d-createImageData><code>createImageData()</code></dfn>
method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must
return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width in equal to the
- absolute magnitude of <var title="">sw</var> and a height equal to the absolute magnitude of <var title="">sh</var>, and with a 1.0 pixel density. When invoked with a single <var title="">imagedata</var> argument, it must return a new <code><a href=#imagedata>ImageData</a></code> object representing
+ absolute magnitude of <var title="">sw</var> and a height equal to the absolute magnitude of <var title="">sh</var>, and with a 1.0 pixel density, if both <var title="">sw</var> and <var title="">sh</var>
+ are non-zero. If one or both of <var title="">sw</var> and <var title="">sh</var> are zero, then the
+ method must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception instead. When invoked with a single <var title="">imagedata</var> argument, it must return a new <code><a href=#imagedata>ImageData</a></code> object representing
a rectangle with the same dimensions and pixel density as the <code><a href=#imagedata>ImageData</a></code> object passed
- as the argument. In either case, the <code><a href=#imagedata>ImageData</a></code> object returned must be filled with
+ as the argument. When the method returns an <code><a href=#imagedata>ImageData</a></code> object, it must be filled with
transparent black.</p>
<p>When the <dfn id=dom-context-2d-createimagedatahd title=dom-context-2d-createImageDataHD><code>createImageDataHD()</code></dfn>
- method is invoked (with its two arguments <var title="">sw</var> and <var title="">sh</var>) it
- must return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width in equal to
+ method is invoked and both of its arguments (<var title="">sw</var> and <var title="">sh</var>) are non-zero, it
+ must return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width equal to
the absolute magnitude of <var title="">sw</var> multiplied by <var title="">scale</var>, a height
equal to the absolute magnitude of <var title="">sh</var> multiplied by <var title="">scale</var>,
and a pixel density equal to <var title="">scale</var>, where <var title="">scale</var> is the
number of pixels in the <a href=#scratch-bitmap>scratch bitmap</a> per coordinate space units. The
- <code><a href=#imagedata>ImageData</a></code> object returned must be filled with transparent black.</p>
+ <code><a href=#imagedata>ImageData</a></code> object returned must be filled with transparent black. If either or both
+ of the arguments are zero, the method must instead throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>
<p>The <dfn id=dom-context-2d-getimagedata title=dom-context-2d-getImageData><code>getImageData(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</code></dfn> method must, if
either the <var title="">sw</var> or <var title="">sh</var> arguments are zero, throw an
@@ -37847,7 +37857,6 @@
if the <a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#concept-canvas-origin-clean title=concept-canvas-origin-clean>origin-clean</a>
flag is set to false, it must throw a <code><a href=#securityerror>SecurityError</a></code> exception;
<!--REMOVE-TOPIC:Security-->
-
otherwise, it must return an <code><a href=#imagedata>ImageData</a></code> object with width <var title="">sw</var> and
height <var title="">sh</var> representing the <a href=#scratch-bitmap>scratch bitmap</a> for the area of that
bitmap denoted by the rectangle whose corners are the four points (<var title="">sx</var>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>), (<var title="">sx</var>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>), in the bitmap's coordinate space
Modified: index
===================================================================
--- index 2013-06-03 23:16:33 UTC (rev 7887)
+++ index 2013-06-03 23:22:49 UTC (rev 7888)
@@ -37686,6 +37686,9 @@
dimensions. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData</a></code>(<var title="">imagedata</var>)</dt>
@@ -37708,6 +37711,9 @@
space unit. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData</a></code>(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</dt>
@@ -37817,6 +37823,7 @@
</dd>
</dl><div class=impl>
+<!--CLEANUP-->
<p>The <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData()</a></code> and
<code title=dom-context-2d-createImageDataHD><a href=#dom-context-2d-createimagedatahd>createImageDataHD()</a></code>
@@ -37826,19 +37833,22 @@
<p>When the <dfn id=dom-context-2d-createimagedata title=dom-context-2d-createImageData><code>createImageData()</code></dfn>
method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must
return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width in equal to the
- absolute magnitude of <var title="">sw</var> and a height equal to the absolute magnitude of <var title="">sh</var>, and with a 1.0 pixel density. When invoked with a single <var title="">imagedata</var> argument, it must return a new <code><a href=#imagedata>ImageData</a></code> object representing
+ absolute magnitude of <var title="">sw</var> and a height equal to the absolute magnitude of <var title="">sh</var>, and with a 1.0 pixel density, if both <var title="">sw</var> and <var title="">sh</var>
+ are non-zero. If one or both of <var title="">sw</var> and <var title="">sh</var> are zero, then the
+ method must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception instead. When invoked with a single <var title="">imagedata</var> argument, it must return a new <code><a href=#imagedata>ImageData</a></code> object representing
a rectangle with the same dimensions and pixel density as the <code><a href=#imagedata>ImageData</a></code> object passed
- as the argument. In either case, the <code><a href=#imagedata>ImageData</a></code> object returned must be filled with
+ as the argument. When the method returns an <code><a href=#imagedata>ImageData</a></code> object, it must be filled with
transparent black.</p>
<p>When the <dfn id=dom-context-2d-createimagedatahd title=dom-context-2d-createImageDataHD><code>createImageDataHD()</code></dfn>
- method is invoked (with its two arguments <var title="">sw</var> and <var title="">sh</var>) it
- must return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width in equal to
+ method is invoked and both of its arguments (<var title="">sw</var> and <var title="">sh</var>) are non-zero, it
+ must return a new <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width equal to
the absolute magnitude of <var title="">sw</var> multiplied by <var title="">scale</var>, a height
equal to the absolute magnitude of <var title="">sh</var> multiplied by <var title="">scale</var>,
and a pixel density equal to <var title="">scale</var>, where <var title="">scale</var> is the
number of pixels in the <a href=#scratch-bitmap>scratch bitmap</a> per coordinate space units. The
- <code><a href=#imagedata>ImageData</a></code> object returned must be filled with transparent black.</p>
+ <code><a href=#imagedata>ImageData</a></code> object returned must be filled with transparent black. If either or both
+ of the arguments are zero, the method must instead throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>
<p>The <dfn id=dom-context-2d-getimagedata title=dom-context-2d-getImageData><code>getImageData(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</code></dfn> method must, if
either the <var title="">sw</var> or <var title="">sh</var> arguments are zero, throw an
@@ -37847,7 +37857,6 @@
if the <a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#concept-canvas-origin-clean title=concept-canvas-origin-clean>origin-clean</a>
flag is set to false, it must throw a <code><a href=#securityerror>SecurityError</a></code> exception;
<!--REMOVE-TOPIC:Security-->
-
otherwise, it must return an <code><a href=#imagedata>ImageData</a></code> object with width <var title="">sw</var> and
height <var title="">sh</var> representing the <a href=#scratch-bitmap>scratch bitmap</a> for the area of that
bitmap denoted by the rectangle whose corners are the four points (<var title="">sx</var>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>), (<var title="">sx</var>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>), in the bitmap's coordinate space
Modified: source
===================================================================
--- source 2013-06-03 23:16:33 UTC (rev 7887)
+++ source 2013-06-03 23:22:49 UTC (rev 7888)
@@ -41191,6 +41191,9 @@
dimensions. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code>IndexSizeError</code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title="dom-context-2d-createImageData">createImageData</code>(<var title="">imagedata</var>)</dt>
@@ -41213,6 +41216,9 @@
space unit. All the pixels in the returned object are transparent
black.</p>
+ <p>Throws an <code>IndexSizeError</code> exception if the either
+ of the width or height arguments are zero.</p>
+
</dd>
<dt><var title="">imagedata</var> = <var title="">context</var> . <code title="dom-context-2d-getImageData">getImageData</code>(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</dt>
@@ -41327,6 +41333,7 @@
</dl>
<div class="impl">
+<!--CLEANUP-->
<p>The <code
title="dom-context-2d-createImageData">createImageData()</code> and
@@ -41339,20 +41346,23 @@
method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must
return a new <code>ImageData</code> object representing a rectangle with a width in equal to the
absolute magnitude of <var title="">sw</var> and a height equal to the absolute magnitude of <var
- title="">sh</var>, and with a 1.0 pixel density. When invoked with a single <var
+ title="">sh</var>, and with a 1.0 pixel density, if both <var title="">sw</var> and <var title="">sh</var>
+ are non-zero. If one or both of <var title="">sw</var> and <var title="">sh</var> are zero, then the
+ method must throw an <code>IndexSizeError</code> exception instead. When invoked with a single <var
title="">imagedata</var> argument, it must return a new <code>ImageData</code> object representing
a rectangle with the same dimensions and pixel density as the <code>ImageData</code> object passed
- as the argument. In either case, the <code>ImageData</code> object returned must be filled with
+ as the argument. When the method returns an <code>ImageData</code> object, it must be filled with
transparent black.</p>
<p>When the <dfn title="dom-context-2d-createImageDataHD"><code>createImageDataHD()</code></dfn>
- method is invoked (with its two arguments <var title="">sw</var> and <var title="">sh</var>) it
- must return a new <code>ImageData</code> object representing a rectangle with a width in equal to
+ method is invoked and both of its arguments (<var title="">sw</var> and <var title="">sh</var>) are non-zero, it
+ must return a new <code>ImageData</code> object representing a rectangle with a width equal to
the absolute magnitude of <var title="">sw</var> multiplied by <var title="">scale</var>, a height
equal to the absolute magnitude of <var title="">sh</var> multiplied by <var title="">scale</var>,
and a pixel density equal to <var title="">scale</var>, where <var title="">scale</var> is the
number of pixels in the <span>scratch bitmap</span> per coordinate space units. The
- <code>ImageData</code> object returned must be filled with transparent black.</p>
+ <code>ImageData</code> object returned must be filled with transparent black. If either or both
+ of the arguments are zero, the method must instead throw an <code>IndexSizeError</code> exception.</p>
<p>The <dfn title="dom-context-2d-getImageData"><code>getImageData(<var title="">sx</var>, <var
title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</code></dfn> method must, if
@@ -41362,7 +41372,6 @@
if the <span>scratch bitmap</span>'s <span title="concept-canvas-origin-clean">origin-clean</span>
flag is set to false, it must throw a <code>SecurityError</code> exception;
<!--REMOVE-TOPIC:Security-->
-
otherwise, it must return an <code>ImageData</code> object with width <var title="">sw</var> and
height <var title="">sh</var> representing the <span>scratch bitmap</span> for the area of that
bitmap denoted by the rectangle whose corners are the four points (<var title="">sx</var>, <var
More information about the Commit-Watchers
mailing list