summaryrefslogtreecommitdiffstats
path: root/widget/cocoa
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2020-12-01 15:46:38 -0600
committerMoonchild <moonchild@palemoon.org>2020-12-02 07:21:03 +0000
commitaed41dc542e6689120d9d1d1196de189ad704d09 (patch)
tree47efba3fe1b70f36ae70e86f2f8f62d7ec5b8e84 /widget/cocoa
parenta7a521e378c0528c1c36456c30069d34e204965f (diff)
downloadUXP-aed41dc542e6689120d9d1d1196de189ad704d09.tar
UXP-aed41dc542e6689120d9d1d1196de189ad704d09.tar.gz
UXP-aed41dc542e6689120d9d1d1196de189ad704d09.tar.lz
UXP-aed41dc542e6689120d9d1d1196de189ad704d09.tar.xz
UXP-aed41dc542e6689120d9d1d1196de189ad704d09.zip
Issue #1690 - Part 2: Update MacOS Blocklist support from 10.13 to 11.0.
Changes based on Mozilla bug 1678061.
Diffstat (limited to 'widget/cocoa')
-rw-r--r--widget/cocoa/GfxInfo.mm61
1 files changed, 41 insertions, 20 deletions
diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm
index 85c469286..97bb4c832 100644
--- a/widget/cocoa/GfxInfo.mm
+++ b/widget/cocoa/GfxInfo.mm
@@ -30,25 +30,46 @@ GfxInfo::GfxInfo()
}
static OperatingSystem
-OSXVersionToOperatingSystem(uint32_t aOSXVersion)
-{
- if (nsCocoaFeatures::ExtractMajorVersion(aOSXVersion) == 10) {
- switch (nsCocoaFeatures::ExtractMinorVersion(aOSXVersion)) {
- case 6:
- return OperatingSystem::OSX10_6;
- case 7:
- return OperatingSystem::OSX10_7;
- case 8:
- return OperatingSystem::OSX10_8;
- case 9:
- return OperatingSystem::OSX10_9;
- case 10:
- return OperatingSystem::OSX10_10;
- case 11:
- return OperatingSystem::OSX10_11;
- case 12:
- return OperatingSystem::OSX10_12;
- }
+OSXVersionToOperatingSystem(uint32_t aOSXVersion) {
+ switch (nsCocoaFeatures::ExtractMajorVersion(aOSXVersion)) {
+ case 10:
+ switch (nsCocoaFeatures::ExtractMinorVersion(aOSXVersion)) {
+ case 6:
+ return OperatingSystem::OSX10_6;
+ case 7:
+ return OperatingSystem::OSX10_7;
+ case 8:
+ return OperatingSystem::OSX10_8;
+ case 9:
+ return OperatingSystem::OSX10_9;
+ case 10:
+ return OperatingSystem::OSX10_10;
+ case 11:
+ return OperatingSystem::OSX10_11;
+ case 12:
+ return OperatingSystem::OSX10_12;
+ case 13:
+ return OperatingSystem::OSX10_13;
+ case 14:
+ return OperatingSystem::OSX10_14;
+ case 15:
+ return OperatingSystem::OSX10_15;
+ case 16:
+ // Depending on the SDK version, we either get 10.16 or 11.0.
+ // Normalize this to 11.0.
+ return OperatingSystem::OSX11_0;
+ default:
+ break;
+ }
+ break;
+ case 11:
+ switch (nsCocoaFeatures::ExtractMinorVersion(aOSXVersion)) {
+ case 0:
+ return OperatingSystem::OSX11_0;
+ default:
+ break;
+ }
+ break;
}
return OperatingSystem::Unknown;
@@ -107,7 +128,7 @@ GfxInfo::Init()
AddCrashReportAnnotations();
- mOSXVersion = nsCocoaFeatures::OSXVersion();
+ mOSXVersion = nsCocoaFeatures::macOSVersion();
return rv;
}