[webkit-reviews] review requested: [Bug 29292] [HTML5][Forms] Support for <textarea maxlength=N> : [Attachment 39807] Proposed patch (rev.5)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 17:53:38 PDT 2009


TAMURA, Kent <tkent at chromium.org> has asked  for review:
Bug 29292: [HTML5][Forms] Support for <textarea maxlength=N>
https://bugs.webkit.org/show_bug.cgi?id=29292

Attachment 39807: Proposed patch (rev.5)
https://bugs.webkit.org/attachment.cgi?id=39807&action=review

------- Additional Comments from TAMURA, Kent <tkent at chromium.org>
> Suppose that the string is "ab". numCharactersInGraphemeClusters(1) should
> return 1, not 2. If we specify length(), the result would be 2.

ok, I changed it to:

unsigned String::numCharactersInGraphemeClusters(unsigned numGraphemeClusters)
const
{
    TextBreakIterator* it = characterBreakIterator(characters(), length());
    if (!it)
	return min(length(), numGraphemeClusters);


More information about the webkit-reviews mailing list