W3C home > Mailing lists > Public > public-html-commits@w3.org > January 2009

html5/spec Overview.html,1.1833,1.1834

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 14 Jan 2009 08:56:36 +0000
To: public-html-commits@w3.org
Message-Id: <E1LN1YC-0004JZ-Qa@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv16536

Modified Files:
	Overview.html 
Log Message:
Define how to handle out-of-range content attribute values in the DOM. (whatwg r2664)

Index: Overview.html
===================================================================
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 08:56:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 14 January 2009 08:56:47 GMT