Chromium Code Reviews| Index: ui/views/controls/textfield/textfield.cc |
| diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc |
| index fdfe19b095fc0cdb63d857ba800f0d88b509abf0..751e8fa3c87866e1e749f0a04679db40f5a7e94d 100644 |
| --- a/ui/views/controls/textfield/textfield.cc |
| +++ b/ui/views/controls/textfield/textfield.cc |
| @@ -769,6 +769,7 @@ bool Textfield::AcceleratorPressed(const ui::Accelerator& accelerator) { |
| ui::KeyEvent event(accelerator.type(), accelerator.key_code(), |
| accelerator.modifiers()); |
| ExecuteTextEditCommand(GetCommandForKeyEvent(event)); |
| + UpdateAfterChange(false, true); |
|
sadrul
2017/03/08 02:02:52
We shouldn't need this here? ExecuteTextEditComman
yiyix
2017/03/08 03:32:41
ExecuteTextEditCommand first calls OmniboxViewView
sadrul
2017/03/08 13:45:36
OK. So it looks like there *are* some cases where
|
| return true; |
| } |
| @@ -883,8 +884,8 @@ int Textfield::OnPerformDrop(const ui::DropTargetEvent& event) { |
| model_->InsertText(new_text); |
| } |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| return move ? ui::DragDropTypes::DRAG_MOVE : ui::DragDropTypes::DRAG_COPY; |
| } |
| @@ -1263,8 +1264,8 @@ void Textfield::SetCompositionText(const ui::CompositionText& composition) { |
| skip_input_method_cancel_composition_ = true; |
| model_->SetCompositionText(composition); |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| } |
| void Textfield::ConfirmCompositionText() { |
| @@ -1275,8 +1276,8 @@ void Textfield::ConfirmCompositionText() { |
| skip_input_method_cancel_composition_ = true; |
| model_->ConfirmCompositionText(); |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| } |
| void Textfield::ClearCompositionText() { |
| @@ -1287,8 +1288,8 @@ void Textfield::ClearCompositionText() { |
| skip_input_method_cancel_composition_ = true; |
| model_->CancelCompositionText(); |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| } |
| void Textfield::InsertText(const base::string16& new_text) { |
| @@ -1300,8 +1301,8 @@ void Textfield::InsertText(const base::string16& new_text) { |
| skip_input_method_cancel_composition_ = true; |
| model_->InsertText(new_text); |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| } |
| void Textfield::InsertChar(const ui::KeyEvent& event) { |
| @@ -1583,8 +1584,8 @@ void Textfield::DoInsertChar(base::char16 ch) { |
| model_->InsertChar(ch); |
| skip_input_method_cancel_composition_ = false; |
| - UpdateAfterChange(true, true); |
| OnAfterUserAction(); |
| + UpdateAfterChange(true, true); |
| } |
| gfx::RenderText* Textfield::GetRenderText() const { |
| @@ -1795,8 +1796,8 @@ void Textfield::ExecuteTextEditCommand(ui::TextEditCommand command) { |
| cursor_changed |= GetSelectionModel() != selection_model; |
| if (cursor_changed && HasSelection()) |
| UpdateSelectionClipboard(); |
| - UpdateAfterChange(text_changed, cursor_changed); |
| OnAfterUserAction(); |
| + UpdateAfterChange(text_changed, cursor_changed); |
| } |
| //////////////////////////////////////////////////////////////////////////////// |