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

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

Issue 2851363003: [InputEvent] Update EndingSelection when appending UndoStep (Closed)
Patch Set: Created 3 years, 8 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/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 2e7e96569faf363e2f3101d17d433167ef652201..d97958470a1a57c88bdbf3b58a39d4018ee91e11 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -216,6 +216,8 @@ void CompositeEditCommand::ApplyCommandToComposite(
void CompositeEditCommand::AppendCommandToUndoStep(
CompositeEditCommand* command) {
EnsureUndoStep()->Append(command->EnsureUndoStep());
+ EnsureUndoStep()->SetEndingSelection(
yosin_UTC9 2017/05/08 04:01:05 Could you move |SetEndingSelection()| call to |Edi
chongz 2017/05/08 23:37:53 Moved to |Editor::AppliedEditing()| but I have to
+ command->EnsureUndoStep()->EndingSelection());
command->undo_step_ = nullptr;
command->SetParent(this);
commands_.push_back(command);

Powered by Google App Engine
This is Rietveld 408576698