summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2020-12-01 15:46:38 -0600
committerBrian Smith <brian@dbsoft.org>2020-12-01 15:46:38 -0600
commite43b01e58b5477b06736dcaa36979cd0e2fc33f0 (patch)
tree09233b5eac9fd6ab3c3e59ed8317be21c4329719
parentb1ac886a988cab94463c265fccb48229d5e1700e (diff)
downloaduxp-e43b01e58b5477b06736dcaa36979cd0e2fc33f0.tar.gz
Issue #1690 - Part 2: Update MacOS Blocklist support from 10.13 to 11.0.
Changes based on Mozilla bug 1678061.
-rw-r--r--widget/GfxDriverInfo.h5
-rw-r--r--widget/GfxInfoBase.cpp8
-rw-r--r--widget/cocoa/GfxInfo.mm61
3 files changed, 54 insertions, 20 deletions
diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h
index 256142c87d..17baf136d7 100644
--- a/widget/GfxDriverInfo.h
+++ b/widget/GfxDriverInfo.h
@@ -58,6 +58,11 @@ enum class OperatingSystem {
OSX10_10,
OSX10_11,
OSX10_12,
+ OSX10_13,
+ OSX10_14,
+ OSX10_15,
+ OSX10_16,
+ OSX11_0,
Ios
};
diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp
index 4c2d83018a..ed47355367 100644
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -274,6 +274,14 @@ 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("Darwin 18"))
+ return OperatingSystem::OSX10_14;
+ else if (os.EqualsLiteral("Darwin 19"))
+ return OperatingSystem::OSX10_15;
+ else if (os.EqualsLiteral("Darwin 20"))
+ return OperatingSystem::OSX11_0;
// For historical reasons, "All" in blocklist means "All Windows"
else if (os.EqualsLiteral("All"))
return OperatingSystem::Windows;
diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm
index 85c4692868..97bb4c8324 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;
}