Bug 1468053 - Add nsCocoaFeatures::OnMojaveOrLater(). r=haik, a=IanN CLOSED TREE DONTBUILD SEAMONKEY_2_49_ESR_RELBRANCH
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Thu, 28 Jun 2018 21:18:25 -0400
changeset 357530 957d35877f6f9143ed802545e4961baacecb7565
parent 357529 3e238bb605dd4fdedeaef4fb9b07425ebdea705f
child 357531 9969693fb395970df19a7e4e99b72d97e7963f10
push id7834
push userfrgrahl@gmx.net
push dateSun, 13 Jan 2019 12:17:02 +0000
treeherdermozilla-esr52@6e4ad8a8f2e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershaik, IanN
Bug 1468053 - Add nsCocoaFeatures::OnMojaveOrLater(). r=haik, a=IanN CLOSED TREE DONTBUILD mozilla-esr52 SEAMONKEY_2_49_ESR_RELBRANCH
--- a/widget/cocoa/nsCocoaFeatures.h
+++ b/widget/cocoa/nsCocoaFeatures.h
@@ -17,16 +17,17 @@ public:
   static int32_t OSXVersion();
   static int32_t OSXVersionMajor();
   static int32_t OSXVersionMinor();
   static int32_t OSXVersionBugFix();
   static bool OnYosemiteOrLater();
   static bool OnElCapitanOrLater();
   static bool OnSierraOrLater();
   static bool OnHighSierraOrLater();
+  static bool OnMojaveOrLater();
   static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
   // These are utilities that do not change or depend on the value of mOSXVersion
   // and instead just encapsulate the encoding algorithm.  Note that GetVersion
   // actually adjusts to the lowest supported OS, so it will always return
   // a "supported" version.  GetSystemVersion does not make any modifications.
   static void GetSystemVersion(int &aMajor, int &aMinor, int &aBugFix);
--- a/widget/cocoa/nsCocoaFeatures.mm
+++ b/widget/cocoa/nsCocoaFeatures.mm
@@ -15,16 +15,17 @@
 #define MAC_OS_X_VERSION_10_0_HEX  0x00001000
 #define MAC_OS_X_VERSION_10_7_HEX  0x00001070
 #define MAC_OS_X_VERSION_10_8_HEX  0x00001080
 #define MAC_OS_X_VERSION_10_9_HEX  0x00001090
 #define MAC_OS_X_VERSION_10_10_HEX 0x000010A0
 #define MAC_OS_X_VERSION_10_11_HEX 0x000010B0
 #define MAC_OS_X_VERSION_10_12_HEX 0x000010C0
 #define MAC_OS_X_VERSION_10_13_HEX 0x000010D0
+#define MAC_OS_X_VERSION_10_14_HEX 0x000010E0
 #include "nsCocoaFeatures.h"
 #include "nsCocoaUtils.h"
 #include "nsDebug.h"
 #include "nsObjCExceptions.h"
 #import <Cocoa/Cocoa.h>
@@ -170,12 +171,18 @@ nsCocoaFeatures::OnSierraOrLater()
 /* static */ bool
     return (OSXVersion() >= MAC_OS_X_VERSION_10_13_HEX);
 /* static */ bool
+    return (OSXVersion() >= MAC_OS_X_VERSION_10_14_HEX);
+/* static */ bool
 nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
     return OSXVersion() >= GetVersion(aMajor, aMinor, aBugFix);