Changeset 50641 in webkit


Ignore:
Timestamp:
Nov 9, 2009 12:18:03 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-09 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Xan Lopez.

https://bugs.webkit.org/show_bug.cgi?id=25415
[GTK][ATK] Please implement support for get_text_at_offset

Fix a crasher that occurred with text which included newline
chars in the markup.

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (convertUniCharToUTF8):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50640 r50641  
     12009-11-09  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25415
     6        [GTK][ATK] Please implement support for get_text_at_offset
     7
     8        Fix a crasher that occurred with text which included newline
     9        chars in the markup.
     10
     11        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     12        (convertUniCharToUTF8):
     13
    1142009-11-05  Jakub Wieczorek  <faw217@gmail.com>
    215
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r50615 r50641  
    847847    gsize len = strlen(utf8String);
    848848    GString* ret = g_string_new_len(NULL, len);
     849    gchar* ptr = utf8String;
    849850
    850851    // WebCore introduces line breaks in the text that do not reflect
     
    852853    while (len > 0) {
    853854        gint index, start;
    854         pango_find_paragraph_boundary(utf8String, len, &index, &start);
    855         g_string_append_len(ret, utf8String, index);
     855        pango_find_paragraph_boundary(ptr, len, &index, &start);
     856        g_string_append_len(ret, ptr, index);
    856857        if (index == start)
    857858            break;
    858859        g_string_append_c(ret, ' ');
    859         utf8String += start;
     860        ptr += start;
    860861        len -= start;
    861862    }
Note: See TracChangeset for help on using the changeset viewer.