Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
| =================================================================== |
| --- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 94623) |
| +++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy) |
| @@ -1033,21 +1033,17 @@ |
| bool LocationBarView::SkipDefaultKeyEventProcessing( |
| const views::KeyEvent& event) { |
| #if defined(OS_WIN) |
| - bool views_omnibox = views::Widget::IsPureViews(); |
| if (views::FocusManager::IsTabTraversalKeyEvent(event)) { |
| - if (HasValidSuggestText()) { |
| - // Return true so that the edit sees the tab and commits the suggestion. |
| + if (location_entry_->model()->popup_model()->IsOpen()) { |
| + // Return true so that the edit sees the tab and moves the selection. |
| return true; |
| } |
| + |
| if (keyword_hint_view_->IsVisible() && !event.IsShiftDown()) { |
| // Return true so the edit gets the tab event and enters keyword mode. |
| return true; |
| } |
| - // If the caret is not at the end, then tab moves the caret to the end. |
| - if (!views_omnibox && !GetOmniboxViewWin()->IsCaretAtEnd()) |
| - return true; |
| - |
| // Tab while showing instant commits instant immediately. |
|
Peter Kasting
2011/07/29 21:08:44
sky should still look at this to see if this order
|
| // Return true so that focus traversal isn't attempted. The edit ends |
| // up doing nothing in this case. |
| @@ -1055,7 +1051,7 @@ |
| return true; |
| } |
| - if (!views_omnibox) |
| + if (!views::Widget::IsPureViews()) |
| return GetOmniboxViewWin()->SkipDefaultKeyEventProcessing(event); |
| NOTIMPLEMENTED(); |
| return false; |