Index: chrome/browser/ui/cocoa/gradient_button_cell.mm |
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.mm b/chrome/browser/ui/cocoa/gradient_button_cell.mm |
index d5bc52f4a4aef039fc6b5981a1dc61805106d285..8d44cbd8217eff38f3205c490e360c7b185a6565 100644 |
--- a/chrome/browser/ui/cocoa/gradient_button_cell.mm |
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.mm |
@@ -7,7 +7,6 @@ |
#include <cmath> |
#include "base/logging.h" |
-#include "base/mac/mac_util.h" |
#import "base/mac/scoped_nsobject.h" |
#import "chrome/browser/themes/theme_properties.h" |
#import "chrome/browser/themes/theme_service.h" |
@@ -528,21 +527,11 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4; |
const ui::ThemeProvider* themeProvider = [window themeProvider]; |
BOOL active = [window isKeyWindow] || [window isMainWindow]; |
- // Draw custom focus ring only if AppKit won't draw one automatically. |
- // The new focus ring APIs became available with 10.7, but did not get |
- // applied to buttons (only editable text fields) until 10.8. |
- BOOL shouldDrawFocusRing = base::mac::IsOSLionOrEarlier() && |
- [self showsFirstResponder]; |
- |
// Stroke the borders and appropriate fill gradient. If we're borderless, the |
// only time we want to draw the inner gradient is if we're highlighted or if |
// we're drawing the focus ring manually. |
if (([self isBordered] && ![self showsBorderOnlyWhileMouseInside]) || |
- pressed || |
- [self isMouseInside] || |
- [self isContinuousPulsing] || |
- shouldDrawFocusRing) { |
- |
+ pressed || [self isMouseInside] || [self isContinuousPulsing]) { |
// When pulsing we want the bookmark to stand out a little more. |
BOOL showClickedGradient = pressed || |
(pulseState_ == gradient_button_cell::kPulsingContinuous); |
@@ -574,22 +563,6 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4; |
NSCompositeSourceOver); |
} |
[self drawInteriorWithFrame:innerFrame inView:controlView]; |
- |
- if (shouldDrawFocusRing) { |
- gfx::ScopedNSGraphicsContextSaveGState scoped_state; |
- const CGFloat lineWidth = [controlView cr_lineWidth]; |
- // insetX = 1.0 is used for the drawing of blue highlight so that this |
- // highlight won't be too near the bookmark toolbar itself, in case we |
- // draw bookmark buttons in bookmark toolbar. |
- rect_path_utils::FrameRectWithInset(rect_path_utils::RoundedCornerAll, |
- NSInsetRect(cellFrame, 0, lineWidth), |
- 1.0, // insetX |
- 0.0, // insetY |
- 3.0, // outerRadius |
- lineWidth * 2, // lineWidth |
- [controlView |
- cr_keyboardFocusIndicatorColor]); |
- } |
} |
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { |