| Index: third_party/WebKit/Source/core/editing/DragCaretController.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/DragCaretController.cpp b/third_party/WebKit/Source/core/editing/DragCaretController.cpp
|
| index e3f3300fb22071ee507123bff6093fcd4c6d22fb..61f97229792aa4a98eaf1cf099db83375786edba 100644
|
| --- a/third_party/WebKit/Source/core/editing/DragCaretController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/DragCaretController.cpp
|
| @@ -61,20 +61,20 @@ void DragCaretController::setCaretPosition(
|
| DisableCompositingQueryAsserts disabler;
|
|
|
| if (Node* node = m_position.anchorNode())
|
| - m_caretBase->invalidateCaretRect(node);
|
| + m_caretBase->invalidateCaretRect(node, m_caretLocalRect);
|
| m_position = createVisiblePosition(position).toPositionWithAffinity();
|
| Document* document = nullptr;
|
| if (Node* node = m_position.anchorNode()) {
|
| - m_caretBase->invalidateCaretRect(node);
|
| + m_caretBase->invalidateCaretRect(node, m_caretLocalRect);
|
| document = &node->document();
|
| setContext(document);
|
| }
|
| if (m_position.isNull()) {
|
| - m_caretBase->clearCaretRect();
|
| + m_caretLocalRect = LayoutRect();
|
| } else {
|
| DCHECK(!m_position.isOrphan());
|
| document->updateStyleAndLayoutTree();
|
| - m_caretBase->updateCaretRect(m_position);
|
| + m_caretLocalRect = CaretBase::computeCaretRect(m_position);
|
| }
|
| }
|
|
|
| @@ -112,8 +112,9 @@ void DragCaretController::paintDragCaret(LocalFrame* frame,
|
| GraphicsContext& context,
|
| const LayoutPoint& paintOffset) const {
|
| if (m_position.anchorNode()->document().frame() == frame) {
|
| - m_caretBase->paintCaret(m_position.anchorNode(), context, paintOffset,
|
| - DisplayItem::kDragCaret);
|
| + CaretBase::paintCaret(m_position.anchorNode(), context, *m_caretBase,
|
| + m_caretLocalRect, paintOffset,
|
| + DisplayItem::kDragCaret);
|
| }
|
| }
|
|
|
|
|