Changeset 107086 in webkit
- Timestamp:
- Feb 8, 2012 7:38:19 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107083 r107086 1 2012-02-08 Mario Sanchez Prada <msanchez@igalia.com> 2 3 [Gtk] atk_text_get_text_at_offset() fails to provide the correct line for list items whose text wraps 4 https://bugs.webkit.org/show_bug.cgi?id=73431 5 6 Reviewed by Chris Fleizach. 7 8 Don't replace item's markers with the objectReplacementCharacter 9 character, as they will be treated in an special way later on. 10 11 * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: 12 (textForRenderer): Don't append the objectReplacementCharacter 13 character for list item's markers. 14 1 15 2012-02-08 Pavel Feldman <pfeldman@google.com> 2 16 -
trunk/Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp
r106545 r107086 78 78 renderText = toRenderText(object); 79 79 else { 80 if (object->isReplaced()) 80 // List item's markers will be treated in an special way 81 // later on this function, so ignore them here. 82 if (object->isReplaced() && !renderer->isListItem()) 81 83 g_string_append_unichar(resultText, objectReplacementCharacter); 82 84 -
trunk/Source/WebKit/gtk/ChangeLog
r106901 r107086 1 2012-02-08 Mario Sanchez Prada <msanchez@igalia.com> 2 3 [Gtk] atk_text_get_text_at_offset() fails to provide the correct line for list items whose text wraps 4 https://bugs.webkit.org/show_bug.cgi?id=73431 5 6 Reviewed by Chris Fleizach. 7 8 Updated unit test to check text wrapping accross different lines 9 inside list items with bullet markers. 10 11 * tests/testatk.c: 12 (testWebkitAtkGetTextAtOffsetWithSpecialCharacters): Updated test. 13 1 14 2012-02-06 Martin Robinson <mrobinson@igalia.com> and Nayan Kumar K <nayankk@motorola.com> 2 15 -
trunk/Source/WebKit/gtk/tests/testatk.c
r106545 r107086 36 36 static const char* contentsWithPreformattedText = "<html><body><pre>\n\t\n\tfirst line\n\tsecond line\n</pre></body></html>"; 37 37 38 static const char* contentsWithSpecialChars = "<html><body><p>« This is a paragraph with “special” characters inside. »</p>< /body></html>";38 static const char* contentsWithSpecialChars = "<html><body><p>« This is a paragraph with “special” characters inside. »</p><ul><li style='max-width:100px;'>List item with some text that wraps across different lines.</li></ul></body></html>"; 39 39 40 40 static const char* contentsInTextarea = "<html><body><textarea cols='80'>This is a test. This is the second sentence. And this the third.</textarea></body></html>"; … … 811 811 AtkObject* object = getWebAreaObject(webView); 812 812 g_assert(object); 813 object = atk_object_ref_accessible_child(object, 0); 814 g_assert(object); 815 816 AtkText* textObject = ATK_TEXT(object); 817 g_assert(ATK_IS_TEXT(textObject)); 818 819 const gchar* expectedText = "\302\253\302\240This is a paragraph with \342\200\234special\342\200\235 characters inside.\302\240\302\273"; 820 char* text = atk_text_get_text(textObject, 0, -1); 813 814 AtkObject* paragraph = atk_object_ref_accessible_child(object, 0); 815 g_assert(ATK_IS_TEXT(paragraph)); 816 817 gchar* expectedText = g_strdup("\302\253\302\240This is a paragraph with \342\200\234special\342\200\235 characters inside.\302\240\302\273"); 818 char* text = atk_text_get_text(ATK_TEXT(paragraph), 0, -1); 821 819 g_assert_cmpstr(text, ==, expectedText); 822 820 g_free(text); … … 825 823 and ATK_TEXT_BOUNDARY_LINE_END does not crash because of not 826 824 properly handling characters inside the UTF-8 string. */ 827 testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, expectedText, 0, 57); 828 testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, expectedText, 0, 57); 829 825 testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, expectedText, 0, 57); 826 testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, expectedText, 0, 57); 827 g_free(expectedText); 828 829 AtkObject* list = atk_object_ref_accessible_child(object, 1); 830 g_assert(ATK_OBJECT(list)); 831 832 AtkText* listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 0)); 833 g_assert(ATK_IS_TEXT(listItem)); 834 835 text = atk_text_get_text(ATK_TEXT(listItem), 0, -1); 836 g_assert_cmpstr(text, ==, "\342\200\242 List item with some text that wraps across different lines."); 837 g_free(text); 838 839 /* Check that getting the text with ATK_TEXT_BOUNDARY_LINE_START 840 and ATK_TEXT_BOUNDARY_LINE_END for line items with bullets 841 (special character) and wrapped text always return the right 842 piece of text for each line. */ 843 testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, "\342\200\242 List item ", 0, 12); 844 testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, "with some ", 12, 22); 845 testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, "\342\200\242 List item", 0, 11); 846 testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, " with some", 11, 21); 847 848 g_object_unref(list); 849 g_object_unref(listItem); 850 g_object_unref(paragraph); 830 851 g_object_unref(webView); 831 852 }
Note: See TracChangeset
for help on using the changeset viewer.