[Webkit-unassigned] [Bug 44883] New: <input> maxLength is clamped to 524288
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 30 12:11:50 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=44883
Summary: <input> maxLength is clamped to 524288
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
URL: http://aryeh.name/tests/reflection.html
OS/Version: Linux
Status: UNCONFIRMED
Severity: Minor
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: Simetrical+webkit at gmail.com
Test case:
<!doctype html>
<script>
var el = document.createElement("input");
var out = el.maxLength;
el.setAttribute("maxlength", "0");
out += " " + el.maxLength;
el.setAttribute("maxlength", "1000000");
out += " " + el.maxLength;
alert(out);
</script>
Recentish Firefox nightly and Opera 10.60 alert "-1 0 1000000", per spec. Chrome dev on Linux and Safari 5 on XP alert "524288 524288 524288". IE8 alerts "2147483647 0 1000000". The spec says that this is a long limited to only non-negative numbers, which is defined as follows:
"""
If a reflecting IDL attribute is a signed integer type (long) that is limited to only non-negative numbers then, on getting, the content attribute must be parsed according to the rules for parsing non-negative integers, 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 INDEX_SIZE_ERR exception. Otherwise, the given value must be converted to the shortest possible string representing the number as a valid non-negative integer and then that string must be used as the new content attribute value.
"""
http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list