mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1403945: Add utility functions to recognize OS X 10.13. r=mstange
MozReview-Commit-ID: Bw0jkyWrIzD --HG-- extra : rebase_source : bf8bff4e9bf7892efa3f88565af0489257949958
This commit is contained in:
parent
b25ce830dd
commit
848f9f69d4
@ -58,6 +58,7 @@ enum class OperatingSystem {
|
||||
OSX10_10,
|
||||
OSX10_11,
|
||||
OSX10_12,
|
||||
OSX10_13,
|
||||
Android,
|
||||
Ios
|
||||
};
|
||||
|
@ -291,6 +291,8 @@ BlacklistOSToOperatingSystem(const nsAString& os)
|
||||
return OperatingSystem::OSX10_11;
|
||||
else if (os.EqualsLiteral("Darwin 16"))
|
||||
return OperatingSystem::OSX10_12;
|
||||
else if (os.EqualsLiteral("Darwin 17"))
|
||||
return OperatingSystem::OSX10_13;
|
||||
else if (os.EqualsLiteral("Android"))
|
||||
return OperatingSystem::Android;
|
||||
// For historical reasons, "All" in blocklist means "All Windows"
|
||||
|
@ -54,6 +54,8 @@ OSXVersionToOperatingSystem(uint32_t aOSXVersion)
|
||||
return OperatingSystem::OSX10_11;
|
||||
case 12:
|
||||
return OperatingSystem::OSX10_12;
|
||||
case 13:
|
||||
return OperatingSystem::OSX10_13;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
static bool OnYosemiteOrLater();
|
||||
static bool OnElCapitanOrLater();
|
||||
static bool OnSierraOrLater();
|
||||
static bool OnHighSierraOrLater();
|
||||
|
||||
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#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
|
||||
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "nsCocoaUtils.h"
|
||||
@ -167,6 +168,12 @@ nsCocoaFeatures::OnSierraOrLater()
|
||||
return (OSXVersion() >= MAC_OS_X_VERSION_10_12_HEX);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsCocoaFeatures::OnHighSierraOrLater()
|
||||
{
|
||||
return (OSXVersion() >= MAC_OS_X_VERSION_10_13_HEX);
|
||||
}
|
||||
|
||||
/* Version of OnSierraOrLater as a global function callable from C (cairo) */
|
||||
bool
|
||||
Gecko_OnSierraOrLater()
|
||||
|
Loading…
Reference in New Issue
Block a user