Chromium Code Reviews| Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| index 689b651ed518fc723481d9294126be3eee28c176..7fcef80d920f238102ae3f44ab6837a386c11447 100644 |
| --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| @@ -821,27 +821,22 @@ bool OmniboxViewViews::IsTextEditCommandEnabled( |
| } |
| } |
| -void OmniboxViewViews::ExecuteTextEditCommand(ui::TextEditCommand command) { |
| - // In the base class, touch text selection is deactivated when a command is |
| - // executed. Since we are not always calling the base class implementation |
| - // here, we need to deactivate touch text selection here, too. |
| - DestroyTouchSelection(); |
| - |
| - if (!IsTextEditCommandEnabled(command)) |
| - return; |
| - |
| +bool OmniboxViewViews::ExecuteTextEditCommandImpl(ui::TextEditCommand command) { |
| switch (command) { |
| case ui::TextEditCommand::MOVE_UP: |
| model()->OnUpOrDownKeyPressed(-1); |
| + return false; |
|
sadrul
2017/03/09 01:47:38
I feel like this should be true? (also, below for
yiyix
2017/03/09 02:45:33
Only OnPaste calls OnAfterPossibleChange, that's w
|
| break; |
|
sadrul
2017/03/09 01:47:38
You should remove the break; (here and below)
yiyix
2017/03/09 02:45:33
No break needed after return. Right. I will watch
|
| case ui::TextEditCommand::MOVE_DOWN: |
| model()->OnUpOrDownKeyPressed(1); |
| + return false; |
| break; |
| case ui::TextEditCommand::PASTE: |
| OnPaste(); |
| + return true; |
| break; |
| default: |
| - Textfield::ExecuteTextEditCommand(command); |
| + return Textfield::ExecuteTextEditCommandImpl(command); |
| break; |
| } |
| } |