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 |