Bug 1471950: Add nsCocoaFeatures::OnMojaveOrLater(). r=haik

This commit is contained in:
Stephen A Pohl 2018-06-28 21:18:25 -04:00
parent 30f34ce0d6
commit 0259400505
2 changed files with 21 additions and 13 deletions

View File

@ -20,9 +20,10 @@ public:
static int32_t OSXVersionBugFix();
static bool OnYosemiteOrLater();
static bool OnElCapitanOrLater();
static bool OnSierraExactly();
static bool OnSierraOrLater();
static bool OnHighSierraOrLater();
static bool OnSierraExactly();
static bool OnMojaveOrLater();
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);

View File

@ -20,6 +20,7 @@
#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"
@ -162,18 +163,6 @@ nsCocoaFeatures::OnElCapitanOrLater()
return (OSXVersion() >= MAC_OS_X_VERSION_10_11_HEX);
}
/* static */ bool
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::OnSierraExactly()
{
@ -188,12 +177,30 @@ Gecko_OnSierraExactly()
return nsCocoaFeatures::OnSierraExactly();
}
/* static */ bool
nsCocoaFeatures::OnSierraOrLater()
{
return (OSXVersion() >= MAC_OS_X_VERSION_10_12_HEX);
}
/* static */ bool
nsCocoaFeatures::OnHighSierraOrLater()
{
return (OSXVersion() >= MAC_OS_X_VERSION_10_13_HEX);
}
bool
Gecko_OnHighSierraOrLater()
{
return nsCocoaFeatures::OnHighSierraOrLater();
}
/* static */ bool
nsCocoaFeatures::OnMojaveOrLater()
{
return (OSXVersion() >= MAC_OS_X_VERSION_10_14_HEX);
}
/* static */ bool
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
{