diff --git a/dom/canvas/test/test_bug232227.html b/dom/canvas/test/test_bug232227.html
index eee5b1be8d76..c9e4834c2064 100644
--- a/dom/canvas/test/test_bug232227.html
+++ b/dom/canvas/test/test_bug232227.html
@@ -46,7 +46,6 @@ function runTest(testCanvasColors) {
[ "-moz-ComboboxText", 0x00, 0x00, 0x00 ],
[ "-moz-Dialog", 0xF0, 0xF0, 0xF0 ],
[ "-moz-DialogText", 0x00, 0x00, 0x00 ],
- [ "-moz-EvenTreeRow", 0xFF, 0xFF, 0xFF ],
[ "-moz-Field", 0xFF, 0xFF, 0xFF ],
[ "-moz-FieldText", 0x00, 0x00, 0x00 ],
[ "-moz-MenuHover", 0x33, 0x99, 0xFF ],
diff --git a/servo/components/style/values/specified/color.rs b/servo/components/style/values/specified/color.rs
index 572fdfc0893f..bd5e0f9e80c3 100644
--- a/servo/components/style/values/specified/color.rs
+++ b/servo/components/style/values/specified/color.rs
@@ -270,9 +270,8 @@ pub enum SystemColor {
/// Used for menubar item text when hovered.
MozMenubarhovertext,
- /// On platforms where these colors are the same as -moz-field, use
- /// -moz-fieldtext as foreground color
- MozEventreerow,
+ /// On platforms where this color is the same as field, or transparent, use fieldtext as
+ /// foreground color.
MozOddtreerow,
/// Used for button text when pressed.
diff --git a/widget/android/nsLookAndFeel.cpp b/widget/android/nsLookAndFeel.cpp
index 449362a254d3..3e00859439cc 100644
--- a/widget/android/nsLookAndFeel.cpp
+++ b/widget/android/nsLookAndFeel.cpp
@@ -223,7 +223,6 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aColorScheme,
case ColorID::Field:
case ColorID::Threedhighlight:
case ColorID::MozCombobox:
- case ColorID::MozEventreerow:
aColor = NS_RGB(0xff, 0xff, 0xff);
break;
diff --git a/widget/cocoa/nsLookAndFeel.mm b/widget/cocoa/nsLookAndFeel.mm
index 601debaee08e..ac0c51090b89 100644
--- a/widget/cocoa/nsLookAndFeel.mm
+++ b/widget/cocoa/nsLookAndFeel.mm
@@ -326,7 +326,6 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aScheme,
break;
case ColorID::MozColheader:
case ColorID::MozColheaderhover:
- case ColorID::MozEventreerow:
// Background color of even list rows.
aColor =
GetColorFromNSColor(NSColor.controlAlternatingRowBackgroundColors[0]);
diff --git a/widget/gtk/WidgetStyleCache.cpp b/widget/gtk/WidgetStyleCache.cpp
index 43aab30a3866..d9d3afe3a43b 100644
--- a/widget/gtk/WidgetStyleCache.cpp
+++ b/widget/gtk/WidgetStyleCache.cpp
@@ -779,10 +779,6 @@ static GtkStyleContext* GetCssNodeStyleInternal(WidgetNodeType aNodeType) {
case MOZ_GTK_FRAME_BORDER:
style = CreateChildCSSNode("border", MOZ_GTK_FRAME);
break;
- case MOZ_GTK_TREEVIEW_VIEW:
- // TODO - create from CSS node
- style = CreateSubStyleWithClass(MOZ_GTK_TREEVIEW, GTK_STYLE_CLASS_VIEW);
- break;
case MOZ_GTK_SPLITTER_SEPARATOR_HORIZONTAL:
style = CreateChildCSSNode("separator", MOZ_GTK_SPLITTER_HORIZONTAL);
break;
@@ -870,9 +866,6 @@ static GtkStyleContext* GetWidgetStyleInternal(WidgetNodeType aNodeType) {
break;
case MOZ_GTK_FRAME_BORDER:
return GetWidgetRootStyle(MOZ_GTK_FRAME);
- case MOZ_GTK_TREEVIEW_VIEW:
- style = CreateSubStyleWithClass(MOZ_GTK_TREEVIEW, GTK_STYLE_CLASS_VIEW);
- break;
case MOZ_GTK_SPLITTER_SEPARATOR_HORIZONTAL:
style = CreateSubStyleWithClass(MOZ_GTK_SPLITTER_HORIZONTAL,
GTK_STYLE_CLASS_PANE_SEPARATOR);
diff --git a/widget/gtk/gtk3drawing.cpp b/widget/gtk/gtk3drawing.cpp
index 1ecd60333158..9570b7993490 100644
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -344,38 +344,6 @@ static gint moz_gtk_vpaned_paint(cairo_t* cr, GdkRectangle* rect,
return MOZ_GTK_SUCCESS;
}
-static gint moz_gtk_treeview_paint(cairo_t* cr, GdkRectangle* rect,
- GtkWidgetState* state,
- GtkTextDirection direction) {
- gint xthickness, ythickness;
- GtkStyleContext* style;
- GtkStyleContext* style_tree;
- GtkStateFlags state_flags;
- GtkBorder border;
-
- /* only handle disabled and normal states, otherwise the whole background
- * area will be painted differently with other states */
- state_flags =
- state->disabled ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL;
-
- style =
- GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, state->image_scale, direction);
- gtk_style_context_get_border(style, state_flags, &border);
- xthickness = border.left;
- ythickness = border.top;
-
- style_tree =
- GetStyleContext(MOZ_GTK_TREEVIEW_VIEW, state->image_scale, direction);
- gtk_render_background(style_tree, cr, rect->x + xthickness,
- rect->y + ythickness, rect->width - 2 * xthickness,
- rect->height - 2 * ythickness);
-
- style =
- GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, state->image_scale, direction);
- gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
- return MOZ_GTK_SUCCESS;
-}
-
static gint moz_gtk_resizer_paint(cairo_t* cr, GdkRectangle* rect,
GtkWidgetState* state,
GtkTextDirection direction) {
@@ -644,16 +612,10 @@ gint moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
// NOTE: callers depend on direction being used
// only for MOZ_GTK_DROPDOWN widgets.
GtkTextDirection direction) {
- GtkWidget* w;
- GtkStyleContext* style;
+ GtkWidget* w = nullptr;
*left = *top = *right = *bottom = 0;
switch (widget) {
- case MOZ_GTK_TREEVIEW: {
- style = GetStyleContext(MOZ_GTK_SCROLLED_WINDOW);
- moz_gtk_add_style_border(style, left, top, right, bottom);
- return MOZ_GTK_SUCCESS;
- }
case MOZ_GTK_TABPANELS:
w = GetWidget(MOZ_GTK_TABPANELS);
break;
@@ -748,8 +710,6 @@ gint moz_gtk_widget_paint(WidgetNodeType widget, cairo_t* cr,
cairo_new_path(cr);
switch (widget) {
- case MOZ_GTK_TREEVIEW:
- return moz_gtk_treeview_paint(cr, rect, state, direction);
case MOZ_GTK_FRAME:
return moz_gtk_frame_paint(cr, rect, state, direction);
case MOZ_GTK_RESIZER:
diff --git a/widget/gtk/gtkdrawing.h b/widget/gtk/gtkdrawing.h
index a111f7b06996..7132100587c1 100644
--- a/widget/gtk/gtkdrawing.h
+++ b/widget/gtk/gtkdrawing.h
@@ -152,8 +152,6 @@ enum WidgetNodeType : int {
MOZ_GTK_TABPANELS,
/* Paints the expander and border of a GtkTreeView */
MOZ_GTK_TREEVIEW,
- /* Paints the border of a GtkTreeView */
- MOZ_GTK_TREEVIEW_VIEW,
/* Paints treeheader cells */
MOZ_GTK_TREE_HEADER_CELL,
/* Paints the background of menus, context menus. */
diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp
index c39f631ba57f..03c7017cafbf 100644
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -880,7 +880,6 @@ nsresult nsLookAndFeel::PerThemeData::GetColor(ColorID aID,
aColor = mIsDark ? *GenericDarkColor(aID) : NS_RGB(0xDC, 0xDC, 0xDC);
break;
- case ColorID::MozEventreerow:
case ColorID::Field:
aColor = mField.mBg;
break;
@@ -914,12 +913,10 @@ nsresult nsLookAndFeel::PerThemeData::GetColor(ColorID aID,
case ColorID::MozMenuhovertext:
aColor = mMenuHover.mFg;
break;
+ case ColorID::MozOddtreerow:
case ColorID::MozMenuhoverdisabled:
aColor = NS_TRANSPARENT;
break;
- case ColorID::MozOddtreerow:
- aColor = mOddCellBackground;
- break;
case ColorID::Linktext:
aColor = mNativeHyperLinkText;
break;
@@ -2367,21 +2364,6 @@ void nsLookAndFeel::PerThemeData::Init() {
mButtonActive.mBg = mWindow.mBg;
}
- // GTK's guide to fancy odd row background colors:
- // 1) Check if a theme explicitly defines an odd row color
- // 2) If not, check if it defines an even row color, and darken it
- // slightly by a hardcoded value (gtkstyle.c)
- // 3) If neither are defined, take the base background color and
- // darken that by a hardcoded value
- style = GetStyleContext(MOZ_GTK_TREEVIEW);
-
- // Get odd row background color
- gtk_style_context_save(style);
- gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD);
- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
- mOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
- gtk_style_context_restore(style);
-
// Column header colors
style = GetStyleContext(MOZ_GTK_TREE_HEADER_CELL);
mMozColHeader = GetColorPair(style, GTK_STATE_FLAG_NORMAL);
diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h
index b770832dd441..57f24835065c 100644
--- a/widget/gtk/nsLookAndFeel.h
+++ b/widget/gtk/nsLookAndFeel.h
@@ -137,7 +137,6 @@ class nsLookAndFeel final : public nsXPLookAndFeel {
nscolor mButtonBorder = kBlack;
nscolor mThreeDHighlight = kBlack;
nscolor mThreeDShadow = kBlack;
- nscolor mOddCellBackground = kWhite;
nscolor mNativeHyperLinkText = kBlack;
nscolor mNativeVisitedHyperLinkText = kBlack;
ColorPair mField;
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
index 5641829f1e57..281370d4b00c 100644
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -199,9 +199,6 @@ bool nsNativeThemeGTK::GetGtkWidgetAndState(StyleAppearance aAppearance,
}
switch (aAppearance) {
- case StyleAppearance::Listbox:
- aGtkWidgetType = MOZ_GTK_TREEVIEW;
- break;
case StyleAppearance::Tabpanels:
aGtkWidgetType = MOZ_GTK_TABPANELS;
break;
@@ -761,6 +758,7 @@ bool nsNativeThemeGTK::IsWidgetAlwaysNonNative(nsIFrame* aFrame,
aAppearance == StyleAppearance::Radio ||
aAppearance == StyleAppearance::Button ||
aAppearance == StyleAppearance::Toolbarbutton ||
+ aAppearance == StyleAppearance::Listbox ||
aAppearance == StyleAppearance::Menulist ||
aAppearance == StyleAppearance::ProgressBar ||
aAppearance == StyleAppearance::Progresschunk ||
@@ -824,7 +822,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
}
switch (aAppearance) {
- case StyleAppearance::Listbox:
case StyleAppearance::Tab:
// case StyleAppearance::Tabpanel:
case StyleAppearance::Tabpanels:
diff --git a/widget/nsXPLookAndFeel.cpp b/widget/nsXPLookAndFeel.cpp
index 7ed9d7d4a068..97903fb2f61f 100644
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -239,7 +239,6 @@ static const char sColorPrefs[][41] = {
"ui.-moz_menuhoverdisabled",
"ui.-moz_menuhovertext",
"ui.-moz_menubarhovertext",
- "ui.-moz_eventreerow",
"ui.-moz_oddtreerow",
"ui.-moz-buttonactivetext",
"ui.-moz-buttonactiveface",
@@ -703,7 +702,6 @@ nscolor nsXPLookAndFeel::GetStandinForNativeColor(ColorID aID,
COLOR(MozMenuhovertext, 0x00, 0x00, 0x00)
COLOR(MozMenubarhovertext, 0x00, 0x00, 0x00)
COLOR(MozMenuhoverdisabled, 0xF0, 0xF0, 0xF0)
- COLOR(MozEventreerow, 0xFF, 0xFF, 0xFF)
COLOR(MozOddtreerow, 0xFF, 0xFF, 0xFF)
COLOR(MozMacFocusring, 0x60, 0x9D, 0xD7)
COLOR(MozMacDisabledtoolbartext, 0x3F, 0x3F, 0x3F)
@@ -754,7 +752,6 @@ Maybe nsXPLookAndFeel::GenericDarkColor(ColorID aID) {
color = NS_RGB(0x3a, 0x39, 0x44);
break;
- case ColorID::MozEventreerow:
case ColorID::MozOddtreerow:
case ColorID::MozDialog: // --background-color-box
color = NS_RGB(35, 34, 43);
diff --git a/widget/tests/test_platform_colors.xhtml b/widget/tests/test_platform_colors.xhtml
index 8f9860d85bae..dcd2b5532b88 100644
--- a/widget/tests/test_platform_colors.xhtml
+++ b/widget/tests/test_platform_colors.xhtml
@@ -55,7 +55,6 @@ var colors = {
"-moz-buttonhovertext": ["rgb(0, 0, 0)"],
"-moz-cellhighlight": ["rgb(212, 212, 212)", "rgb(220, 220, 220)"],
"-moz-cellhighlighttext": ["rgb(0, 0, 0)"],
- "-moz-eventreerow": ["rgb(255, 255, 255)"],
"-moz-field": ["rgb(255, 255, 255)"],
"-moz-fieldtext": ["rgb(0, 0, 0)"],
"-moz-dialog": ["rgb(232, 232, 232)"],
diff --git a/widget/uikit/nsLookAndFeel.mm b/widget/uikit/nsLookAndFeel.mm
index a67be363a820..22a5c1ab905e 100644
--- a/widget/uikit/nsLookAndFeel.mm
+++ b/widget/uikit/nsLookAndFeel.mm
@@ -186,10 +186,6 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aColorScheme,
// For inactive list selection
aResult = NS_RGB(0xaa, 0xaa, 0xaa);
break;
- case ColorID::MozEventreerow:
- // Background color of even list rows.
- aResult = NS_RGB(0xff, 0xff, 0xff);
- break;
case ColorID::MozOddtreerow:
// Background color of odd list rows.
aResult = NS_TRANSPARENT;
diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp
index 5f5cbe90e881..718725eccf60 100644
--- a/widget/windows/nsLookAndFeel.cpp
+++ b/widget/windows/nsLookAndFeel.cpp
@@ -402,7 +402,6 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aScheme,
case ColorID::Fieldtext:
idx = mHighContrastOn ? COLOR_BTNTEXT : COLOR_WINDOWTEXT;
break;
- case ColorID::MozEventreerow:
case ColorID::MozOddtreerow:
case ColorID::MozSidebar:
case ColorID::MozCombobox: