Skip to content

Commit

Permalink
[gow] (2) Make the spec more consistent about Infinity and NaN values…
Browse files Browse the repository at this point in the history
… throwing NOT_SUPPORTED_ERR.

git-svn-id: http://svn.whatwg.org/webapps@1760 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 13, 2008
1 parent 27d1280 commit 090dbc1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
20 changes: 11 additions & 9 deletions index
Expand Up @@ -18850,7 +18850,7 @@ idea from Mihai:
gradient. If any of the arguments to <code
title=dom-context-2d-createLinearGradient><a
href="#createlineargradient">createLinearGradient()</a></code> are
infinite or NaN, the method must raise an <code>INDEX_SIZE_ERR</code>
infinite or NaN, the method must raise a <code>NOT_SUPPORTED_ERR</code>
exception. Otherwise, the method must return a linear <code><a
href="#canvasgradient">CanvasGradient</a></code> initialized with the
specified line.
Expand Down Expand Up @@ -18879,10 +18879,11 @@ idea from Mihai:
<var title="">y0</var>) and radius <var title="">r0</var>, and the last
three representing the end circle with origin (<var title="">x1</var>,
<var title="">y1</var>) and radius <var title="">r1</var>. The values are
in coordinate space units. If either of <var title="">r0</var> or <var
title="">r1</var> are negative, or if any of the arguments are infinite or
NaN, an <code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise,
the method must return a radial <code><a
in coordinate space units. If any of the arguments are infinite or NaN, a
<code>NOT_SUPPORTED_ERR</code> exception must be raised. If either of <var
title="">r0</var> or <var title="">r1</var> are negative, an
<code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise, the
method must return a radial <code><a
href="#canvasgradient">CanvasGradient</a></code> initialized with the two
specified circles, after transforming them according to the <a
href="#transformations0" title=dom-context-2d-transformation>current
Expand Down Expand Up @@ -20214,7 +20215,8 @@ XXXDVT (also check for '- -' bits in the part above) -->
<p>If any of the arguments to <code title=dom-context-2d-createImageData><a
href="#createimagedata">createImageData()</a></code> or <code
title=dom-context-2d-getImageData><a
href="#getimagedata">getImageData()</a></code> are infinite or NaN, or if
href="#getimagedata">getImageData()</a></code> are infinite or NaN, the
method must instead raise a <code>NOT_SUPPORTED_ERR</code> exception. If
either the <var title="">sw</var> or <var title="">sh</var> arguments are
zero, the method must instead raise an <code>INDEX_SIZE_ERR</code>
exception.
Expand Down Expand Up @@ -20278,15 +20280,15 @@ XXXDVT (also check for '- -' bits in the part above) -->
method writes data from <code><a href="#imagedata">ImageData</a></code>
structures back to the canvas.

<p>If any of the arguments to the method are infinite or NaN, the method
must raise an <code>NOT_SUPPORTED_ERR</code> exception.

<p>If the first argument to the method is null or not an <code><a
href="#imagedata">ImageData</a></code> object then the <code
title=dom-context-2d-putImageData><a
href="#putimagedata">putImageData()</a></code> method must raise a
<code>TYPE_MISMATCH_ERR</code> exception.

<p>If any of the arguments to the method are infinite or NaN, the method
must raise an <code>INDEX_SIZE_ERR</code> exception.

<p>When the last four arguments are omitted, they must be assumed to have
the values 0, 0, the <code title=dom-imagedata-width><a
href="#width3">width</a></code> member of the <var
Expand Down
31 changes: 17 additions & 14 deletions source
Expand Up @@ -16445,8 +16445,8 @@ idea from Mihai:
<var title="">y0</var>) and end point (<var title="">x1</var>, <var
title="">y1</var>) of the gradient. If any of the arguments to <code
title="dom-context-2d-createLinearGradient">createLinearGradient()</code>
are infinite or NaN, the method must raise an
<code>INDEX_SIZE_ERR</code> exception. Otherwise, the method must
are infinite or NaN, the method must raise a
<code>NOT_SUPPORTED_ERR</code> exception. Otherwise, the method must
return a linear <code>CanvasGradient</code> initialized with the
specified line.</p>

Expand Down Expand Up @@ -16475,12 +16475,13 @@ idea from Mihai:
title="">r0</var>, and the last three representing the end circle
with origin (<var title="">x1</var>, <var title="">y1</var>) and
radius <var title="">r1</var>. The values are in coordinate space
units. If either of <var title="">r0</var> or <var title="">r1</var>
are negative, or if any of the arguments are infinite or NaN, an
<code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise, the
method must return a radial <code>CanvasGradient</code> initialized
with the two specified circles, after transforming them according to
the <span title="dom-context-2d-transformation">current
units. If any of the arguments are infinite or NaN, a
<code>NOT_SUPPORTED_ERR</code> exception must be raised. If either
of <var title="">r0</var> or <var title="">r1</var> are negative, an
<code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise,
the method must return a radial <code>CanvasGradient</code>
initialized with the two specified circles, after transforming them
according to the <span title="dom-context-2d-transformation">current
transformation matrix</span>.</p>

<p>Radial gradients must be rendered by following these steps:</p>
Expand Down Expand Up @@ -17860,9 +17861,11 @@ XXXDVT (also check for '- -' bits in the part above) -->
<p>If any of the arguments to <code
title="dom-context-2d-createImageData">createImageData()</code> or
<code title="dom-context-2d-getImageData">getImageData()</code> are
infinite or NaN, or if either the <var title="">sw</var> or <var
title="">sh</var> arguments are zero, the method must instead raise
an <code>INDEX_SIZE_ERR</code> exception.</p>
infinite or NaN, the method must instead raise a
<code>NOT_SUPPORTED_ERR</code> exception. If either the <var
title="">sw</var> or <var title="">sh</var> arguments are zero, the
method must instead raise an <code>INDEX_SIZE_ERR</code>
exception.</p>

<p><code>ImageData</code> objects must be initialized so that their
<dfn title="dom-imagedata-width"><code>width</code></dfn> attribute
Expand Down Expand Up @@ -17924,14 +17927,14 @@ XXXDVT (also check for '- -' bits in the part above) -->
title="">dirtyHeight</var>)</code></dfn> method writes data from
<code>ImageData</code> structures back to the canvas.</p>

<p>If any of the arguments to the method are infinite or NaN, the
method must raise an <code>NOT_SUPPORTED_ERR</code> exception.</p>

<p>If the first argument to the method is null or not an
<code>ImageData</code> object then the <code
title="dom-context-2d-putImageData">putImageData()</code> method
must raise a <code>TYPE_MISMATCH_ERR</code> exception.</p>

<p>If any of the arguments to the method are infinite or NaN, the
method must raise an <code>INDEX_SIZE_ERR</code> exception.</p>

<p>When the last four arguments are omitted, they must be assumed to
have the values 0, 0, the <code
title="dom-imagedata-width">width</code> member of the <var
Expand Down

0 comments on commit 090dbc1

Please sign in to comment.