summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-06-14 11:52:16 +0000
committerMoonchild <moonchild@palemoon.org>2021-06-14 11:52:16 +0000
commita970411caf9b1951708efb4987733c6a4581454b (patch)
treef6d02670ceb4913e878aadfcb7b9ba9e0600c45f
parente8be661944c730cb3b702cd7f7d97e0860eb9132 (diff)
downloaduxp-a970411caf9b1951708efb4987733c6a4581454b.tar.gz
Issue #1782: Remove Luna, Royale and Zune support from the platform.
These are obsolete system themes; the platform will fall back to generic/unknown theme support instead.
-rw-r--r--config/milestone.txt2
-rw-r--r--dom/base/nsGkAtomList.h5
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp15
-rw-r--r--layout/style/nsMediaFeatures.cpp5
-rw-r--r--widget/LookAndFeel.h5
-rw-r--r--widget/windows/nsNativeThemeWin.cpp1
-rw-r--r--widget/windows/nsUXThemeData.cpp66
-rw-r--r--widget/windows/nsUXThemeData.h10
8 files changed, 14 insertions, 95 deletions
diff --git a/config/milestone.txt b/config/milestone.txt
index 40b2e6eecf..1ddb8b2a45 100644
--- a/config/milestone.txt
+++ b/config/milestone.txt
@@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
-4.8.0 \ No newline at end of file
+4.8.1 \ No newline at end of file
diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h
index caf8061bbc..57df1d6d17 100644
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -2257,11 +2257,6 @@ GK_ATOM(physical_home_button, "physical-home-button")
GK_ATOM(windows_classic, "windows-classic")
GK_ATOM(windows_theme_aero, "windows-theme-aero")
GK_ATOM(windows_theme_aero_lite, "windows-theme-aero-lite")
-GK_ATOM(windows_theme_luna_blue, "windows-theme-luna-blue")
-GK_ATOM(windows_theme_luna_olive, "windows-theme-luna-olive")
-GK_ATOM(windows_theme_luna_silver, "windows-theme-luna-silver")
-GK_ATOM(windows_theme_royale, "windows-theme-royale")
-GK_ATOM(windows_theme_zune, "windows-theme-zune")
GK_ATOM(windows_theme_generic, "windows-theme-generic")
// And the same again, as media query keywords.
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 810a8f8f00..6de279ac5c 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1191,21 +1191,6 @@ InitSystemMetrics()
case LookAndFeel::eWindowsTheme_AeroLite:
sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_aero_lite);
break;
- case LookAndFeel::eWindowsTheme_LunaBlue:
- sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_luna_blue);
- break;
- case LookAndFeel::eWindowsTheme_LunaOlive:
- sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_luna_olive);
- break;
- case LookAndFeel::eWindowsTheme_LunaSilver:
- sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_luna_silver);
- break;
- case LookAndFeel::eWindowsTheme_Royale:
- sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_royale);
- break;
- case LookAndFeel::eWindowsTheme_Zune:
- sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_zune);
- break;
case LookAndFeel::eWindowsTheme_Generic:
sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_generic);
break;
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
index 9b5331a4a1..983dee839a 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -62,11 +62,6 @@ struct WindowsThemeName {
const WindowsThemeName themeStrings[] = {
{ LookAndFeel::eWindowsTheme_Aero, L"aero" },
{ LookAndFeel::eWindowsTheme_AeroLite, L"aero-lite" },
- { LookAndFeel::eWindowsTheme_LunaBlue, L"luna-blue" },
- { LookAndFeel::eWindowsTheme_LunaOlive, L"luna-olive" },
- { LookAndFeel::eWindowsTheme_LunaSilver, L"luna-silver" },
- { LookAndFeel::eWindowsTheme_Royale, L"royale" },
- { LookAndFeel::eWindowsTheme_Zune, L"zune" },
{ LookAndFeel::eWindowsTheme_Generic, L"generic" }
};
diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h
index 60ebc2782c..226aa0d61e 100644
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -438,11 +438,6 @@ public:
eWindowsTheme_Generic = 0, // unrecognized theme
eWindowsTheme_Classic,
eWindowsTheme_Aero,
- eWindowsTheme_LunaBlue,
- eWindowsTheme_LunaOlive,
- eWindowsTheme_LunaSilver,
- eWindowsTheme_Royale,
- eWindowsTheme_Zune,
eWindowsTheme_AeroLite
};
diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp
index 0947019caa..40bc3d7c28 100644
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -1101,7 +1101,6 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType,
return NS_OK;
}
case NS_THEME_TREEHEADERSORTARROW: {
- // XXX Probably will never work due to a bug in the Luna theme.
aPart = 4;
aState = 1;
return NS_OK;
diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp
index ce27775851..e13f1234da 100644
--- a/widget/windows/nsUXThemeData.cpp
+++ b/widget/windows/nsUXThemeData.cpp
@@ -240,9 +240,8 @@ nsUXThemeData::UpdateTitlebarInfo(HWND aWnd)
}
// visual style (aero glass, aero basic)
-// theme (aero, luna, zune)
-// theme color (silver, olive, blue)
-// system colors
+// theme (aero, aero-lite)
+// system colors
struct THEMELIST {
LPCWSTR name;
@@ -251,16 +250,7 @@ struct THEMELIST {
const THEMELIST knownThemes[] = {
{ L"aero.msstyles", WINTHEME_AERO },
- { L"aerolite.msstyles", WINTHEME_AERO_LITE },
- { L"luna.msstyles", WINTHEME_LUNA },
- { L"zune.msstyles", WINTHEME_ZUNE },
- { L"royale.msstyles", WINTHEME_ROYALE }
-};
-
-const THEMELIST knownColors[] = {
- { L"normalcolor", WINTHEMECOLOR_NORMAL },
- { L"homestead", WINTHEMECOLOR_HOMESTEAD },
- { L"metallic", WINTHEMECOLOR_METALLIC }
+ { L"aerolite.msstyles", WINTHEME_AERO_LITE }
};
LookAndFeel::WindowsTheme
@@ -347,57 +337,25 @@ nsUXThemeData::UpdateNativeThemeInfo()
if (theme == WINTHEME_UNRECOGNIZED)
return;
- // We're using the default theme if we're using any of Aero, Aero Lite, or
- // luna. However, on Win8, GetCurrentThemeName (see above) returns
+ // We're using the default theme if we're using Aero or Aero Lite
+ // However, on Win8 or later, GetCurrentThemeName (see above) returns
// AeroLite.msstyles for the 4 builtin highcontrast themes as well. Those
// themes "don't count" as default themes, so we specifically check for high
// contrast mode in that situation.
if (!(IsWin8OrLater() && sIsHighContrastOn) &&
- (theme == WINTHEME_AERO || theme == WINTHEME_AERO_LITE || theme == WINTHEME_LUNA)) {
+ (theme == WINTHEME_AERO || theme == WINTHEME_AERO_LITE)) {
sIsDefaultWindowsTheme = true;
}
- if (theme != WINTHEME_LUNA) {
- switch(theme) {
- case WINTHEME_AERO:
- sThemeId = LookAndFeel::eWindowsTheme_Aero;
- return;
- case WINTHEME_AERO_LITE:
- sThemeId = LookAndFeel::eWindowsTheme_AeroLite;
- return;
- case WINTHEME_ZUNE:
- sThemeId = LookAndFeel::eWindowsTheme_Zune;
- return;
- case WINTHEME_ROYALE:
- sThemeId = LookAndFeel::eWindowsTheme_Royale;
- return;
- default:
- NS_WARNING("unhandled theme type.");
- return;
- }
- }
-
- // calculate the luna color scheme
- WindowsThemeColor color = WINTHEMECOLOR_UNRECOGNIZED;
- for (size_t i = 0; i < ArrayLength(knownColors); ++i) {
- if (!lstrcmpiW(themeColor, knownColors[i].name)) {
- color = (WindowsThemeColor)knownColors[i].type;
- break;
- }
- }
-
- switch(color) {
- case WINTHEMECOLOR_NORMAL:
- sThemeId = LookAndFeel::eWindowsTheme_LunaBlue;
- return;
- case WINTHEMECOLOR_HOMESTEAD:
- sThemeId = LookAndFeel::eWindowsTheme_LunaOlive;
+ switch(theme) {
+ case WINTHEME_AERO:
+ sThemeId = LookAndFeel::eWindowsTheme_Aero;
return;
- case WINTHEMECOLOR_METALLIC:
- sThemeId = LookAndFeel::eWindowsTheme_LunaSilver;
+ case WINTHEME_AERO_LITE:
+ sThemeId = LookAndFeel::eWindowsTheme_AeroLite;
return;
default:
- NS_WARNING("unhandled theme color.");
+ NS_WARNING("unhandled theme type.");
return;
}
}
diff --git a/widget/windows/nsUXThemeData.h b/widget/windows/nsUXThemeData.h
index 2688ec6592..84894cd4eb 100644
--- a/widget/windows/nsUXThemeData.h
+++ b/widget/windows/nsUXThemeData.h
@@ -61,17 +61,9 @@ enum WindowsTheme {
WINTHEME_UNRECOGNIZED = 0,
WINTHEME_CLASSIC = 1, // no theme
WINTHEME_AERO = 2,
- WINTHEME_LUNA = 3,
- WINTHEME_ROYALE = 4,
- WINTHEME_ZUNE = 5,
+ // 3, 4 and 5 were used for XP themes
WINTHEME_AERO_LITE = 6
};
-enum WindowsThemeColor {
- WINTHEMECOLOR_UNRECOGNIZED = 0,
- WINTHEMECOLOR_NORMAL = 1,
- WINTHEMECOLOR_HOMESTEAD = 2,
- WINTHEMECOLOR_METALLIC = 3
-};
#define CMDBUTTONIDX_MINIMIZE 0
#define CMDBUTTONIDX_RESTORE 1