Issue #1667 - Part 2: Add MacOS 11.0 Big Sur widget compatibility

This involves refactoring the vibrancy and OpenGL/Pixel rendering changes contained
in the following Mozilla meta bugs: 1496823 and 1491445
Also add Big Sur to the features tests and update popup menu look and feel based
on Mozilla bug 1656301.
This commit is contained in:
Brian Smith 2020-11-16 07:23:44 -06:00 committed by roytam1
commit de885df033
10 changed files with 286 additions and 609 deletions

View file

@ -22,6 +22,8 @@
#define MAC_OS_X_VERSION_10_13_HEX 0x000010D0
#define MAC_OS_X_VERSION_10_14_HEX 0x000010E0
#define MAC_OS_X_VERSION_10_15_HEX 0x000010F0
#define MAC_OS_X_VERSION_10_16_HEX 0x000A1000
#define MAC_OS_X_VERSION_11_0_HEX 0x000B0000
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
@ -188,6 +190,14 @@ nsCocoaFeatures::OnCatalinaOrLater()
return (OSXVersion() >= MAC_OS_X_VERSION_10_15_HEX);
}
/* static */ bool
nsCocoaFeatures::OnBigSurOrLater() {
// Account for the version being 10.16 (which occurs when the
// application is linked with an older SDK) or 11.0 on Big Sur.
return ((OSXVersion() >= MAC_OS_X_VERSION_10_16_HEX) ||
(OSXVersion() >= MAC_OS_X_VERSION_11_0_HEX));
}
/* static */ bool
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
{