[html5] r3934 - [giow] (2) textarea.maxLength and input.maxLength apparently return -1 when the [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Sep 21 16:12:10 PDT 2009
Author: ianh
Date: 2009-09-21 16:12:09 -0700 (Mon, 21 Sep 2009)
New Revision: 3934
Modified:
index
source
Log:
[giow] (2) textarea.maxLength and input.maxLength apparently return -1 when the attribute is missing.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7427
Modified: index
===================================================================
--- index 2009-09-21 22:39:39 UTC (rev 3933)
+++ index 2009-09-21 23:12:09 UTC (rev 3934)
@@ -5314,6 +5314,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 −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
@@ -30904,7 +30919,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>;
@@ -32091,9 +32106,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</code></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>
@@ -36729,7 +36744,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>;
@@ -36974,9 +36989,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
Modified: source
===================================================================
--- source 2009-09-21 22:39:39 UTC (rev 3933)
+++ source 2009-09-21 23:12:09 UTC (rev 3934)
@@ -4993,6 +4993,21 @@
a <span>valid integer</span> 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>limited to only positive
+ numbers</dfn> then, on getting, the content attribute must be parsed
+ according to the <span>rules for parsing non-negative
+ integers</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 −1 if there is no default value. On
+ setting, if the value is negative, the user agent must fire an
+ <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given value
+ must be converted to the shortest possible string representing the
+ number as a <span>valid non-negative integer</span> 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 <span>rules for parsing
@@ -34301,7 +34316,7 @@
attribute boolean <span title="dom-input-indeterminate">indeterminate</span>;
readonly attribute <span>HTMLElement</span> <span title="dom-input-list">list</span>;
attribute DOMString <span title="dom-input-max">max</span>;
- attribute unsigned long <span title="dom-input-maxLength">maxLength</span>;
+ attribute long <span title="dom-input-maxLength">maxLength</span>;
attribute DOMString <span title="dom-input-min">min</span>;
attribute boolean <span title="dom-input-multiple">multiple</span>;
attribute DOMString <span title="dom-fe-name">name</span>;
@@ -35651,9 +35666,10 @@
name. The <dfn
title="dom-input-maxLength"><code>maxLength</code></dfn> IDL
attribute must <span>reflect</span> the <code
- title="attr-input-maxlength">maxlength</code> content attribute. The
- <dfn title="dom-input-readOnly"><code>readOnly</code></dfn> IDL
- attribute must <span>reflect</span> the <code
+ title="attr-input-maxlength">maxlength</code> content attribute,
+ <span>limited to only positive numbers</span>. The <dfn
+ title="dom-input-readOnly"><code>readOnly</code></dfn> IDL attribute
+ must <span>reflect</span> the <code
title="attr-input-readonly">readonly</code> content attribute. The
<dfn
title="dom-input-defaultChecked"><code>defaultChecked</code></dfn>
@@ -41025,7 +41041,7 @@
attribute unsigned long <span title="dom-textarea-cols">cols</span>;
attribute boolean <span title="dom-fe-disabled">disabled</span>;
readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
- attribute unsigned long <span title="dom-textarea-maxLength">maxLength</span>;
+ attribute long <span title="dom-textarea-maxLength">maxLength</span>;
attribute DOMString <span title="dom-fe-name">name</span>;
attribute DOMString <span title="dom-textarea-placeholder">placeholder</span>;
attribute boolean <span title="dom-textarea-readOnly">readOnly</span>;
@@ -41319,9 +41335,10 @@
to only positive non-zero numbers</span>. The <dfn
title="dom-textarea-maxLength"><code>maxLength</code></dfn> IDL
attribute must <span>reflect</span> the <code
- title="attr-textarea-maxlength">maxlength</code> content attribute.
- The <dfn title="dom-textarea-readOnly"><code>readOnly</code></dfn>
- IDL attribute must <span>reflect</span> the <code
+ title="attr-textarea-maxlength">maxlength</code> content attribute,
+ <span>limited to only positive numbers</span>. The <dfn
+ title="dom-textarea-readOnly"><code>readOnly</code></dfn> IDL
+ attribute must <span>reflect</span> the <code
title="attr-textarea-readonly">readonly</code> content
attribute.</p>
More information about the Commit-Watchers
mailing list