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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2851363003: [InputEvent] Update EndingSelection when appending UndoStep (Closed)
Patch Set: yosin's comment: Use |start === undefined| Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-drag-drop.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 8207eb6381b2216ff33bb1f6d3992c1edec8bb11..4e6d3b6661db4cdd5b148511f4244d95bca3b0dc 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -965,6 +965,8 @@ void Editor::AppliedEditing(CompositeEditCommand* cmd) {
// Only register undo entry when combined with other commands.
if (!last_edit_command_->GetUndoStep())
undo_stack_->RegisterUndoStep(last_edit_command_->EnsureUndoStep());
+ last_edit_command_->EnsureUndoStep()->SetEndingSelection(
+ cmd->EnsureUndoStep()->EndingSelection());
last_edit_command_->AppendCommandToUndoStep(cmd);
} else {
// Only register a new undo command if the command passed in is
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-drag-drop.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698