html5/spec Overview.html,1.3095,1.3096

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

Modified Files:
	Overview.html 
Log Message:
textarea.maxLength and input.maxLength apparently return -1 when the attribute is missing. (whatwg r3934)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3095
retrieving revision 1.3096
diff -u -d -r1.3095 -r1.3096
--- Overview.html	21 Sep 2009 22:32:50 -0000	1.3095
+++ Overview.html	21 Sep 2009 23:05:19 -0000	1.3096
@@ -4804,6 +4804,21 @@
   a <a href="#valid-integer">valid integer</a> and then that string must be used as
   the new content attribute value.</p>
 
+  <p>If a reflecting IDL attribute is a signed integer type
+  (<code>long</code>) that is <dfn id="limited-to-only-positive-numbers">limited to only positive
+  numbers</dfn> 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, 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 &minus;1 if there is no default value. On
+  setting, if the value is negative, 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> and then that
+  string must be used as the new content attribute value.</p>
+
   <p>If a reflecting IDL 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
@@ -27520,7 +27535,7 @@
            attribute boolean <a href="#dom-input-indeterminate" title="dom-input-indeterminate">indeterminate</a>;
   readonly attribute <a href="#htmlelement">HTMLElement</a> <a href="#dom-input-list" title="dom-input-list">list</a>;
            attribute DOMString <a href="#dom-input-max" title="dom-input-max">max</a>;
-           attribute unsigned long <a href="#dom-input-maxlength" title="dom-input-maxLength">maxLength</a>;
+           attribute long <a href="#dom-input-maxlength" title="dom-input-maxLength">maxLength</a>;
            attribute DOMString <a href="#dom-input-min" title="dom-input-min">min</a>;
            attribute boolean <a href="#dom-input-multiple" title="dom-input-multiple">multiple</a>;
            attribute DOMString <a href="#dom-fe-name" title="dom-fe-name">name</a>;
@@ -28685,9 +28700,9 @@
   <p>The <dfn id="dom-input-accept" title="dom-input-accept"><code>accept</code></dfn>, <dfn id="dom-input-alt" title="dom-input-alt"><code>alt</code></dfn>, <dfn id="dom-input-autocomplete" title="dom-input-autocomplete"><code>autocomplete</code></dfn>, <dfn id="dom-input-max" title="dom-input-max"><code>max</code></dfn>, <dfn id="dom-input-min" title="dom-input-min"><code>min</code></dfn>, <dfn id="dom-input-multiple" title="dom-input-multiple"><code>multiple</code></dfn>, <dfn id="dom-input-pattern" title="dom-input-pattern"><code>pattern</code></dfn>, <dfn id="dom-input-placeholder" title="dom-input-placeholder"><code>placeholder</code></dfn>, <dfn id="dom-input-required" title="dom-input-required"><code>required</code></dfn>, <dfn id="dom-input-size" title="dom-input-size"><code>size</code></dfn>, <dfn id="dom-input-src" title="dom-input-src"><code>src</code></dfn>, <dfn id="dom-input-step" title="dom-input-step"><code>step</code></dfn>, and <dfn id="dom-input-type" title="dom-input-type"><code>type</ode></dfn> IDL attributes must
   <a href="#reflect">reflect</a> the respective content attributes of the same
   name. The <dfn id="dom-input-maxlength" title="dom-input-maxLength"><code>maxLength</code></dfn> IDL
-  attribute must <a href="#reflect">reflect</a> the <code title="attr-input-maxlength"><a href="#attr-input-maxlength">maxlength</a></code> content attribute. The
-  <dfn id="dom-input-readonly" title="dom-input-readOnly"><code>readOnly</code></dfn> IDL
-  attribute must <a href="#reflect">reflect</a> the <code title="attr-input-readonly"><a href="#attr-input-readonly">readonly</a></code> content attribute. The
+  attribute must <a href="#reflect">reflect</a> the <code title="attr-input-maxlength"><a href="#attr-input-maxlength">maxlength</a></code> content attribute,
+  <a href="#limited-to-only-positive-numbers">limited to only positive numbers</a>. The <dfn id="dom-input-readonly" title="dom-input-readOnly"><code>readOnly</code></dfn> IDL attribute
+  must <a href="#reflect">reflect</a> the <code title="attr-input-readonly"><a href="#attr-input-readonly">readonly</a></code> content attribute. The
   <dfn id="dom-input-defaultchecked" title="dom-input-defaultChecked"><code>defaultChecked</code></dfn>
   IDL attribute must <a href="#reflect">reflect</a> the <code title="attr-input-checked"><a href="#attr-input-checked">checked</a></code> content attribute. The
   <dfn id="dom-input-defaultvalue" title="dom-input-defaultValue"><code>defaultValue</code></dfn>
@@ -32650,7 +32665,7 @@
            attribute unsigned long <a href="#dom-textarea-cols" title="dom-textarea-cols">cols</a>;
            attribute boolean <a href="#dom-fe-disabled" title="dom-fe-disabled">disabled</a>;
   readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#dom-fae-form" title="dom-fae-form">form</a>;
-           attribute unsigned long <a href="#dom-textarea-maxlength" title="dom-textarea-maxLength">maxLength</a>;
+           attribute long <a href="#dom-textarea-maxlength" title="dom-textarea-maxLength">maxLength</a>;
            attribute DOMString <a href="#dom-fe-name" title="dom-fe-name">name</a>;
            attribute DOMString <a href="#dom-textarea-placeholder" title="dom-textarea-placeholder">placeholder</a>;
            attribute boolean <a href="#dom-textarea-readonly" title="dom-textarea-readOnly">readOnly</a>;
@@ -32849,9 +32864,9 @@
   <a href="#reflect">reflect</a> the respective content attributes of the same
   name. The <code title="dom-textarea-cols"><a href="#dom-textarea-cols">cols</a></code> and <code title="dom-textarea-rows"><a href="#dom-textarea-rows">rows</a></code> attributes are <a href="#limited-to-only-positive-non-zero-numbers">limited
   to only positive non-zero numbers</a>. The <dfn id="dom-textarea-maxlength" title="dom-textarea-maxLength"><code>maxLength</code></dfn> IDL
-  attribute must <a href="#reflect">reflect</a> the <code title="attr-textarea-maxlength"><a href="#attr-textarea-maxlength">maxlength</a></code> content attribute.
-  The <dfn id="dom-textarea-readonly" title="dom-textarea-readOnly"><code>readOnly</code></dfn>
-  IDL attribute must <a href="#reflect">reflect</a> the <code title="attr-textarea-readonly"><a href="#attr-textarea-readonly">readonly</a></code> content
+  attribute must <a href="#reflect">reflect</a> the <code title="attr-textarea-maxlength"><a href="#attr-textarea-maxlength">maxlength</a></code> content attribute,
+  <a href="#limited-to-only-positive-numbers">limited to only positive numbers</a>. The <dfn id="dom-textarea-readonly" title="dom-textarea-readOnly"><code>readOnly</code></dfn> IDL
+  attribute must <a href="#reflect">reflect</a> the <code title="attr-textarea-readonly"><a href="#attr-textarea-readonly">readonly</a></code> content
   attribute.</p>
 
   <p>The <dfn id="dom-textarea-type" title="dom-textarea-type"><code>type</code></dfn> IDL

Received on Monday, 21 September 2009 23:05:34 UTC