diff options
Diffstat (limited to 'widget')
-rw-r--r-- | widget/GfxDriverInfo.h | 5 | ||||
-rw-r--r-- | widget/GfxInfoBase.cpp | 8 | ||||
-rw-r--r-- | widget/cocoa/GfxInfo.mm | 61 |
3 files changed, 54 insertions, 20 deletions
diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h index 256142c87..17baf136d 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 4c2d83018..ed4735536 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 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; } |