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

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: Enabled pressing TAB to cycle through the Omnibox results, removed moving the caret to the Created 9 years, 9 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 79782)
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy)
@@ -2022,17 +2022,13 @@
}
case VK_TAB: {
- if (model_->is_keyword_hint()) {
+ const bool no_shift = GetKeyState(VK_SHIFT) >= 0;
Peter Kasting 2011/04/01 00:09:09 Nit: Reverse this and call the variable |shift_pre
+ if (model_->is_keyword_hint() && no_shift) {
// Accept the keyword.
ScopedFreeze freeze(this, GetTextObjectModel());
- model_->AcceptKeyword();
- } else if (!IsCaretAtEnd()) {
- ScopedFreeze freeze(this, GetTextObjectModel());
- OnBeforePossibleChange();
- PlaceCaretAt(GetTextLength());
- OnAfterPossibleChange();
+ model_->AcceptKeyword(false);
} else {
- model_->CommitSuggestedText(true);
+ model_->OnUpOrDownKeyPressed(no_shift ? count : -count);
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698