[Webkit-unassigned] [Bug 25321] RLE/LRE characters are removed from any text entered into a text box (either using a keyboard or by pasting)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 29 12:43:11 PDT 2010


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #65626|review?                     |review-
               Flag|                            |




--- Comment #11 from Darin Adler <darin at apple.com>  2010-08-29 12:43:11 PST ---
(From update of attachment 65626)
> +static bool unicodeBiDiControlCharacter(UChar ch)

This function name needs the word "is" in it, because it does not return a "Unicode bi di control character". It also makes no sense to capitalize the "D" in "bidi", which is short for "bidirectional".

> +                if (textOffset == box->start() + box->len() + 1 && unicodeBiDiControlCharacter((static_cast<Text*>(currentNode))->data()[textOffset - 1]))
> +                    return currentPos;

This code needs a why comment. Why doe this one particular function need a special case for Unicode bidirectional control characters. Aren't the other characters that need this sort of special handling? What makes these bidirectional control characters so important.

>      // Insert the character at the leftmost candidate.
> +    startPosition = startPosition.downstream();
>      startPosition = startPosition.upstream();

This code needs a why comment. Otherwise someone would just remove the call to downstream.

These issues are enough for a review-, but I’d also like Dan Bernstein to comment on the appropriate way of fixing this.

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