Changeset 152232 in webkit
- Timestamp:
- Jul 1, 2013 11:04:34 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152231 r152232 1 2013-07-01 Brian Holt <brian.holt@samsung.com> 2 3 [ATK] Leak: leaks in WebKitAccessibleInterfaceText 4 https://bugs.webkit.org/show_bug.cgi?id=118248 5 6 Fixed memory leaks. 7 8 Reviewed by Christophe Dumez. 9 10 * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 11 (getPangoLayoutForAtk): 12 (webkitAccessibleTextGetText): 13 1 14 2013-07-01 Roger Fong <roger_fong@apple.com> 2 15 -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
r152095 r152232 95 95 // children are, in order not to miss those portions of 96 96 // text by not properly handling those situations 97 if (object->firstChild()) 98 g_string_append(resultText, textForRenderer(object)); 99 97 if (object->firstChild()) { 98 GOwnPtr<char> objectText(textForRenderer(object)); 99 g_string_append(resultText, objectText.get()); 100 } 100 101 continue; 101 102 } … … 188 189 189 190 // Create a string with the layout as it appears on the screen 190 PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(coreObject)); 191 GOwnPtr<char> objectText(textForObject(coreObject)); 192 PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), objectText.get()); 191 193 return layout; 192 194 } … … 448 450 static IntRect textExtents(AtkText* text, gint startOffset, gint length, AtkCoordType coords) 449 451 { 450 gchar* textContent = webkitAccessibleTextGetText(text, startOffset, -1);451 gint textLength = g_utf8_strlen(textContent , -1);452 GOwnPtr<char> textContent(webkitAccessibleTextGetText(text, startOffset, -1)); 453 gint textLength = g_utf8_strlen(textContent.get(), -1); 452 454 453 455 // The first case (endOffset of -1) should work, but seems broken for all Gtk+ apps. … … 550 552 // In such instances, there may also be embedded objects. The object replacement character 551 553 // is something ATs want included and we have to account for the fact that it is multibyte. 552 ret = String::fromUTF8(textForObject(coreObject)); 554 GOwnPtr<char> objectText(textForObject(coreObject)); 555 ret = String::fromUTF8(objectText.get()); 553 556 if (!end) 554 557 end = ret.length();
Note: See TracChangeset
for help on using the changeset viewer.