[html5] r4331 - [e] (0) Try to be more explicit about what happens with parsing strings into flo [...]
whatwg at whatwg.org
whatwg at whatwg.org
Sun Oct 25 02:18:13 PDT 2009
Author: ianh
Date: 2009-10-25 02:18:09 -0700 (Sun, 25 Oct 2009)
New Revision: 4331
Modified:
complete.html
index
source
Log:
[e] (0) Try to be more explicit about what happens with parsing strings into floats for out-of-range or over-precise values.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8047
Modified: complete.html
===================================================================
--- complete.html 2009-10-25 08:37:32 UTC (rev 4330)
+++ complete.html 2009-10-25 09:18:09 UTC (rev 4331)
@@ -5558,13 +5558,14 @@
(<code>float</code>), then, on getting, the content attribute must
be parsed according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating point
number values</a>, and if that is successful, and the value is in
- the range of the IDL attribute's type, 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,
- the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation
- of the number as a floating point number</a> and then that string
- must be used as the new content attribute value.</p>
+ the range of the IDL attribute's type (excluding infinities), the
+ resulting value must be returned, truncating it if necessary. 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, the given value must
+ be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the number as a
+ floating point number</a> 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
Modified: index
===================================================================
--- index 2009-10-25 08:37:32 UTC (rev 4330)
+++ index 2009-10-25 09:18:09 UTC (rev 4331)
@@ -5368,13 +5368,14 @@
(<code>float</code>), then, on getting, the content attribute must
be parsed according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating point
number values</a>, and if that is successful, and the value is in
- the range of the IDL attribute's type, 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,
- the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation
- of the number as a floating point number</a> and then that string
- must be used as the new content attribute value.</p>
+ the range of the IDL attribute's type (excluding infinities), the
+ resulting value must be returned, truncating it if necessary. 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, the given value must
+ be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the number as a
+ floating point number</a> 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
Modified: source
===================================================================
--- source 2009-10-25 08:37:32 UTC (rev 4330)
+++ source 2009-10-25 09:18:09 UTC (rev 4331)
@@ -5075,13 +5075,14 @@
(<code>float</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, and the value is in
- the range of the IDL attribute's type, 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,
- 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>
+ the range of the IDL attribute's type (excluding infinities), the
+ resulting value must be returned, truncating it if necessary. 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, 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
More information about the Commit-Watchers
mailing list