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

Unified Diff: chrome/browser/autofill/autofill_popup_view.cc

Issue 11189093: Skip Unacceptable Items in new Autofill UI when Navigating with Keys. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
« no previous file with comments | « chrome/browser/autofill/autofill_popup_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_popup_view.cc
diff --git a/chrome/browser/autofill/autofill_popup_view.cc b/chrome/browser/autofill/autofill_popup_view.cc
index 0ca2bd4d2cbeb07afdb259da6b41c1adb99fb149..11763f521c0ba1e12cdf6cb94470574b3e661a4d 100644
--- a/chrome/browser/autofill/autofill_popup_view.cc
+++ b/chrome/browser/autofill/autofill_popup_view.cc
@@ -136,6 +136,10 @@ void AutofillPopupView::ClearSelectedLine() {
void AutofillPopupView::SelectNextLine() {
int new_selected_line = selected_line_ + 1;
+ while (static_cast<size_t>(new_selected_line) < autofill_values_.size() &&
Ilya Sherman 2012/10/20 03:38:24 nit: Please add a comment describing this block.
csharp 2012/10/22 13:29:20 Done.
+ !CanAccept(autofill_unique_ids()[new_selected_line]))
Ilya Sherman 2012/10/20 03:38:24 Optional nit: I prefer to always include curly bra
csharp 2012/10/22 13:29:20 Done.
+ ++new_selected_line;
+
if (new_selected_line == static_cast<int>(autofill_values_.size()))
new_selected_line = 0;
@@ -145,6 +149,10 @@ void AutofillPopupView::SelectNextLine() {
void AutofillPopupView::SelectPreviousLine() {
int new_selected_line = selected_line_ - 1;
+ while (kNoSelection < new_selected_line &&
Ilya Sherman 2012/10/20 03:38:24 Optional nit: I think this would be slightly clear
csharp 2012/10/22 13:29:20 Done.
+ !CanAccept(autofill_unique_ids()[new_selected_line]))
+ --new_selected_line;
Ilya Sherman 2012/10/20 03:38:24 nit: Ditto on both counts.
csharp 2012/10/22 13:29:20 Done.
+
if (new_selected_line <= kNoSelection)
new_selected_line = autofill_values_.size() - 1;
« no previous file with comments | « chrome/browser/autofill/autofill_popup_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698