Index: Source/core/editing/InsertLineBreakCommand.cpp |
diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp |
index 5270238d9484c1824f62e95d00a0d919b2ccc811..157656710a3a794e8a4d9c2377e8fba7c03d060a 100644 |
--- a/Source/core/editing/InsertLineBreakCommand.cpp |
+++ b/Source/core/editing/InsertLineBreakCommand.cpp |
@@ -97,13 +97,13 @@ void InsertLineBreakCommand::doApply() |
if (needExtraLineBreak) |
insertNodeBefore(nodeToInsert->cloneNode(false), nodeToInsert); |
- VisiblePosition endingPosition(positionBeforeNode(nodeToInsert.get())); |
+ VisiblePosition endingPosition(positionBeforeNode(*nodeToInsert)); |
setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional())); |
} else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) { |
insertNodeAt(nodeToInsert.get(), pos); |
// Insert an extra br or '\n' if the just inserted one collapsed. |
- if (!isStartOfParagraph(VisiblePosition(positionBeforeNode(nodeToInsert.get())))) |
+ if (!isStartOfParagraph(VisiblePosition(positionBeforeNode(*nodeToInsert)))) |
insertNodeBefore(nodeToInsert->cloneNode(false).get(), nodeToInsert.get()); |
setEndingSelection(VisibleSelection(positionInParentAfterNode(*nodeToInsert), DOWNSTREAM, endingSelection().isDirectional())); |