| Index: Source/core/editing/VisiblePosition.cpp
|
| diff --git a/Source/core/editing/VisiblePosition.cpp b/Source/core/editing/VisiblePosition.cpp
|
| index a5ec11bf2d5d76146cbab5f419b8de9404ac786b..6b343179170b6bc5468e4a49d8935910b0afb276 100644
|
| --- a/Source/core/editing/VisiblePosition.cpp
|
| +++ b/Source/core/editing/VisiblePosition.cpp
|
| @@ -649,24 +649,8 @@ UChar32 VisiblePosition::characterAfter() const
|
|
|
| LayoutRect VisiblePosition::localCaretRect(RenderObject*& renderer) const
|
| {
|
| - if (m_deepPosition.isNull()) {
|
| - renderer = 0;
|
| - return IntRect();
|
| - }
|
| - Node* node = m_deepPosition.anchorNode();
|
| -
|
| - renderer = node->renderer();
|
| - if (!renderer)
|
| - return LayoutRect();
|
| -
|
| - InlineBox* inlineBox;
|
| - int caretOffset;
|
| - getInlineBoxAndOffset(inlineBox, caretOffset);
|
| -
|
| - if (inlineBox)
|
| - renderer = &inlineBox->renderer();
|
| -
|
| - return renderer->localCaretRect(inlineBox, caretOffset);
|
| + PositionWithAffinity positionWithAffinity(m_deepPosition, m_affinity);
|
| + return positionWithAffinity.localCaretRect(renderer);
|
| }
|
|
|
| IntRect VisiblePosition::absoluteCaretBounds() const
|
|
|