spec/Overview.html 1.1834 2664 Define how to handle out-of-range conten

Define how to handle out-of-range content attribute values in the DOM.
(whatwg r2664)

limited to only known values
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1834.html#limited-to-only-known-values
limited to only positive non-zero numbers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1834.html#limited-to-only-positive-non-zero-numbers

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1833&r2=1.1834&f=h
http://html5.org/tools/web-apps-tracker?from=2663&to=2664

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1833
retrieving revision 1.1834
diff -u -d -r1.1833 -r1.1834
--- Overview.html 14 Jan 2009 08:50:46 -0000 1.1833
+++ Overview.html 14 Jan 2009 08:56:33 -0000 1.1834
@@ -4381,46 +4381,52 @@
   (<code>long</code>) then, on getting, the content attribute must be
   parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
   integers">rules for parsing signed integers</a>, and if that is
-  successful, the resulting value must be returned. If, on the other
-  hand, it fails, or if the attribute is absent, then the default
-  value must be returned instead, or 0 if there is no default
-  value. On setting, the given value must be converted to the shortest
-  possible string representing the number as a <a href=#valid-integer>valid
-  integer</a> in base ten and then that string must be used as the
-  new content attribute value.<p>If a reflecting DOM attribute is an <em>unsigned</em> integer
+  successful, and the value is in the range of the DOM 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, then the default value must be returned instead, or 0 if
+  there is no default value. On setting, the given value must be
+  converted to the shortest possible string representing the number as
+  a <a href=#valid-integer>valid integer</a> in base ten and then that string must
+  be used as the new content attribute value.<p>If a reflecting DOM attribute is an <em>unsigned</em> integer
   type (<code>unsigned long</code>) then, on getting, the content
   attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
-  non-negative integers</a>, 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 if there is no default value. On setting, the given
-  value must be converted to the shortest possible string representing
-  the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> in base ten
-  and then that string must be used as the new content attribute
-  value.<p>If a reflecting DOM attribute is an unsigned integer type
+  non-negative integers</a>, and if that is successful, and the
+  value is in the range of the DOM 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 if there is no default
+  value. On setting, the given value must be converted to the shortest
+  possible string representing the number as a <a href=#valid-non-negative-integer>valid
+  non-negative integer</a> in base ten and then that string must be
+  used as the new content attribute value.<p>If a reflecting DOM attribute is an unsigned integer type
   (<code>unsigned long</code>) that is <dfn id=limited-to-only-positive-non-zero-numbers>limited to only positive
   non-zero numbers</dfn>, then the behavior is similar to the previous
   case, but zero is not allowed. On getting, the content attribute
   must first be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
-  non-negative integers</a>, 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 1 if there is no default value. On setting, if the value
-  is zero, the user agent must fire an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
-  exception. Otherwise, the given value must be converted to the
-  shortest possible string representing the number as a <a href=#valid-non-negative-integer>valid
-  non-negative integer</a> in base ten and then that string must be
-  used as the new content attribute value.<p>If a reflecting DOM attribute is a floating point number type
+  non-negative integers</a>, and if that is successful, and the
+  value is in the range of the DOM 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 1 if there is no default
+  value. On setting, if the value is zero, the user agent must fire an
+  <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception. Otherwise, the given value
+  must be converted to the shortest possible string representing the
+  number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> in base ten and
+  then that string must be used as the new content attribute
+  value.<p>If a reflecting DOM attribute is a floating point number type
   (<code>float</code>) and it doesn't fall into one of the earlier
   categories, 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, 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 shortest possible string representing the number as a
-  <a href=#valid-floating-point-number>valid floating point number</a> in base ten and then that
-  string must be used as the new content attribute value.<p>If a reflecting DOM attribute is of the type
+  values</a>, and if that is successful, and the value is in the
+  range of the DOM 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 shortest possible string
+  representing the number as a <a href=#valid-floating-point-number>valid floating point
+  number</a> in base ten and then that string must be used as the
+  new content attribute value.<p>If a reflecting DOM attribute is of the type
   <code><a href=#domtokenlist-0>DOMTokenList</a></code>, then on getting it must return a
   <code><a href=#domtokenlist-0>DOMTokenList</a></code> object whose underlying string is the
   element's corresponding content attribute. When the

Received on Wednesday, 14 January 2009 09:00:00 UTC