summaryrefslogtreecommitdiffstats
path: root/widget/windows/nsLookAndFeel.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-18 13:56:18 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-18 14:56:31 +0100
commita24398e42d2f300b5979d1fb45a481e2912fd4f3 (patch)
tree82c15ba37726971108f6b92c15a70e9f57950846 /widget/windows/nsLookAndFeel.cpp
parentb55f0e7f0d3c66b609ac8979265c62bd1fa85bb6 (diff)
downloadUXP-a24398e42d2f300b5979d1fb45a481e2912fd4f3.tar
UXP-a24398e42d2f300b5979d1fb45a481e2912fd4f3.tar.gz
UXP-a24398e42d2f300b5979d1fb45a481e2912fd4f3.tar.lz
UXP-a24398e42d2f300b5979d1fb45a481e2912fd4f3.tar.xz
UXP-a24398e42d2f300b5979d1fb45a481e2912fd4f3.zip
Remove unnecessary code in /widget.
- Remove numerous blocklist entries that no longer apply. - Remove CanComputeVirtualKeyCodeFromScanCode(), because it's always true. - Remove ShowXP{Folder,File}Picker(), since we have native pickers on supported Windows versions. - Remove the config.trim_on_minimize preference, which is pointless on NT6+ and will just cause problems if used. Tag #22.
Diffstat (limited to 'widget/windows/nsLookAndFeel.cpp')
-rw-r--r--widget/windows/nsLookAndFeel.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp
index e649802b1..06eee3771 100644
--- a/widget/windows/nsLookAndFeel.cpp
+++ b/widget/windows/nsLookAndFeel.cpp
@@ -32,12 +32,8 @@ nsLookAndFeel::GetOperatingSystemVersion()
version = eOperatingSystemVersion_Windows10;
} else if (IsWin8OrLater()) {
version = eOperatingSystemVersion_Windows8;
- } else if (IsWin7OrLater()) {
- version = eOperatingSystemVersion_Windows7;
- } else if (IsVistaOrLater()) {
- version = eOperatingSystemVersion_WindowsVista;
} else {
- version = eOperatingSystemVersion_WindowsXP;
+ version = eOperatingSystemVersion_Windows7;
}
return version;
@@ -183,8 +179,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
idx = COLOR_HIGHLIGHT;
break;
case eColorID__moz_menubarhovertext:
- if (!IsVistaOrLater() || !IsAppThemed())
- {
+ if (!IsAppThemed()) {
idx = nsUXThemeData::sFlatMenus ?
COLOR_HIGHLIGHTTEXT :
COLOR_MENUTEXT;
@@ -192,8 +187,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
}
// Fall through
case eColorID__moz_menuhovertext:
- if (IsVistaOrLater() && IsAppThemed())
- {
+ if (IsAppThemed()) {
res = ::GetColorFromTheme(eUXMenu,
MENU_POPUPITEM, MPI_HOT, TMT_TEXTCOLOR, aColor);
if (NS_SUCCEEDED(res))
@@ -285,7 +279,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
aColor = NS_RGB(0, 0, 0);
return NS_OK;
case eColorID__moz_win_mediatext:
- if (IsVistaOrLater() && IsAppThemed()) {
+ if (IsAppThemed()) {
res = ::GetColorFromTheme(eUXMediaToolbar,
TP_BUTTON, TS_NORMAL, TMT_TEXTCOLOR, aColor);
if (NS_SUCCEEDED(res))
@@ -295,8 +289,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
idx = COLOR_WINDOWTEXT;
break;
case eColorID__moz_win_communicationstext:
- if (IsVistaOrLater() && IsAppThemed())
- {
+ if (IsAppThemed()) {
res = ::GetColorFromTheme(eUXCommunicationsToolbar,
TP_BUTTON, TS_NORMAL, TMT_TEXTCOLOR, aColor);
if (NS_SUCCEEDED(res))