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

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

Issue 1380083005: Mac: Use [NSArray firstObject] for [NSScreen screens] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
index 8d54aac97e9d1dec35cb14f885ed219b160c824a..73e2f32a3a9fabebe0fe8d00427133f376489d65 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
@@ -139,7 +139,7 @@
// coordinate space places the origin at the top-left of the first screen,
// whereas Cocoa's coordinate space expects the origin to be at the
// bottom-left of this same screen.
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSScreen* screen = [[NSScreen screens] firstObject];
frame.origin.y = NSMaxY([screen frame]) - NSMaxY(frame);
// TODO(isherman): The view should support scrolling if the popup gets too

Powered by Google App Engine
This is Rietveld 408576698