Modified: trunk/Source/WebCore/ChangeLog (125684 => 125685)
--- trunk/Source/WebCore/ChangeLog 2012-08-15 18:01:05 UTC (rev 125684)
+++ trunk/Source/WebCore/ChangeLog 2012-08-15 18:13:46 UTC (rev 125685)
@@ -1,3 +1,15 @@
+2012-08-15 Joanmarie Diggs <[email protected]>
+
+ [Gtk] atk_text_get_text_at_offset() fails to provide the correct line for paragraphs in list items whose text wraps
+ https://bugs.webkit.org/show_bug.cgi?id=83435
+
+ Reviewed by Chris Fleizach.
+
+ Fix a logic error when checking if an object is a list marker.
+
+ * accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
+ (textForRenderer):
+
2012-08-15 Arpita Bahuguna <[email protected]>
There is additional space not belonged to a table between the table cells
Modified: trunk/Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp (125684 => 125685)
--- trunk/Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp 2012-08-15 18:01:05 UTC (rev 125684)
+++ trunk/Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp 2012-08-15 18:13:46 UTC (rev 125685)
@@ -79,7 +79,7 @@
else {
// List item's markers will be treated in an special way
// later on this function, so ignore them here.
- if (object->isReplaced() && !renderer->isListItem())
+ if (object->isReplaced() && !object->isListMarker())
g_string_append_unichar(resultText, objectReplacementCharacter);
// We need to check children, if any, to consider when
Modified: trunk/Source/WebKit/gtk/ChangeLog (125684 => 125685)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-08-15 18:01:05 UTC (rev 125684)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-08-15 18:13:46 UTC (rev 125685)
@@ -1,3 +1,15 @@
+2012-08-15 Joanmarie Diggs <[email protected]>
+
+ [Gtk] atk_text_get_text_at_offset() fails to provide the correct line for paragraphs in list items whose text wraps
+ https://bugs.webkit.org/show_bug.cgi?id=83435
+
+ Reviewed by Chris Fleizach.
+
+ Updated unit test to include a paragraph in a list item when testing atk_text_get_text_at_offset().
+
+ * tests/testatk.c:
+ (testWebkitAtkGetTextAtOffsetWithSpecialCharacters):
+
2012-08-14 Adam Barth <[email protected]>
Delete Frame::domWindow() and Frame::existingDOMWindow()
Modified: trunk/Source/WebKit/gtk/tests/testatk.c (125684 => 125685)
--- trunk/Source/WebKit/gtk/tests/testatk.c 2012-08-15 18:01:05 UTC (rev 125684)
+++ trunk/Source/WebKit/gtk/tests/testatk.c 2012-08-15 18:13:46 UTC (rev 125685)
@@ -35,7 +35,7 @@
static const char* contentsWithPreformattedText = "<html><body><pre>\n\t\n\tfirst line\n\tsecond line\n</pre></body></html>";
-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>";
+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><li style='max-width:100px;'><p>List item with some text that wraps across different lines.</p></li></ul></body></html>";
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>";
@@ -845,6 +845,21 @@
testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, "\342\200\242 List item", 0, 11);
testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, " with some", 11, 21);
+ g_object_unref(listItem);
+
+ listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 1));
+ g_assert(ATK_IS_TEXT(listItem));
+
+ /* Check that placing the same text in a paragraph doesn't break things. */
+ text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+ g_assert_cmpstr(text, ==, "\342\200\242 List item with some text that wraps across different lines.");
+ g_free(text);
+
+ testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, "\342\200\242 List item ", 0, 12);
+ testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, "with some ", 12, 22);
+ testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, "\342\200\242 List item", 0, 11);
+ testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, " with some", 11, 21);
+
g_object_unref(list);
g_object_unref(listItem);
g_object_unref(paragraph);