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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6731036: Enabled pressing TAB to cycle through the Omnibox results. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 5 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: chrome/browser/ui/views/location_bar/location_bar_view.cc
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 93757)
+++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy)
@@ -1033,29 +1033,13 @@
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.
- 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/27 20:18:25 I think this change depends on us ditching this be
- // Return true so that focus traversal isn't attempted. The edit ends
- // up doing nothing in this case.
- if (location_entry_->model()->AcceptCurrentInstantPreview())
- return true;
+ if (views::FocusManager::IsTabTraversalKeyEvent(event) &&
+ (location_entry_->model()->popup_model()->IsOpen() ||
+ (keyword_hint_view_->IsVisible() && !event.IsShiftDown()))) {
+ return true;
}
- if (!views_omnibox)
+ if (!views::Widget::IsPureViews())
return GetOmniboxViewWin()->SkipDefaultKeyEventProcessing(event);
NOTIMPLEMENTED();
return false;

Powered by Google App Engine
This is Rietveld 408576698