summaryrefslogtreecommitdiffstats
path: root/widget/windows
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-26 17:58:48 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-26 17:58:48 +0200
commit6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d (patch)
tree039fa3b2e9a9bf5ce3f601b4007dfffe332a4f66 /widget/windows
parentd2498873e95da2f6624841144dfb015fa5f898d0 (diff)
downloadUXP-6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d.tar
UXP-6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d.tar.gz
UXP-6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d.tar.lz
UXP-6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d.tar.xz
UXP-6e4c8dd34bd905b24f7e0e6a4ef868eeaf61134d.zip
Bypass transparency optimization with HC themes.
Don't use transparency optimization for theme items in Windows 8 or later with a high contrast theme in use. See MoonchildProductions/Pale-Moon#1591
Diffstat (limited to 'widget/windows')
-rw-r--r--widget/windows/nsNativeThemeWin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp
index 8950dcf90..475ebce94 100644
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -1360,7 +1360,10 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType,
static bool
AssumeThemePartAndStateAreTransparent(int32_t aPart, int32_t aState)
{
- if (aPart == MENU_POPUPITEM && aState == MBI_NORMAL) {
+ // When using a high contrast theme on Windows 8 or later, we can't
+ // use this optimization.
+ if (!(IsWin8OrLater() && nsUXThemeData::IsHighContrastOn()) &&
+ aPart == MENU_POPUPITEM && aState == MBI_NORMAL) {
return true;
}
return false;