[Webkit-unassigned] [Bug 29292] [HTML5][Forms] Support for <textarea maxlength=N>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 11:13:35 PDT 2009


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39769|review?                     |review+
               Flag|                            |




--- Comment #7 from Darin Adler <darin at apple.com>  2009-09-18 11:13:35 PDT ---
(From update of attachment 39769)
> +    unsigned maxLength = static_cast<unsigned>(data.maxLength());  // maxLength() never be negative.

Coding style says one space before the "//".

The grammar here is wrong. It could be "can never be negative" or "never is
negative" instead.

> +    unsigned appendableLength =  maxLength > baseLength ? maxLength - baseLength : 0;

Extra space here after the equal sign.

Another way to write this is:

    max(maxLength, baseLength) - baseLength

Your way is probably clearer, though.

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

The value length() is not right here. It should be min(length(),
numGraphemeClusters) instead.

I'm going to say review+ because realistically characterBreakIterator will not
return 0 so that comment is not important.

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