Changeset 77817 in webkit
- Timestamp:
- Feb 7, 2011 8:23:10 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r77814 r77817 1 2011-02-07 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Xan Lopez. 4 5 [Gtk] atk_text_get_caret_offset fails for list items 6 https://bugs.webkit.org/show_bug.cgi?id=53436 7 8 Consider list item markers when calculating the offset. 9 10 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 11 (webkit_accessible_text_get_caret_offset): Adjust the offset 12 with the item marker's length for list items. 13 (webkit_accessible_text_set_caret_offset): Replace usage of 14 g_utf8_strlen() by calling to markerText.length(). 15 1 16 2011-02-07 Yi Shen <yi.4.shen@nokia.com> 2 17 -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r77234 r77817 1210 1210 // focusedObject is the object with the caret. It is likely ignored -- unless it's a link. 1211 1211 AccessibilityObject* coreObject = core(text); 1212 if (!coreObject->isAccessibilityRenderObject()) 1213 return 0; 1214 1212 1215 Node* focusedNode = coreObject->selection().end().node(); 1213 1214 1216 if (!focusedNode) 1215 1217 return 0; … … 1222 1224 if (!objectAndOffsetUnignored(focusedObject, offset, !coreObject->isLink())) 1223 1225 return 0; 1226 1227 RenderObject* renderer = toAccessibilityRenderObject(coreObject)->renderer(); 1228 if (renderer && renderer->isListItem()) { 1229 String markerText = toRenderListItem(renderer)->markerTextWithSuffix(); 1230 1231 // We need to adjust the offset for the list item marker. 1232 offset += markerText.length(); 1233 } 1224 1234 1225 1235 // TODO: Verify this for RTL text. … … 1707 1717 if (renderer && renderer->isListItem()) { 1708 1718 String markerText = toRenderListItem(renderer)->markerTextWithSuffix(); 1709 int markerLength = g_utf8_strlen(markerText.utf8().data(), -1);1719 int markerLength = markerText.length(); 1710 1720 if (offset < markerLength) 1711 1721 return FALSE; -
trunk/Source/WebKit/gtk/ChangeLog
r77734 r77817 1 2011-02-07 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Xan Lopez. 4 5 [Gtk] atk_text_get_caret_offset fails for list items 6 https://bugs.webkit.org/show_bug.cgi?id=53436 7 8 Update unit test to check the fix for this bug. 9 10 * tests/testatk.c: 11 (testWebkitAtkCaretOffsets): Check that the caret offset returned 12 match the value previously set. 13 1 14 2011-02-04 Joone Hur <joone.hur@collabora.co.uk> 2 15 -
trunk/Source/WebKit/gtk/tests/testatk.c
r77235 r77817 296 296 result = atk_text_set_caret_offset(ATK_TEXT(listItem), 5); 297 297 g_assert_cmpint(result, ==, TRUE); 298 299 /* Uncomment the following two lines when fixing bug 53436. */ 300 /* offset = atk_text_get_caret_offset(ATK_TEXT(listItem)); */ 301 /* g_assert_cmpint(offset, ==, 5); */ 298 offset = atk_text_get_caret_offset(ATK_TEXT(listItem)); 299 g_assert_cmpint(offset, ==, 5); 302 300 303 301 AtkObject* panel = atk_object_ref_accessible_child(object, 3);
Note: See TracChangeset
for help on using the changeset viewer.