[Webkit-unassigned] [Bug 25415] [GTK][ATK] Please implement support for get_text_at_offset

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 12 10:10:34 PDT 2009


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


Gustavo Noronha (kov) <gns at gnome.org> changed:

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




--- Comment #42 from Gustavo Noronha (kov) <gns at gnome.org>  2009-07-12 10:10:32 PDT ---
(From update of attachment 32451)
> +static void utf16_to_utf8(const UChar* aText, gint aLength, char* &text, gint &length)
> +{
> +    gboolean need_copy = FALSE;

I believe we want UTF16ToUTF8, and needCopy, here, though the first one looks
blergh. Maybe Utf16ToUtf8? Though the style doesn't like that for acronyms...

> +        if (!aText[i] || IS_LOW_SURROGATE(aText[i])) {
> +            need_copy = TRUE;
> +            break;
> +        }
> +        else if (IS_HIGH_SURROGATE(aText[i])) {

The else if line should be after the if's } here.

> +    gint new_length = 0;

newLength

It would be good to have a comment on top of convertUniCharToUTF8 explaining
that it is not really general, as the name seems to imply, and that it is
concerned with how the layouting is done. I know there's a comment that may
lead people to notice this in the middle of the function, but then again, it
would be best to make this obvious.

The rest looks fine to me, so r=me with the style changes. It's a pitty you had
to do all that messing with the text to get it right, but I figure it would be
much harder to change the way webcore works.

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