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

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

Issue 1702233002: Editing: Make the |EditingState*| argument of CompositeEditCommand::insertNodeAt mandatory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 cf59bc19c29018bd94a1ada8e4d845fae5745265..52210eb53ab2f01087665ea4242d85e097e08a13 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -152,7 +152,9 @@ void InsertLineBreakCommand::doApply(EditingState* editingState)
insertTextIntoNode(textNode, 0, nonBreakingSpaceString());
} else {
RefPtrWillBeRawPtr<Text> nbspNode = document().createTextNode(nonBreakingSpaceString());
- insertNodeAt(nbspNode.get(), positionBeforeTextNode);
+ insertNodeAt(nbspNode.get(), positionBeforeTextNode, editingState);
+ if (editingState->isAborted())
+ return;
endingPosition = firstPositionInNode(nbspNode.get());
}
}

Powered by Google App Engine
This is Rietveld 408576698