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

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

Issue 1695153002: Editing: Make the |EditingState*| argument of CompositeEditCommand::removeNode 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 a2297835be3c5ad5c4a9ad5a24dc6daa340f518d..36b5938050a400f2024d6bc9512c1ecb67a3d723 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
@@ -148,7 +148,7 @@ PassRefPtrWillBeRawPtr<Element> InsertParagraphSeparatorCommand::cloneHierarchyU
return parent.release();
}
-void InsertParagraphSeparatorCommand::doApply(EditingState*)
+void InsertParagraphSeparatorCommand::doApply(EditingState* editingState)
{
if (!endingSelection().isNonOrphanedCaretOrRange())
return;
@@ -193,7 +193,7 @@ void InsertParagraphSeparatorCommand::doApply(EditingState*)
//---------------------------------------------------------------------
// Handle special case of typing return on an empty list item
- if (breakOutOfEmptyListItem())
+ if (breakOutOfEmptyListItem(editingState) || editingState->isAborted())
return;
//---------------------------------------------------------------------
@@ -410,7 +410,9 @@ void InsertParagraphSeparatorCommand::doApply(EditingState*)
}
}
- moveRemainingSiblingsToNewParent(n, blockToInsert.get(), blockToInsert);
+ moveRemainingSiblingsToNewParent(n, blockToInsert.get(), blockToInsert, editingState);
+ if (editingState->isAborted())
+ return;
}
// Handle whitespace that occurs after the split

Powered by Google App Engine
This is Rietveld 408576698