diff options
Diffstat (limited to 'WebCore/editing/visible_units.cpp')
-rw-r--r-- | WebCore/editing/visible_units.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebCore/editing/visible_units.cpp b/WebCore/editing/visible_units.cpp index 8b11013..7d46374 100644 --- a/WebCore/editing/visible_units.cpp +++ b/WebCore/editing/visible_units.cpp @@ -607,10 +607,10 @@ VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int FloatPoint absPos = containingBlock->localToAbsolute(FloatPoint()); if (containingBlock->hasOverflowClip()) absPos -= containingBlock->layer()->scrolledContentOffset(); - RenderObject* renderer = root->closestLeafChildForXPos(x - absPos.x(), isEditablePosition(p))->renderer(); + RenderObject* renderer = root->closestLeafChildForLogicalLeftPosition(x - absPos.x(), isEditablePosition(p))->renderer(); Node* node = renderer->node(); if (node && editingIgnoresContent(node)) - return Position(node->parent(), node->nodeIndex()); + return Position(node->parentNode(), node->nodeIndex()); return renderer->positionForPoint(IntPoint(x - absPos.x(), root->lineTop())); } @@ -712,10 +712,10 @@ VisiblePosition nextLinePosition(const VisiblePosition &visiblePosition, int x) FloatPoint absPos = containingBlock->localToAbsolute(FloatPoint()); if (containingBlock->hasOverflowClip()) absPos -= containingBlock->layer()->scrolledContentOffset(); - RenderObject* renderer = root->closestLeafChildForXPos(x - absPos.x(), isEditablePosition(p))->renderer(); + RenderObject* renderer = root->closestLeafChildForLogicalLeftPosition(x - absPos.x(), isEditablePosition(p))->renderer(); Node* node = renderer->node(); if (node && editingIgnoresContent(node)) - return Position(node->parent(), node->nodeIndex()); + return Position(node->parentNode(), node->nodeIndex()); return renderer->positionForPoint(IntPoint(x - absPos.x(), root->lineTop())); } |