Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Unified Diff: Source/core/editing/InsertLineBreakCommand.cpp

Issue 188033005: Have Position deal with more references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/IndentOutdentCommand.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « Source/core/editing/IndentOutdentCommand.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698