Changeset 51342 in webkit
- Timestamp:
- Nov 24, 2009 10:47:14 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51341 r51342 1 2009-11-24 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 When building up the pango layout from text boxes, only append a 9 newline char after verifying there are no more boxes on this line. 10 11 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 12 (getPangoLayoutForAtk): 13 1 14 2009-11-24 Joseph Pecoraro <joepeck@webkit.org> 2 15 -
trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r50797 r51342 891 891 gchar* text = convertUniCharToUTF8(renderText->characters(), renderText->textLength(), box->start(), box->end()); 892 892 g_string_append(str, text); 893 g_string_append(str, "\n"); 893 // Newline chars in the source result in separate text boxes, so check 894 // before adding a newline in the layout. See bug 25415 comment #78. 895 if (!box->nextOnLineExists()) 896 g_string_append(str, "\n"); 894 897 box = box->nextTextBox(); 895 898 } -
trunk/WebKit/gtk/ChangeLog
r51188 r51342 1 2009-11-24 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 When building up the pango layout from text boxes, only append a 9 newline char after verifying there are no more boxes on this line. 10 11 * tests/testatk.c 12 (test_webkit_atk_get_text_at_offset_newlines): 13 (main): 14 1 15 2009-11-19 Pavel Feldman <pfeldman@chromium.org> 2 16 -
trunk/WebKit/gtk/tests/testatk.c
r50208 r51342 29 29 static const char* contents = "<html><body><p>This is a test. This is the second sentence. And this the third.</p></body></html>"; 30 30 31 static const char* contentsWithNewlines = "<html><body><p>This is a test. \n\nThis\n is the second sentence. And this the third.</p></body></html>"; 32 31 33 static gboolean bail_out(GMainLoop* loop) 32 34 { … … 260 262 } 261 263 264 static void test_webkit_atk_get_text_at_offset_newlines(void) 265 { 266 WebKitWebView* webView; 267 AtkObject* obj; 268 GMainLoop* loop; 269 AtkText* text_obj; 270 271 webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); 272 g_object_ref_sink(webView); 273 GtkAllocation alloc = { 0, 0, 800, 600 }; 274 gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); 275 webkit_web_view_load_string(webView, contentsWithNewlines, NULL, NULL, NULL); 276 loop = g_main_loop_new(NULL, TRUE); 277 278 g_timeout_add(100, (GSourceFunc)bail_out, loop); 279 g_main_loop_run(loop); 280 281 /* Get to the inner AtkText object */ 282 obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); 283 g_assert(obj); 284 obj = atk_object_ref_accessible_child(obj, 0); 285 g_assert(obj); 286 obj = atk_object_ref_accessible_child(obj, 0); 287 g_assert(obj); 288 289 text_obj = ATK_TEXT(obj); 290 g_assert(ATK_IS_TEXT(text_obj)); 291 292 run_get_text_tests(text_obj); 293 294 g_object_unref(webView); 295 } 296 262 297 int main(int argc, char** argv) 263 298 { … … 268 303 g_test_add_func("/webkit/atk/get_text_at_offset", test_webkit_atk_get_text_at_offset); 269 304 g_test_add_func("/webkit/atk/get_text_at_offset_forms", test_webkit_atk_get_text_at_offset_forms); 305 g_test_add_func("/webkit/atk/get_text_at_offset_newlines", test_webkit_atk_get_text_at_offset_newlines); 270 306 return g_test_run (); 271 307 }
Note: See TracChangeset
for help on using the changeset viewer.