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

Side by Side Diff: chrome/browser/ui/cocoa/styled_text_field.mm

Issue 6598005: Fix extra focus glow for the omnibox on Mac OS X Lion.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "chrome/browser/ui/cocoa/styled_text_field.h" 5 #import "chrome/browser/ui/cocoa/styled_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" 8 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
9 9
10 @implementation StyledTextField 10 @implementation StyledTextField
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Make sure the selection remains visible. 51 // Make sure the selection remains visible.
52 [editor scrollRangeToVisible:[editor selectedRange]]; 52 [editor scrollRangeToVisible:[editor selectedRange]];
53 } 53 }
54 54
55 - (CGFloat)availableDecorationWidth { 55 - (CGFloat)availableDecorationWidth {
56 NSAttributedString* as = [self attributedStringValue]; 56 NSAttributedString* as = [self attributedStringValue];
57 const NSSize size([as size]); 57 const NSSize size([as size]);
58 const NSRect bounds([self bounds]); 58 const NSRect bounds([self bounds]);
59 return NSWidth(bounds) - size.width; 59 return NSWidth(bounds) - size.width;
60 } 60 }
61
62 - (NSFocusRingType)focusRingType {
63 // This is taken care of by the custom drawing code in the cell.
64 return NSFocusRingTypeNone;
65 }
66
61 @end 67 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698