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

Unified Diff: Source/platform/mac/ThemeMac.mm

Issue 1288823004: Reland #1: Fix the mechanism by which Blink determines OSX version number. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix logic error in unit test. Created 5 years, 4 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
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/mac/VersionUtilMac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mac/ThemeMac.mm
diff --git a/Source/platform/mac/ThemeMac.mm b/Source/platform/mac/ThemeMac.mm
index 5218678ef87b1eac58840c2a9c3383cd368220ad..3b120064faa4037fda1765ac173b32be2f49834d 100644
--- a/Source/platform/mac/ThemeMac.mm
+++ b/Source/platform/mac/ThemeMac.mm
@@ -30,6 +30,7 @@
#import "platform/graphics/GraphicsContextStateSaver.h"
#import "platform/mac/BlockExceptions.h"
#import "platform/mac/LocalCurrentGraphicsContext.h"
+#import "platform/mac/VersionUtilMac.h"
#import "platform/mac/WebCoreNSCellExtras.h"
#import "platform/scroll/ScrollableArea.h"
#include "wtf/StdLibExtras.h"
@@ -696,23 +697,16 @@ void ThemeMac::paint(ControlPart part, ControlStates states, GraphicsContext* co
}
}
-#ifndef NSAppKitVersionNumber10_7
-#define NSAppKitVersionNumber10_7 1138
-#endif
-#ifndef NSAppKitVersionNumber10_9
-#define NSAppKitVersionNumber10_9 1265
-#endif
-
bool ThemeMac::drawWithFrameDrawsFocusRing()
{
#if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
// If compiling against an OSX 10.8+ SDK, only 10.7 and older OSes will draw a
// focus ring with the frame.
- return floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_7;
+ return IsOSLionOrEarlier();
#else
// If compiling an OSX 10.7 or older SDK, OSes up through 10.9 will draw a focus
// ring with the frame.
- return floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9;
+ return IsOSMavericksOrEarlier();
#endif
}
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/mac/VersionUtilMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698