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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.mm

Issue 1310183005: Mac: Fix missing focus rings on toolbar, profile, and tab buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Fix extension buttons Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h" 5 #include "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 9 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
10 10
(...skipping 23 matching lines...) Expand all
34 NSRect imageRect, titleRect; 34 NSRect imageRect, titleRect;
35 NSRect contentRect = NSInsetRect(cellFrame, kSidePadding, 0); 35 NSRect contentRect = NSInsetRect(cellFrame, kSidePadding, 0);
36 NSDivideRect( 36 NSDivideRect(
37 contentRect, &imageRect, &titleRect, [self imageSize].width, NSMaxXEdge); 37 contentRect, &imageRect, &titleRect, [self imageSize].width, NSMaxXEdge);
38 [super drawImageWithFrame:imageRect inView:controlView]; 38 [super drawImageWithFrame:imageRect inView:controlView];
39 39
40 NSAttributedString* title = [self attributedTitle]; 40 NSAttributedString* title = [self attributedTitle];
41 if ([title length]) 41 if ([title length])
42 [self drawTitle:title withFrame:titleRect inView:controlView]; 42 [self drawTitle:title withFrame:titleRect inView:controlView];
43 43
44 // Only draw custom focus ring if the 10.7 focus ring APIs are not available. 44 [self drawFocusRingWithFrame:cellFrame inView:controlView];
45 // TODO(groby): Remove once we build against the 10.7 SDK.
46 if (![self respondsToSelector:@selector(drawFocusRingMaskWithFrame:inView:)])
47 [super drawFocusRingWithFrame:cellFrame inView:controlView];
48 } 45 }
49 46
50 @end 47 @end
51 48
OLDNEW
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/ui/cocoa/extensions/browser_action_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698