Backed out changeset 423f4e43a975 (bug 1417751) for xpcshell failures at devtools/shared/tests/unit/test_css-properties-db.js r=backout on a CLOSED TREE

This commit is contained in:
Cosmin Sabou 2017-11-28 13:50:59 +02:00
parent 758db182f3
commit 7d7b59dd0b
10 changed files with 2 additions and 116 deletions

View File

@ -135,9 +135,6 @@ enum ThemeWidgetType : uint8_t {
// A tooltip
NS_THEME_TOOLTIP,
// A inner-spin control
NS_THEME_INNER_SPIN_BUTTON,
// A spin control (up/down control for time/date pickers)
NS_THEME_SPINNER,

View File

@ -683,7 +683,6 @@ CSS_KEY(tabpanel, tabpanel)
CSS_KEY(tab-scroll-arrow-back, tab_scroll_arrow_back)
CSS_KEY(tab-scroll-arrow-forward, tab_scroll_arrow_forward)
CSS_KEY(tooltip, tooltip)
CSS_KEY(inner-spin-button, inner_spin_button)
CSS_KEY(spinner, spinner)
CSS_KEY(spinner-upbutton, spinner_upbutton)
CSS_KEY(spinner-downbutton, spinner_downbutton)

View File

@ -786,7 +786,6 @@ const KTableEntry nsCSSProps::kAppearanceKTable[] = {
{ eCSSKeyword_tab_scroll_arrow_back, NS_THEME_TAB_SCROLL_ARROW_BACK },
{ eCSSKeyword_tab_scroll_arrow_forward, NS_THEME_TAB_SCROLL_ARROW_FORWARD },
{ eCSSKeyword_tooltip, NS_THEME_TOOLTIP },
{ eCSSKeyword_inner_spin_button, NS_THEME_INNER_SPIN_BUTTON },
{ eCSSKeyword_spinner, NS_THEME_SPINNER },
{ eCSSKeyword_spinner_upbutton, NS_THEME_SPINNER_UPBUTTON },
{ eCSSKeyword_spinner_downbutton, NS_THEME_SPINNER_DOWNBUTTON },

View File

@ -2551,11 +2551,9 @@ nsNativeThemeCocoa::DrawWidgetBackground(gfxContext* aContext,
eventState, aFrame);
break;
case NS_THEME_INNER_SPIN_BUTTON: {
case NS_THEME_SPINNER:
bool isSpinner = (aWidgetType == NS_THEME_SPINNER);
case NS_THEME_SPINNER: {
nsIContent* content = aFrame->GetContent();
if (isSpinner && content->IsHTMLElement()) {
if (content->IsHTMLElement()) {
// In HTML the theming for the spin buttons is drawn individually into
// their own backgrounds instead of being drawn into the background of
// their spinner parent as it is for XUL.
@ -3447,7 +3445,6 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext,
break;
}
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
@ -3832,7 +3829,6 @@ nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* a
case NS_THEME_BUTTON_ARROW_DOWN:
case NS_THEME_BUTTON_BEVEL:
case NS_THEME_TOOLBARBUTTON:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
@ -3973,7 +3969,6 @@ nsNativeThemeCocoa::WidgetAppearanceDependsOnWindowFocus(uint8_t aWidgetType)
case NS_THEME_MENUITEM:
case NS_THEME_MENUSEPARATOR:
case NS_THEME_TOOLTIP:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:

View File

@ -1365,51 +1365,6 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget,
return MOZ_GTK_SUCCESS;
}
static gint
moz_gtk_inner_spin_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkWidgetState* state,
GtkTextDirection direction)
{
GdkRectangle arrow_rect;
GtkStateType state_type = ConvertGtkState(state);
GtkShadowType shadow_type = state_type == GTK_STATE_ACTIVE ?
GTK_SHADOW_IN : GTK_SHADOW_OUT;
GtkStyle* style;
ensure_spin_widget();
style = gSpinWidget->style;
gtk_widget_set_direction(gSpinWidget, direction);
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box(style, drawable, state_type, shadow_type, NULL, gSpinWidget,
"spinbutton", rect->x, rect->y, rect->width, rect->height);
/* hard code these values */
arrow_rect.width = 6;
arrow_rect.height = 6;
// align spin to the left
arrow_rect.x = rect->x;
// up button
arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 - 3;
gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL,
gSpinWidget, "spinbutton",
GTK_ARROW_UP, TRUE,
arrow_rect.x, arrow_rect.y,
arrow_rect.width, arrow_rect.height);
// down button
arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 + 3;
gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL,
gSpinWidget, "spinbutton",
GTK_ARROW_DOWN,
arrow_rect.x, arrow_rect.y,
arrow_rect.width, arrow_rect.height);
return MOZ_GTK_SUCCESS;
}
static gint
moz_gtk_spin_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkTextDirection direction)
@ -3029,7 +2984,6 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
case MOZ_GTK_TOOLBAR_SEPARATOR:
case MOZ_GTK_MENUSEPARATOR:
/* These widgets have no borders.*/
case MOZ_GTK_INNER_SPIN_BUTTON:
case MOZ_GTK_SPINBUTTON:
case MOZ_GTK_WINDOW:
case MOZ_GTK_RESIZER:
@ -3293,9 +3247,6 @@ moz_gtk_widget_paint(WidgetNodeType widget, GdkDrawable* drawable,
return moz_gtk_scale_thumb_paint(drawable, rect, cliprect, state,
(GtkOrientation) flags, direction);
break;
case MOZ_GTK_INNER_SPIN_BUTTON:
return moz_gtk_inner_spin_paint(drawable, rect, state, direction);
break;
case MOZ_GTK_SPINBUTTON:
return moz_gtk_spin_paint(drawable, rect, direction);
break;

View File

@ -797,40 +797,6 @@ moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget,
return MOZ_GTK_SUCCESS;
}
static gint
moz_gtk_inner_spin_paint(cairo_t *cr, GdkRectangle* rect,
GtkWidgetState* state,
GtkTextDirection direction)
{
GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, direction,
GetStateFlagsFromGtkWidgetState(state));
gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
/* hard code these values */
GdkRectangle arrow_rect;
arrow_rect.width = 6;
arrow_rect.height = 6;
// align spin to the left
arrow_rect.x = rect->x;
// up button
arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 - 3;
gtk_render_arrow(style, cr, ARROW_UP,
arrow_rect.x, arrow_rect.y,
arrow_rect.width);
// down button
arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2 + 3;
gtk_render_arrow(style, cr, ARROW_DOWN,
arrow_rect.x, arrow_rect.y,
arrow_rect.width);
return MOZ_GTK_SUCCESS;
}
static gint
moz_gtk_spin_paint(cairo_t *cr, GdkRectangle* rect,
GtkTextDirection direction)
@ -2317,7 +2283,6 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
case MOZ_GTK_TOOLBAR_SEPARATOR:
case MOZ_GTK_MENUSEPARATOR:
/* These widgets have no borders.*/
case MOZ_GTK_INNER_SPIN_BUTTON:
case MOZ_GTK_SPINBUTTON:
case MOZ_GTK_WINDOW:
case MOZ_GTK_RESIZER:
@ -2880,9 +2845,6 @@ moz_gtk_widget_paint(WidgetNodeType widget, cairo_t *cr,
return moz_gtk_scale_thumb_paint(cr, rect, state,
(GtkOrientation) flags, direction);
break;
case MOZ_GTK_INNER_SPIN_BUTTON:
return moz_gtk_inner_spin_paint(cr, rect, state, direction);
break;
case MOZ_GTK_SPINBUTTON:
return moz_gtk_spin_paint(cr, rect, direction);
break;

View File

@ -175,7 +175,6 @@ typedef enum {
MOZ_GTK_SCALE_THUMB_HORIZONTAL,
MOZ_GTK_SCALE_THUMB_VERTICAL,
/* Paints a GtkSpinButton */
MOZ_GTK_INNER_SPIN_BUTTON,
MOZ_GTK_SPINBUTTON,
MOZ_GTK_SPINBUTTON_UP,
MOZ_GTK_SPINBUTTON_DOWN,

View File

@ -439,9 +439,6 @@ nsNativeThemeGTK::GetGtkWidgetAndState(uint8_t aWidgetType, nsIFrame* aFrame,
case NS_THEME_SCROLLBARTHUMB_HORIZONTAL:
aGtkWidgetType = MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL;
break;
case NS_THEME_INNER_SPIN_BUTTON:
aGtkWidgetType = MOZ_GTK_INNER_SPIN_BUTTON;
break;
case NS_THEME_SPINNER:
aGtkWidgetType = MOZ_GTK_SPINBUTTON;
break;
@ -1660,7 +1657,6 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
aResult->width = separator_width;
}
break;
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
// hard code these sizes
aResult->width = 14;
@ -1848,7 +1844,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
case NS_THEME_TAB_SCROLL_ARROW_BACK:
case NS_THEME_TAB_SCROLL_ARROW_FORWARD:
case NS_THEME_TOOLTIP:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:

View File

@ -223,7 +223,6 @@ HeadlessThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
aResult->height = 16;
*aIsOverridable = false;
break;
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
aResult->width = 14;
aResult->height = 26;
@ -359,7 +358,6 @@ HeadlessThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
case NS_THEME_TAB_SCROLL_ARROW_BACK:
case NS_THEME_TAB_SCROLL_ARROW_FORWARD:
case NS_THEME_TOOLTIP:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:

View File

@ -682,7 +682,6 @@ nsresult nsNativeThemeWin::GetCachedMinimumWidgetSize(nsIFrame * aFrame, HANDLE
aResult->height = sz.cy;
switch (aWidgetType) {
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
aResult->width++;
@ -767,7 +766,6 @@ mozilla::Maybe<nsUXThemeClass> nsNativeThemeWin::GetThemeClass(uint8_t aWidgetTy
case NS_THEME_SCALETHUMB_HORIZONTAL:
case NS_THEME_SCALETHUMB_VERTICAL:
return Some(eUXTrackbar);
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
return Some(eUXSpin);
@ -1145,7 +1143,6 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType,
}
return NS_OK;
}
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON: {
aPart = (aWidgetType == NS_THEME_SPINNER_UPBUTTON) ?
@ -2721,7 +2718,6 @@ nsNativeThemeWin::ClassicThemeSupportsWidget(nsIFrame* aFrame,
case NS_THEME_SCALETHUMB_HORIZONTAL:
case NS_THEME_SCALETHUMB_VERTICAL:
case NS_THEME_MENULIST_BUTTON:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
case NS_THEME_LISTBOX:
@ -2877,7 +2873,6 @@ nsNativeThemeWin::ClassicGetMinimumWidgetSize(nsIFrame* aFrame,
(*aResult).width = ::GetSystemMetrics(SM_CXMENUCHECK);
(*aResult).height = ::GetSystemMetrics(SM_CYMENUCHECK);
break;
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
(*aResult).width = ::GetSystemMetrics(SM_CXVSCROLL);
@ -3279,7 +3274,6 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, uint8_t
return NS_OK;
}
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON: {
EventStates contentState = GetContentState(aFrame, aWidgetType);
@ -3289,7 +3283,6 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, uint8_t
case NS_THEME_SPINNER_UPBUTTON:
aState = DFCS_SCROLLUP;
break;
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
aState = DFCS_SCROLLDOWN;
break;
@ -3590,7 +3583,6 @@ RENDER_AGAIN:
case NS_THEME_SCROLLBARBUTTON_DOWN:
case NS_THEME_SCROLLBARBUTTON_LEFT:
case NS_THEME_SCROLLBARBUTTON_RIGHT:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
case NS_THEME_MENULIST_BUTTON:
@ -3995,7 +3987,6 @@ nsNativeThemeWin::GetWidgetNativeDrawingFlags(uint8_t aWidgetType)
case NS_THEME_SCALE_VERTICAL:
case NS_THEME_SCALETHUMB_HORIZONTAL:
case NS_THEME_SCALETHUMB_VERTICAL:
case NS_THEME_INNER_SPIN_BUTTON:
case NS_THEME_SPINNER_UPBUTTON:
case NS_THEME_SPINNER_DOWNBUTTON:
case NS_THEME_LISTBOX: