summaryrefslogtreecommitdiffstats
path: root/widget/cocoa/nsCocoaFeatures.mm
diff options
context:
space:
mode:
Diffstat (limited to 'widget/cocoa/nsCocoaFeatures.mm')
-rw-r--r--widget/cocoa/nsCocoaFeatures.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/widget/cocoa/nsCocoaFeatures.mm b/widget/cocoa/nsCocoaFeatures.mm
index 065260837..0b22c51bd 100644
--- a/widget/cocoa/nsCocoaFeatures.mm
+++ b/widget/cocoa/nsCocoaFeatures.mm
@@ -22,6 +22,8 @@
#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
+#define MAC_OS_X_VERSION_10_16_HEX 0x000A1000
+#define MAC_OS_X_VERSION_11_0_HEX 0x000B0000
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
@@ -189,6 +191,14 @@ nsCocoaFeatures::OnCatalinaOrLater()
}
/* static */ bool
+nsCocoaFeatures::OnBigSurOrLater() {
+ // Account for the version being 10.16 (which occurs when the
+ // application is linked with an older SDK) or 11.0 on Big Sur.
+ return ((OSXVersion() >= MAC_OS_X_VERSION_10_16_HEX) ||
+ (OSXVersion() >= MAC_OS_X_VERSION_11_0_HEX));
+}
+
+/* static */ bool
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
{
return OSXVersion() >= GetVersion(aMajor, aMinor, aBugFix);