| Index: Source/core/editing/Caret.cpp
|
| diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp
|
| index e2528135ca3fb27c3eeb1a0b479d8db15507a059..ea872d215da6cffa3b9046cf12856af35c3dafe6 100644
|
| --- a/Source/core/editing/Caret.cpp
|
| +++ b/Source/core/editing/Caret.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "core/editing/htmlediting.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/Settings.h"
|
| +#include "core/html/HTMLTextFormControlElement.h"
|
| #include "core/rendering/RenderBlock.h"
|
| #include "core/rendering/RenderView.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| @@ -130,17 +131,17 @@ RenderBlock* CaretBase::caretRenderer(Node* node)
|
| return paintedByBlock ? toRenderBlock(renderer) : renderer->containingBlock();
|
| }
|
|
|
| -bool CaretBase::updateCaretRect(Document* document, const VisiblePosition& caretPosition)
|
| +bool CaretBase::updateCaretRect(Document* document, const PositionWithAffinity& caretPosition)
|
| {
|
| document->updateRenderTreeIfNeeded();
|
| m_caretLocalRect = LayoutRect();
|
|
|
| m_caretRectNeedsUpdate = false;
|
|
|
| - if (caretPosition.isNull())
|
| + if (caretPosition.position().isNull())
|
| return false;
|
|
|
| - ASSERT(caretPosition.deepEquivalent().deprecatedNode()->renderer());
|
| + ASSERT(caretPosition.position().deprecatedNode()->renderer());
|
|
|
| // First compute a rect local to the renderer at the selection start.
|
| RenderObject* renderer;
|
| @@ -148,7 +149,7 @@ bool CaretBase::updateCaretRect(Document* document, const VisiblePosition& caret
|
|
|
| // Get the renderer that will be responsible for painting the caret
|
| // (which is either the renderer we just found, or one of its containers).
|
| - RenderBlock* caretPainter = caretRenderer(caretPosition.deepEquivalent().deprecatedNode());
|
| + RenderBlock* caretPainter = caretRenderer(caretPosition.position().deprecatedNode());
|
|
|
| // Compute an offset between the renderer and the caretPainter.
|
| bool unrooted = false;
|
| @@ -168,6 +169,11 @@ bool CaretBase::updateCaretRect(Document* document, const VisiblePosition& caret
|
| return true;
|
| }
|
|
|
| +bool CaretBase::updateCaretRect(Document* document, const VisiblePosition& caretPosition)
|
| +{
|
| + return updateCaretRect(document, PositionWithAffinity(caretPosition.deepEquivalent(), caretPosition.affinity()));
|
| +}
|
| +
|
| RenderBlock* DragCaretController::caretRenderer() const
|
| {
|
| return CaretBase::caretRenderer(m_position.deepEquivalent().deprecatedNode());
|
|
|