Short URL: http://html5.org/r/7129
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 7129 | 2012-06-11 23:07 |
Index: source
===================================================================
--- source (revision 7128)
+++ source (revision 7129)
@@ -2955,17 +2955,6 @@
characters</dfn> is similarly that defined in the Web IDL
specification.</p>
- <p id="float-nan">Except where otherwise specified, if an IDL
- attribute that is a floating point number type (<code
- title="">double</code>) is assigned an Infinity or Not-a-Number
- (NaN) value, a <code>NotSupportedError</code> exception must be
- thrown.</p>
-
- <p>Except where otherwise specified, if a method with an argument
- that is a floating point number type (<code title="">double</code>)
- is passed an Infinity or Not-a-Number (NaN) value, a
- <code>NotSupportedError</code> exception must be thrown.</p>
-
<p>When this specification requires a user agent to <dfn>create a
<code>Date</code> object</dfn> representing a particular time, the
milliseconds component of that time, if any, must be truncated to
@@ -8812,35 +8801,36 @@
value.</p> <!-- see previous paragraph for note about the range -->
<p>If a reflecting IDL attribute has a floating point number type
- (<code>double</code>), then, on getting, the content attribute must
- be parsed according to the <span>rules for parsing floating point
- number values</span>, and if that is successful, the resulting value
- must be returned. If, on the other hand, it fails, or if the
- attribute is absent, the default value must be returned instead, or
- 0.0 if there is no default value. On setting, the given value must
- be converted to the <span>best representation of the number as a
- floating point number</span> and then that string must be used as
- the new content attribute value.</p>
-
- <p>If a reflecting IDL attribute has a floating point number type
- (<code>double</code>) that is <dfn>limited to numbers greater than
- zero</dfn>, then the behavior is similar to the previous case, but
- zero and negative values are not allowed. On getting, the content
- attribute must be parsed according to the <span>rules for parsing
- floating point number values</span>, and if that is successful and
- the value is greater than 0.0, the resulting value must be returned.
- If, on the other hand, it fails or returns an out of range value, or
- if the attribute is absent, the default value must be returned
- instead, or 0.0 if there is no default value. On setting, if the
- value is less than or equal to zero, then the value must be ignored.
- Otherwise, the given value must be converted to the <span>best
+ (<code>double</code> or <code>unrestricted double</code>), then, on
+ getting, the content attribute must be parsed according to the
+ <span>rules for parsing floating point number values</span>, and if
+ that is successful, the resulting value must be returned. If, on the
+ other hand, it fails, or if the attribute is absent, the default
+ value must be returned instead, or 0.0 if there is no default value.
+ On setting, the given value must be converted to the <span>best
representation of the number as a floating point number</span> and
then that string must be used as the new content attribute
value.</p>
+ <p>If a reflecting IDL attribute has a floating point number type
+ (<code>double</code> or <code>unrestricted double</code>) that is
+ <dfn>limited to numbers greater than zero</dfn>, then the behavior
+ is similar to the previous case, but zero and negative values are
+ not allowed. On getting, the content attribute must be parsed
+ according to the <span>rules for parsing floating point number
+ values</span>, and if that is successful and the value is greater
+ than 0.0, the resulting value must be returned. If, on the other
+ hand, it fails or returns an out of range value, or if the attribute
+ is absent, the default value must be returned instead, or 0.0 if
+ there is no default value. On setting, if the value is less than or
+ equal to zero, then the value must be ignored. Otherwise, the given
+ value must be converted to the <span>best representation of the
+ number as a floating point number</span> and then that string must
+ be used as the new content attribute value.</p>
+
<p class="note">The values Infinity and Not-a-Number (NaN) values
- throw an exception on setting, as <a href="#float-nan">defined
- earlier</a>.</p>
+ throw an exception on setting, as defined in the Web IDL
+ specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
<p>If a reflecting IDL attribute has the type
<code>DOMTokenList</code> or <code>DOMSettableTokenList</code>, then
@@ -30634,7 +30624,7 @@
// playback state
attribute double <span title="dom-media-currentTime">currentTime</span>;
- readonly attribute double <span title="dom-media-duration">duration</span>;
+ readonly attribute unrestricted double <span title="dom-media-duration">duration</span>;
readonly attribute <span>Date</span> <span title="dom-media-startDate">startDate</span>;
readonly attribute boolean <span title="dom-media-paused">paused</span>;
attribute double <span title="dom-media-defaultPlaybackRate">defaultPlaybackRate</span>;
@@ -34682,7 +34672,7 @@
readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-buffered">buffered</span>;
readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-seekable">seekable</span>;
- readonly attribute double <span title="dom-MediaController-duration">duration</span>;
+ readonly attribute unrestricted double <span title="dom-MediaController-duration">duration</span>;
attribute double <span title="dom-MediaController-currentTime">currentTime</span>;
readonly attribute boolean <span title="dom-MediaController-paused">paused</span>;
@@ -41427,11 +41417,11 @@
-->
// transformations (default transform is the identity matrix)
attribute <span>SVGMatrix</span> <span title="dom-context-2d-currentTransform">currentTransform</span>;
- void <span title="dom-context-2d-scale">scale</span>(double x, double y);
- void <span title="dom-context-2d-rotate">rotate</span>(double angle);
- void <span title="dom-context-2d-translate">translate</span>(double x, double y);
- void <span title="dom-context-2d-transform">transform</span>(double a, double b, double c, double d, double e, double f);
- void <span title="dom-context-2d-setTransform">setTransform</span>(double a, double b, double c, double d, double e, double f);
+ void <span title="dom-context-2d-scale">scale</span>(unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-rotate">rotate</span>(unrestricted double angle);
+ void <span title="dom-context-2d-translate">translate</span>(unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-transform">transform</span>(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
+ void <span title="dom-context-2d-setTransform">setTransform</span>(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
void <span title="dom-context-2d-resetTransform">resetTransform</span>();
<!--
// v7 we've also received requests (though not many so far) for:
@@ -41440,7 +41430,7 @@
-->
// compositing
- attribute double <span title="dom-context-2d-globalAlpha">globalAlpha</span>; // (default 1.0)
+ attribute unrestricted double <span title="dom-context-2d-globalAlpha">globalAlpha</span>; // (default 1.0)
attribute DOMString <span title="dom-context-2d-globalCompositeOperation">globalCompositeOperation</span>; // (default source-over)
// image smoothing
@@ -41458,20 +41448,20 @@
// colors and styles (see also the <span>CanvasDrawingStyles</span> interface)
attribute any <span title="dom-context-2d-strokeStyle">strokeStyle</span>; // (default black)
attribute any <span title="dom-context-2d-fillStyle">fillStyle</span>; // (default black)
- <span>CanvasGradient</span> <span title="dom-context-2d-createLinearGradient">createLinearGradient</span>(double x0, double y0, double x1, double y1);
- <span>CanvasGradient</span> <span title="dom-context-2d-createRadialGradient">createRadialGradient</span>(double x0, double y0, double r0, double x1, double y1, double r1);
+ <span>CanvasGradient</span> <span title="dom-context-2d-createLinearGradient">createLinearGradient</span>(unrestricted double x0, unrestricted double y0, unrestricted double x1, unrestricted double y1);
+ <span>CanvasGradient</span> <span title="dom-context-2d-createRadialGradient">createRadialGradient</span>(unrestricted double x0, unrestricted double y0, unrestricted double r0, unrestricted double x1, unrestricted double y1, unrestricted double r1);
<span>CanvasPattern</span> <span title="dom-context-2d-createPattern">createPattern</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, DOMString repetition);
// shadows
- attribute double <span title="dom-context-2d-shadowOffsetX">shadowOffsetX</span>; // (default 0)
- attribute double <span title="dom-context-2d-shadowOffsetY">shadowOffsetY</span>; // (default 0)
- attribute double <span title="dom-context-2d-shadowBlur">shadowBlur</span>; // (default 0)
+ attribute unrestricted double <span title="dom-context-2d-shadowOffsetX">shadowOffsetX</span>; // (default 0)
+ attribute unrestricted double <span title="dom-context-2d-shadowOffsetY">shadowOffsetY</span>; // (default 0)
+ attribute unrestricted double <span title="dom-context-2d-shadowBlur">shadowBlur</span>; // (default 0)
attribute DOMString <span title="dom-context-2d-shadowColor">shadowColor</span>; // (default transparent black)
// rects
- void <span title="dom-context-2d-clearRect">clearRect</span>(double x, double y, double w, double h);
- void <span title="dom-context-2d-fillRect">fillRect</span>(double x, double y, double w, double h);
- void <span title="dom-context-2d-strokeRect">strokeRect</span>(double x, double y, double w, double h);
+ void <span title="dom-context-2d-clearRect">clearRect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
+ void <span title="dom-context-2d-fillRect">fillRect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
+ void <span title="dom-context-2d-strokeRect">strokeRect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
// path API (see also <span>CanvasPathMethods</span>)
void <span title="dom-context-2d-beginPath">beginPath</span>();
@@ -41488,30 +41478,30 @@
void <span title="dom-context-2d-clip">clip</span>();
void <span title="dom-context-2d-clip">clip</span>(<span>Path</span> path);
void <span title="dom-context-2d-resetClip">resetClip</span>();
- boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(double x, double y);
- boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, double x, double y);
+ boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(unrestricted double x, unrestricted double y);
+ boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, unrestricted double x, unrestricted double y);
// text (see also the <span>CanvasDrawingStyles</span> interface)
- void <span title="dom-context-2d-fillText">fillText</span>(DOMString text, double x, double y, optional double maxWidth);
- void <span title="dom-context-2d-strokeText">strokeText</span>(DOMString text, double x, double y, optional double maxWidth);<!-- v6DVT
- void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(DOMString text, double x, double y, optional double maxHeight);
- void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(DOMString text, double x, double y, optional double maxHeight); -->
+ void <span title="dom-context-2d-fillText">fillText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <span title="dom-context-2d-strokeText">strokeText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);<!-- v6DVT
+ void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxHeight);
+ void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxHeight); -->
<span>TextMetrics</span> <span title="dom-context-2d-measureText">measureText</span>(DOMString text);
// drawing images
- void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double dx, double dy);
- void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double dx, double dy, double dw, double dh);
- void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
+ void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, unrestricted double dx, unrestricted double dy);
+ void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
+ void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
// hit regions
void <span title="dom-context-2d-addHitRegion">addHitRegion</span>(<span>HitRegionOptions</span> options);
// pixel manipulation
- <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(double sw, double sh);
+ <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(unrestricted double sw, unrestricted double sh);
<span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(<span>ImageData</span> imagedata);
- <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(double sx, double sy, double sw, double sh);
- void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, double dx, double dy);
- void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
+ <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh);
+ void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, unrestricted double dx, unrestricted double dy);
+ void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, unrestricted double dx, unrestricted double dy, unrestricted double dirtyX, unrestricted double dirtyY, unrestricted double dirtyWidth, unrestricted double dirtyHeight);
};
<span>CanvasRenderingContext2D</span> implements <span>CanvasDrawingStyles</span>;
<span>CanvasRenderingContext2D</span> implements <span>CanvasPathMethods</span>;
@@ -41519,15 +41509,15 @@
[NoInterfaceObject]
interface <dfn>CanvasDrawingStyles</dfn> {
// line caps/joins
- attribute double <span title="dom-context-2d-lineWidth">lineWidth</span>; // (default 1)
+ attribute unrestricted double <span title="dom-context-2d-lineWidth">lineWidth</span>; // (default 1)
attribute DOMString <span title="dom-context-2d-lineCap">lineCap</span>; // "butt", "round", "square" (default "butt")
attribute DOMString <span title="dom-context-2d-lineJoin">lineJoin</span>; // "round", "bevel", "miter" (default "miter")
- attribute double <span title="dom-context-2d-miterLimit">miterLimit</span>; // (default 10)
+ attribute unrestricted double <span title="dom-context-2d-miterLimit">miterLimit</span>; // (default 10)
// dashed lines
- void <span title="dom-context-2d-setLineDash">setLineDash</span>(sequence<double> segments); // default empty
- sequence<double> <span title="dom-context-2d-getLineDash">getLineDash</span>();
- attribute double <span title="dom-context-2d-lineDashOffset">lineDashOffset</span>;
+ void <span title="dom-context-2d-setLineDash">setLineDash</span>(sequence<unrestricted double> segments); // default empty
+ sequence<unrestricted double> <span title="dom-context-2d-getLineDash">getLineDash</span>();
+ attribute unrestricted double <span title="dom-context-2d-lineDashOffset">lineDashOffset</span>;
// text
attribute DOMString <span title="dom-context-2d-font">font</span>; // (default 10px sans-serif)
@@ -41539,20 +41529,20 @@
interface <dfn>CanvasPathMethods</dfn> {
// shared path API methods
void <span title="dom-context-2d-closePath">closePath</span>();
- void <span title="dom-context-2d-moveTo">moveTo</span>(double x, double y);
- void <span title="dom-context-2d-lineTo">lineTo</span>(double x, double y);
- void <span title="dom-context-2d-quadraticCurveTo">quadraticCurveTo</span>(double cpx, double cpy, double x, double y);
- void <span title="dom-context-2d-bezierCurveTo">bezierCurveTo</span>(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
- void <span title="dom-context-2d-arcTo">arcTo</span>(double x1, double y1, double x2, double y2, double radius); <!-- see ARC-ORDER note below -->
- void <span title="dom-context-2d-arcTo">arcTo</span>(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation); <!-- see ARC-ORDER note below -->
- void <span title="dom-context-2d-rect">rect</span>(double x, double y, double w, double h);
- void <span title="dom-context-2d-arc">arc</span>(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false); <!-- see ARC-ORDER note below -->
- void <span title="dom-context-2d-ellipse">ellipse</span>(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, boolean anticlockwise); <!-- see ARC-ORDER note below -->
+ void <span title="dom-context-2d-moveTo">moveTo</span>(unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-lineTo">lineTo</span>(unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-quadraticCurveTo">quadraticCurveTo</span>(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-bezierCurveTo">bezierCurveTo</span>(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
+ void <span title="dom-context-2d-arcTo">arcTo</span>(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); <!-- see ARC-ORDER note below -->
+ void <span title="dom-context-2d-arcTo">arcTo</span>(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation); <!-- see ARC-ORDER note below -->
+ void <span title="dom-context-2d-rect">rect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
+ void <span title="dom-context-2d-arc">arc</span>(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); <!-- see ARC-ORDER note below -->
+ void <span title="dom-context-2d-ellipse">ellipse</span>(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, boolean anticlockwise); <!-- see ARC-ORDER note below -->
};
interface <dfn>CanvasGradient</dfn> {
// opaque object
- void <span title="dom-canvasgradient-addColorStop">addColorStop</span>(double offset, DOMString color);
+ void <span title="dom-canvasgradient-addColorStop">addColorStop</span>(unrestricted double offset, DOMString color);
};
interface <dfn>CanvasPattern</dfn> {
@@ -41607,10 +41597,10 @@
interface <dfn>Path</dfn> {
void <span title="dom-path-addPath">addPath</span>(<span>Path</span> path, <span>SVGMatrix</span>? transformation);
void <span title="dom-path-addPathByStrokingPath">addPathByStrokingPath</span>(<span>Path</span> path, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation);
- void <span title="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, double x, double y, optional double maxWidth);
- void <span title="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, double x, double y, optional double maxWidth);
- void <span title="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional double maxWidth);
- void <span title="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional double maxWidth);
+ void <span title="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <span title="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <span title="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional unrestricted double maxWidth);
+ void <span title="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional unrestricted double maxWidth);
};
<span>Path</span> implements <span>CanvasPathMethods</span>;</pre>
@@ -52911,7 +52901,7 @@
attribute DOMString <span title="dom-input-defaultValue">defaultValue</span>;
attribute DOMString <span title="dom-input-value">value</span>;
attribute <span>Date</span>? <span title="dom-input-valueAsDate">valueAsDate</span>;
- attribute double <span title="dom-input-valueAsNumber">valueAsNumber</span>;
+ attribute unrestricted double <span title="dom-input-valueAsNumber">valueAsNumber</span>;
attribute unsigned long <span title="dom-input-width">width</span>;
void <span title="dom-input-stepUp">stepUp</span>(optional long n);