| Index: Source/core/editing/Caret.cpp
|
| diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp
|
| index 4b8ae4aa90f15136e1eb283945b84ae0b462d57b..06424f29cea82ea09e9d712c7592ef1c9382e5df 100644
|
| --- a/Source/core/editing/Caret.cpp
|
| +++ b/Source/core/editing/Caret.cpp
|
| @@ -70,10 +70,12 @@ void DragCaretController::setCaretPosition(const VisiblePosition& position)
|
| invalidateCaretRect(node);
|
| document = &node->document();
|
| }
|
| - if (m_position.isNull() || m_position.isOrphan())
|
| + if (m_position.isNull() || m_position.isOrphan()) {
|
| clearCaretRect();
|
| - else
|
| + } else {
|
| + document->updateRenderTreeIfNeeded();
|
| updateCaretRect(document, m_position);
|
| + }
|
| }
|
|
|
| static bool removingNodeRemovesPosition(Node& node, const Position& position)
|
| @@ -134,7 +136,6 @@ RenderBlock* CaretBase::caretRenderer(Node* node)
|
|
|
| bool CaretBase::updateCaretRect(Document* document, const PositionWithAffinity& caretPosition)
|
| {
|
| - document->updateRenderTreeIfNeeded();
|
| m_caretLocalRect = LayoutRect();
|
|
|
| m_caretRectNeedsUpdate = false;
|
|
|