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

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.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/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index fc01402bc41f398976e9bf095f4374fafe9727ae..7407dc12056625c493234036176160008416ef9e 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -388,7 +388,7 @@ void DeleteSelectionCommand::removeNode(PassRefPtrWillBeRawPtr<Node> node, Editi
if (r && r->isTableCell() && toLayoutTableCell(r)->contentHeight() <= 0) {
Position firstEditablePosition = firstEditablePositionInNode(node.get());
if (firstEditablePosition.isNotNull())
- insertBlockPlaceholder(firstEditablePosition);
+ insertBlockPlaceholder(firstEditablePosition, editingState);
}
return;
}
@@ -916,8 +916,11 @@ void DeleteSelectionCommand::doApply(EditingState* editingState)
}
// handleGeneralDelete cause DOM mutation events so |m_endingPosition|
// can be out of document.
- if (m_endingPosition.inDocument())
- insertNodeAt(placeholder.get(), m_endingPosition);
+ if (m_endingPosition.inDocument()) {
+ insertNodeAt(placeholder.get(), m_endingPosition, editingState);
+ if (editingState->isAborted())
+ return;
+ }
}
rebalanceWhitespaceAt(m_endingPosition);

Powered by Google App Engine
This is Rietveld 408576698