summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2020-03-21 17:37:05 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-03-22 14:44:09 +0100
commit8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b (patch)
tree9701a008504ab7a9725b399ac251ee85257e5389
parent0a5ad190c3f9a9805d2cf90aae95ee5768092133 (diff)
downloadUXP-8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b.tar
UXP-8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b.tar.gz
UXP-8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b.tar.lz
UXP-8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b.tar.xz
UXP-8c7ca10cfe4c5ec4cee81632893a9ec46f066c2b.zip
Issue #1491 - Part 1: Update nsCocoaFeatures for newer versions of MacOS X.
-rw-r--r--widget/cocoa/nsCocoaFeatures.h3
-rw-r--r--widget/cocoa/nsCocoaFeatures.mm21
2 files changed, 24 insertions, 0 deletions
diff --git a/widget/cocoa/nsCocoaFeatures.h b/widget/cocoa/nsCocoaFeatures.h
index 597aff611..984dae80e 100644
--- a/widget/cocoa/nsCocoaFeatures.h
+++ b/widget/cocoa/nsCocoaFeatures.h
@@ -21,6 +21,9 @@ public:
static bool OnYosemiteOrLater();
static bool OnElCapitanOrLater();
static bool OnSierraOrLater();
+ static bool OnHighSierraOrLater();
+ static bool OnMojaveOrLater();
+ static bool OnCatalinaOrLater();
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
diff --git a/widget/cocoa/nsCocoaFeatures.mm b/widget/cocoa/nsCocoaFeatures.mm
index 5a5c16fa1..065260837 100644
--- a/widget/cocoa/nsCocoaFeatures.mm
+++ b/widget/cocoa/nsCocoaFeatures.mm
@@ -19,6 +19,9 @@
#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
+#define MAC_OS_X_VERSION_10_15_HEX 0x000010F0
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
@@ -167,6 +170,24 @@ nsCocoaFeatures::OnSierraOrLater()
return (OSXVersion() >= MAC_OS_X_VERSION_10_12_HEX);
}
+/* static */ bool
+nsCocoaFeatures::OnHighSierraOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_13_HEX);
+}
+
+/* static */ bool
+nsCocoaFeatures::OnMojaveOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_14_HEX);
+}
+
+/* static */ bool
+nsCocoaFeatures::OnCatalinaOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_15_HEX);
+}
+
/* static */ bool
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
{