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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 09:48:00 PDT 2009


Darin Adler <darin at apple.com> has granted TAMURA, Kent <tkent at chromium.org>'s
request for review:
Bug 29292: [HTML5][Forms] Support for <textarea maxlength=N>
https://bugs.webkit.org/show_bug.cgi?id=29292

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

------- Additional Comments from Darin Adler <darin at apple.com>
> +    if (isEmpty())
> +	   return 0;

This special case for empty and null strings is not needed.

> +    TextBreakIterator* it = characterBreakIterator(characters(), length());
> +    if (!it)
> +	   return 0;

This is not new code, but it's really non-useful to return 0 here. It would be
way better to just return length().

> +    if (isEmpty())
> +	   return 0;

This special case for empty and null strings is not needed.

> +    TextBreakIterator* it = characterBreakIterator(characters(), length());
> +    if (!it)
> +	   return 0;

This is not new code, but it's really non-useful to return 0 here. It would be
better to return min(length(), numGraphemeClusters).

r=me as-is, though


More information about the webkit-reviews mailing list