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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.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/InsertParagraphSeparatorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
index 096481982033aec39d0208fae7ca8aaf3b41aba1..3cf8d7a78b5a85384754aea70da733caa35aaf47 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
@@ -345,7 +345,9 @@ void InsertParagraphSeparatorCommand::doApply(EditingState* editingState)
// content will move down a line.
if (isStartOfParagraph(visiblePos)) {
RefPtrWillBeRawPtr<HTMLBRElement> br = HTMLBRElement::create(document());
- insertNodeAt(br.get(), insertionPosition);
+ insertNodeAt(br.get(), insertionPosition, editingState);
+ if (editingState->isAborted())
+ return;
insertionPosition = positionInParentAfterNode(*br);
// If the insertion point is a break element, there is nothing else
// we need to do.

Powered by Google App Engine
This is Rietveld 408576698