зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1284341: Add utility functions to recognize OS X 10.12. r=mstange
MozReview-Commit-ID: BZOv9lSeWq --HG-- extra : rebase_source : bb42cbb77b77f0b73e9165c2187bfe9e13a83063
This commit is contained in:
Родитель
7da816954a
Коммит
8995d0bec7
|
@ -57,6 +57,7 @@ enum class OperatingSystem {
|
|||
OSX10_9,
|
||||
OSX10_10,
|
||||
OSX10_11,
|
||||
OSX10_12,
|
||||
Android,
|
||||
Ios
|
||||
};
|
||||
|
|
|
@ -274,6 +274,8 @@ BlacklistOSToOperatingSystem(const nsAString& os)
|
|||
return OperatingSystem::OSX10_10;
|
||||
else if (os.EqualsLiteral("Darwin 15"))
|
||||
return OperatingSystem::OSX10_11;
|
||||
else if (os.EqualsLiteral("Darwin 16"))
|
||||
return OperatingSystem::OSX10_12;
|
||||
else if (os.EqualsLiteral("Android"))
|
||||
return OperatingSystem::Android;
|
||||
// For historical reasons, "All" in blocklist means "All Windows"
|
||||
|
|
|
@ -52,6 +52,8 @@ OSXVersionToOperatingSystem(uint32_t aOSXVersion)
|
|||
return OperatingSystem::OSX10_10;
|
||||
case 11:
|
||||
return OperatingSystem::OSX10_11;
|
||||
case 12:
|
||||
return OperatingSystem::OSX10_12;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
static bool OnMavericksOrLater();
|
||||
static bool OnYosemiteOrLater();
|
||||
static bool OnElCapitanOrLater();
|
||||
static bool OnSierraOrLater();
|
||||
|
||||
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#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
|
||||
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "nsCocoaUtils.h"
|
||||
|
@ -178,6 +179,12 @@ 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::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче