Changeset 83747 in webkit
- Timestamp:
- Apr 13, 2011 9:33:02 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83746 r83747 1 2011-04-13 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Consider editable and non editable nodes when calculating selection offsets 6 https://bugs.webkit.org/show_bug.cgi?id=58431 7 8 Use firstPositionInOrBeforeNode() and lastPositionInOrAfterNode(). 9 10 This is needed to ensure that getSelectionOffsetsForObject() works 11 well when non editable nodes are present in the selection, since 12 firstPositionInNode() and lastPositionInNode() don't work in those 13 cases (they assume the node is editable). 14 15 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 16 (getSelectionOffsetsForObject): Updated calls. 17 1 18 2011-04-13 Mario Sanchez Prada <msanchez@igalia.com> 2 19 -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r83746 r83747 64 64 #include "TextIterator.h" 65 65 #include "WebKitAccessibleHyperlink.h" 66 #include "htmlediting.h" 66 67 #include "visible_units.h" 67 68 … … 1621 1622 Node* firstLeafNode = node->firstDescendant(); 1622 1623 if (selRange->isPointInRange(firstLeafNode, 0, ec)) 1623 nodeRangeStart = firstPositionIn Node(firstLeafNode);1624 nodeRangeStart = firstPositionInOrBeforeNode(firstLeafNode); 1624 1625 else 1625 1626 nodeRangeStart = selRange->startPosition(); … … 1631 1632 Node* lastLeafNode = node->lastDescendant(); 1632 1633 if (selRange->isPointInRange(lastLeafNode, lastOffsetInNode(lastLeafNode), ec)) 1633 nodeRangeEnd = lastPositionIn Node(lastLeafNode);1634 nodeRangeEnd = lastPositionInOrAfterNode(lastLeafNode); 1634 1635 else 1635 1636 nodeRangeEnd = selRange->endPosition(); 1636 1637 1637 1638 // Calculate position of the selected range inside the object. 1638 Position parentFirstPosition = firstPositionIn Node(node);1639 Position parentFirstPosition = firstPositionInOrBeforeNode(node); 1639 1640 RefPtr<Range> rangeInParent = Range::create(node->document(), parentFirstPosition, nodeRangeStart); 1640 1641
Note: See TracChangeset
for help on using the changeset viewer.