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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.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, 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: chrome/browser/autocomplete/autocomplete_edit_view_win.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 80563)
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy)
@@ -2019,17 +2019,13 @@
}
case VK_TAB: {
- if (model_->is_keyword_hint()) {
+ const bool shift_pressed = GetKeyState(VK_SHIFT) < 0;
+ if (model_->is_keyword_hint() && !shift_pressed) {
// Accept the keyword.
ScopedFreeze freeze(this, GetTextObjectModel());
model_->AcceptKeyword();
- } else if (!IsCaretAtEnd()) {
- ScopedFreeze freeze(this, GetTextObjectModel());
- OnBeforePossibleChange();
- PlaceCaretAt(GetTextLength());
- OnAfterPossibleChange();
} else {
- model_->CommitSuggestedText(true);
+ model_->OnUpOrDownKeyPressed(shift_pressed ? -count : count);
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698