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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp

Issue 1997563002: Get rid of a redundant function alias positionBeforeNode() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-19T22:35:34 rebase Created 4 years, 7 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
Index: third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
index 60d68a82cbf2613b69b998ddb51e0cd7c4753c60..ad95e176ce0d39d252b27b248efeb6539860cb06 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -115,7 +115,7 @@ void InsertLineBreakCommand::doApply(EditingState* editingState)
nodeToInsert = extraNode;
}
- VisiblePosition endingPosition = createVisiblePosition(positionBeforeNode(nodeToInsert));
+ VisiblePosition endingPosition = createVisiblePosition(Position::beforeNode(nodeToInsert));
setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional()));
} else if (pos.computeEditingOffset() <= caretMinOffset(pos.anchorNode())) {
insertNodeAt(nodeToInsert, pos, editingState);
@@ -123,7 +123,7 @@ void InsertLineBreakCommand::doApply(EditingState* editingState)
return;
// Insert an extra br or '\n' if the just inserted one collapsed.
- if (!isStartOfParagraph(createVisiblePosition(positionBeforeNode(nodeToInsert)))) {
+ if (!isStartOfParagraph(createVisiblePosition(Position::beforeNode(nodeToInsert)))) {
insertNodeBefore(nodeToInsert->cloneNode(false), nodeToInsert, editingState);
if (editingState->isAborted())
return;

Powered by Google App Engine
This is Rietveld 408576698