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

Unified Diff: chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm

Issue 10807052: mac: Remove code that was only needed on 10.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kill workspaceIDCache_ Created 8 years, 5 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/wrench_menu/menu_tracked_button.mm
diff --git a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
index e3e4fc18e26a937f0084a8e7b2cdc83a95c2a421..e46603814f42a6efc65f3353b79ddc8706ac313b 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
@@ -10,7 +10,6 @@
- (void)doHighlight:(BOOL)highlight;
- (void)checkMouseInRect;
- (NSRect)insetBounds;
-- (BOOL)shouldHighlightOnHover;
@end
@implementation MenuTrackedButton
@@ -58,7 +57,7 @@
// smallest that still produces the effect while minimizing jank. Smaller
// values make the selector fire too close to immediately/now for the mouse to
// have moved off the receiver, and larger values produce lag.
- if (tracking_ && [self shouldHighlightOnHover]) {
+ if (tracking_) {
[self performSelector:@selector(checkMouseInRect)
withObject:nil
afterDelay:0.05
@@ -77,9 +76,6 @@
}
- (void)doHighlight:(BOOL)highlight {
- if (![self shouldHighlightOnHover]) {
- return;
- }
[[self cell] setHighlighted:highlight];
[self setNeedsDisplay];
}
@@ -103,10 +99,4 @@
return NSInsetRect([self bounds], 2, 1);
}
-- (BOOL)shouldHighlightOnHover {
- // There's a cell drawing bug in 10.5 that was fixed on 10.6. Hover states
- // look terrible due to this, so disable highlighting on 10.5.
- return base::mac::IsOSSnowLeopardOrLater();
-}
-
@end
« no previous file with comments | « chrome/browser/ui/cocoa/tracking_area_unittest.mm ('k') | chrome/browser/ui/panels/panel_window_controller_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698