Bug 65497

Summary: maxlength = 0 on input is ignored
Product: WebKit Reporter: Divya Manian <divya>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: tkent, webkit.review.bot
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jsfiddle.net/nimbu/PFKcB/
Attachments:
Description Flags
Patch
none
Patch none

Description Divya Manian 2011-08-01 16:39:52 PDT
I have no idea why anyone would do this, but it should be possible. 

Opera's latest snapshot, FF both do abide by maxlength.
Comment 1 Kent Tamura 2011-08-01 23:56:34 PDT
Chromium bug: http://code.google.com/p/chromium/issues/detail?id=89732
Comment 2 Shinya Kawanaka 2011-08-18 19:32:54 PDT
Created attachment 104437 [details]
Patch
Comment 3 Kent Tamura 2011-08-18 19:57:19 PDT
Comment on attachment 104437 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104437&action=review

Thank you for fixing this.
The change looks ok.

> LayoutTests/fast/forms/input-text-paste-maxlength.html:102
> +debug("pasting too much text with maxlength=0");
> +document.getElementById("l").focus();
> +document.execCommand("InsertHTML", false, "12x&#x305;&#x332;45");
> +shouldBe("domValueOf('l')", "''");
> +shouldBe("visibleValueOf('l')", "''");
> +

Would you add similar test cases to fast/forms/textarea-maxlength.html please?
Comment 4 Shinya Kawanaka 2011-08-18 22:47:19 PDT
Created attachment 104463 [details]
Patch
Comment 5 Kent Tamura 2011-08-19 00:47:53 PDT
Comment on attachment 104463 [details]
Patch

Thanks!
Comment 6 WebKit Review Bot 2011-08-19 01:46:59 PDT
Comment on attachment 104463 [details]
Patch

Clearing flags on attachment: 104463

Committed r93390: <http://trac.webkit.org/changeset/93390>
Comment 7 WebKit Review Bot 2011-08-19 01:47:04 PDT
All reviewed patches have been landed.  Closing bug.