Changeset 77233 in webkit
- Timestamp:
- Feb 1, 2011 1:49:25 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r77231 r77233 1 2011-02-01 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Caret Offset is one off at the end of wrapped lines 6 https://bugs.webkit.org/show_bug.cgi?id=53300 7 8 Consider linebreaks as special cases. 9 10 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 11 (objectAndOffsetUnignored): In order to avoid getting wrong values 12 when around linebreaks, we need to workaround this by explicitly 13 avoiding those '\n' text nodes from affecting the result of 14 calling to TextIterator:rangeLength(). 15 1 16 2011-02-01 Roland Steiner <rolandsteiner@chromium.org> 2 17 -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r77137 r77233 64 64 #include "TextIterator.h" 65 65 #include "WebKitAccessibleHyperlink.h" 66 #include "visible_units.h" 66 67 67 68 #include <atk/atk.h> … … 2490 2491 Node* node = realObject->node(); 2491 2492 if (node) { 2492 RefPtr<Range> range = Range::create(node->document(), firstPositionInNode(node), realObject->selection().end()); 2493 offset = TextIterator::rangeLength(range.get()); 2493 VisiblePosition startPosition = VisiblePosition(node, 0, DOWNSTREAM); 2494 VisiblePosition endPosition = realObject->selection().visibleEnd(); 2495 2496 if (startPosition == endPosition) 2497 offset = 0; 2498 else if (!isStartOfLine(endPosition)) { 2499 RefPtr<Range> range = makeRange(startPosition, endPosition.previous()); 2500 offset = TextIterator::rangeLength(range.get()) + 1; 2501 } else { 2502 RefPtr<Range> range = makeRange(startPosition, endPosition); 2503 offset = TextIterator::rangeLength(range.get()); 2504 } 2505 2494 2506 } 2495 2507 -
trunk/Source/WebKit/gtk/ChangeLog
r77137 r77233 1 2011-02-01 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Caret Offset is one off at the end of wrapped lines 6 https://bugs.webkit.org/show_bug.cgi?id=53300 7 8 Update unit test to check the fix for this bug. 9 10 * tests/testatk.c: 11 (testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces): Set and get 12 the caret offset at the edge of the line. 13 1 14 2011-01-31 Mario Sanchez Prada <msanchez@igalia.com> 2 15 -
trunk/Source/WebKit/gtk/tests/testatk.c
r77137 r77233 368 368 gint caretOffset = atk_text_get_caret_offset(textObject); 369 369 g_assert_cmpint(caretOffset, ==, characterCount - 1); 370 371 result = atk_text_set_caret_offset(textObject, characterCount); 372 g_assert_cmpint(result, ==, TRUE); 373 374 caretOffset = atk_text_get_caret_offset(textObject); 375 g_assert_cmpint(caretOffset, ==, characterCount); 370 376 371 377 g_object_unref(webView);
Note: See TracChangeset
for help on using the changeset viewer.