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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 2 21:35:06 PDT 2011


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


Antaryami Pandia <xqb748 at motorola.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xqb748 at motorola.com




--- Comment #7 from Antaryami Pandia <xqb748 at motorola.com>  2011-10-02 21:35:06 PST ---
Thanks for the review.

(In reply to comment #6)
> (From update of attachment 109255 [details])
> 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?
> 

Do you want to remove the internal hard limit, 524288 ... yes.
> 
> > 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.
> 
This was required if the maxlength is set with a value which is greater than the current limit 524288.

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

Ok.I will try to find a better way.
> 
> > 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.

Ok.
> 
> > LayoutTests/fast/forms/input-text-maxlength.html:38
> > -shouldBe('domValueOf("input1")', '"12345"');
> > +shouldBe('domValueOf("input1")', '"1234"');
> 
> We should not change this file.

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

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

ok.

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