Index: Source/core/editing/Caret.cpp |
diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp |
index 258d7e118dec8c28f2b9383b83a3b188190ebf61..21de4d25d824433015c5d1b0d1a37c0831644124 100644 |
--- a/Source/core/editing/Caret.cpp |
+++ b/Source/core/editing/Caret.cpp |
@@ -78,7 +78,7 @@ void DragCaretController::setCaretPosition(const VisiblePosition& position) |
updateCaretRect(document, m_position); |
} |
-static bool removingNodeRemovesPosition(Node* node, const Position& position) |
+static bool removingNodeRemovesPosition(Node& node, const Position& position) |
{ |
if (!position.anchorNode()) |
return false; |
@@ -86,11 +86,11 @@ static bool removingNodeRemovesPosition(Node* node, const Position& position) |
if (position.anchorNode() == node) |
return true; |
- if (!node->isElementNode()) |
+ if (!node.isElementNode()) |
return false; |
- Element* element = toElement(node); |
- return element->containsIncludingShadowDOM(position.anchorNode()); |
+ Element& element = toElement(node); |
+ return element.containsIncludingShadowDOM(position.anchorNode()); |
} |
static void clearRenderViewSelection(const Position& position) |
@@ -101,9 +101,9 @@ static void clearRenderViewSelection(const Position& position) |
view->clearSelection(); |
} |
-void DragCaretController::nodeWillBeRemoved(Node* node) |
+void DragCaretController::nodeWillBeRemoved(Node& node) |
{ |
- if (!hasCaret() || (node && !node->inDocument())) |
+ if (!hasCaret() || !node.inDocument()) |
return; |
if (!removingNodeRemovesPosition(node, m_position.deepEquivalent())) |