[Webkit-unassigned] [Bug 44883] <input> maxLength is clamped to 524288

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 2 03:03:56 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=44883


Kent Tamura <tkent at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #109255|review?                     |review-
               Flag|                            |




--- Comment #6 from Kent Tamura <tkent at chromium.org>  2011-10-02 03:03:56 PST ---
(From update of attachment 109255)
View in context: https://bugs.webkit.org/attachment.cgi?id=109255&action=review

What's the purpose of this patch? Do you want to remove the internal hard limit, 524288, or want not to expose the internal hard limit via HTMLInputELement::maxLength?


> Source/WebCore/html/TextFieldInputType.cpp:304
> -    return limitLength(proposedValue.removeCharacters(isASCIILineBreak), HTMLInputElement::maximumLength);
> +    return limitLength(proposedValue.removeCharacters(isASCIILineBreak), element()->maxLength());

No, this is wrong. We should not clamp the value by maxLength() here.

> LayoutTests/fast/forms/input-appearance-maxlength.html:18
> -if (input.value != "12345") {
> +if (input.value == "12345") {
>      testPassed('Maxlength shouldn\'t work for default value.\n');

This is wrong. We must not change this.

> LayoutTests/fast/forms/input-text-maxlength.html:20
> -<input type="text" size="5" value="12x&#x305;&#x332;45" maxlength="4" id="input7">
> -<input type="text" size="5" maxlength="4" value="12x&#x305;&#x332;45" id="input8">
> -<input type="text" id="j" size="5" maxlength="4" value="123">
> -<input type="text" id="i" size="5" maxlength="4" value="123">
> +<input type="text" size="5" value="12x&#x305;&#x332;45" maxlength="10" id="input7">
> +<input type="text" size="5" maxlength="10" value="12x&#x305;&#x332;45" id="input8">
> +<input type="text" id="j" size="5" maxlength="10" value="123">
> +<input type="text" id="i" size="5" maxlength="10" value="123">

We should not change this.

> LayoutTests/fast/forms/input-text-maxlength.html:38
> -shouldBe('domValueOf("input1")', '"12345"');
> +shouldBe('domValueOf("input1")', '"1234"');

We should not change this file.

> LayoutTests/fast/forms/input-text-paste-maxlength.html:17
> -<input type="text" id="i" size="5" maxlength="4">
> +<input type="text" id="i" size="5" maxlength="20">

We should not change this file.

> LayoutTests/fast/forms/script-tests/ValidityState-tooLong-input.js:13
> -shouldBe('input.value.length', '5');
> +shouldBe('input.value.length', '3');

We should not change this file.

-- 
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