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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Uses base::Optional<size_t> instead of representing no selection as -1. Created 3 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/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
index e95bea9dbb9910071305acea2af39d3c9a7c0df9..75c9345e4b58ad7cfb0b2a51dc6a170462554047 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
@@ -126,7 +126,8 @@ using autofill::AutofillPopupLayoutModel;
NSString* value = SysUTF16ToNSString(controller_->GetElidedValueAt(i));
NSString* label = SysUTF16ToNSString(controller_->GetElidedLabelAt(i));
- BOOL isSelected = static_cast<int>(i) == controller_->selected_line();
+ BOOL isSelected = controller_->selected_line() &&
+ i == controller_->selected_line().value();
[self drawSuggestionWithName:value
subtext:label
index:i

Powered by Google App Engine
This is Rietveld 408576698