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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_section_container.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_section_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index c4945fd6642fb904b5f184f4ff07c8f8c1ec9746..40584c30203dfeaf48797392eaa252d8ff124163 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -406,7 +406,7 @@ bool ShouldOverwriteComboboxes(autofill::DialogSection section,
[[field window] convertBaseToScreen:textFrameInScreen.origin];
// And adjust for gfx::Rect being flipped compared to OSX coordinates.
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSScreen* screen = [[NSScreen screens] firstObject];
textFrameInScreen.origin.y =
NSMaxY([screen frame]) - NSMaxY(textFrameInScreen);
gfx::Rect textFrameRect(NSRectToCGRect(textFrameInScreen));
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698