Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats
☠☠ backed out by 2f2ec35ccf5f ☠ ☠
authorlochang <lochang@mozilla.com>
Tue, 28 Nov 2017 10:39:50 +0800
changeset 448214 423f4e43a975fa547eb9b5bcb0cd37f2e2e64042
parent 448213 6ce2b2fa5badc1e81fdf4859289b2b38e951777c
child 448215 7a1a46675739ef7b49e7ba78f7e1c2c9d593d0e3
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1417751
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats MozReview-Commit-ID: 3I1LBLbCfmF
gfx/src/nsThemeConstants.h
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
widget/cocoa/nsNativeThemeCocoa.mm
widget/gtk/gtk2drawing.c
widget/gtk/gtk3drawing.cpp
widget/gtk/gtkdrawing.h
widget/gtk/nsNativeThemeGTK.cpp
widget/headless/HeadlessThemeGTK.cpp
widget/windows/nsNativeThemeWin.cpp
--- a/gfx/src/nsThemeConstants.h
+++ b/gfx/src/nsThemeConstants.h
@@ -130,16 +130,19 @@ enum ThemeWidgetType : uint8_t {
 
   // The tabs scroll arrows (left/right)
   NS_THEME_TAB_SCROLL_ARROW_BACK,
   NS_THEME_TAB_SCROLL_ARROW_FORWARD,
 
   // 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,
 
   // The up button of a spin control
   NS_THEME_SPINNER_UPBUTTON,
 
   // The down button of a spin control
   NS_THEME_SPINNER_DOWNBUTTON,
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -678,16 +678,17 @@ CSS_KEY(progressbar-vertical, progressba
 CSS_KEY(progresschunk, progresschunk)
 CSS_KEY(progresschunk-vertical, progresschunk_vertical)
 CSS_KEY(tab, tab)
 CSS_KEY(tabpanels, tabpanels)
 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)
 CSS_KEY(spinner-textfield, spinner_textfield)
 CSS_KEY(scrollbarbutton-up, scrollbarbutton_up)
 CSS_KEY(scrollbarbutton-down, scrollbarbutton_down)
 CSS_KEY(scrollbarbutton-left, scrollbarbutton_left)
 CSS_KEY(scrollbarbutton-right, scrollbarbutton_right)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -781,16 +781,17 @@ const KTableEntry nsCSSProps::kAppearanc
   { eCSSKeyword_progressbar_vertical,   NS_THEME_PROGRESSBAR_VERTICAL },
   { eCSSKeyword_progresschunk_vertical, NS_THEME_PROGRESSCHUNK_VERTICAL },
   { eCSSKeyword_tab,                    NS_THEME_TAB },
   { eCSSKeyword_tabpanels,              NS_THEME_TABPANELS },
   { eCSSKeyword_tabpanel,               NS_THEME_TABPANEL },
   { 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 },
   { eCSSKeyword_spinner_textfield,      NS_THEME_SPINNER_TEXTFIELD },
   { eCSSKeyword_scrollbar,              NS_THEME_SCROLLBAR },
   { eCSSKeyword_scrollbar_small,        NS_THEME_SCROLLBAR_SMALL },
   { eCSSKeyword_scrollbar_horizontal,   NS_THEME_SCROLLBAR_HORIZONTAL },
   { eCSSKeyword_scrollbar_vertical,     NS_THEME_SCROLLBAR_VERTICAL },
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2546,19 +2546,21 @@ nsNativeThemeCocoa::DrawWidgetBackground
       break;
 
     case NS_THEME_BUTTON_BEVEL:
       DrawButton(cgContext, kThemeMediumBevelButton, macRect,
                  IsDefaultButton(aFrame), kThemeButtonOff, kThemeAdornmentNone,
                  eventState, aFrame);
       break;
 
-    case NS_THEME_SPINNER: {
+    case NS_THEME_INNER_SPIN_BUTTON: {
+    case NS_THEME_SPINNER:
+      bool isSpinner = (aWidgetType == NS_THEME_SPINNER);
       nsIContent* content = aFrame->GetContent();
-      if (content->IsHTMLElement()) {
+      if (isSpinner && 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.
         break;
       }
       ThemeDrawState state = kThemeStateActive;
       if (content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::state,
                                NS_LITERAL_STRING("up"), eCaseMatters)) {
@@ -3440,16 +3442,17 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
     }
 
     case NS_THEME_TOOLBARBUTTON:
     {
       aResult->SizeTo(0, toolbarButtonHeights[miniControlSize]);
       break;
     }
 
+    case NS_THEME_INNER_SPIN_BUTTON:
     case NS_THEME_SPINNER:
     case NS_THEME_SPINNER_UPBUTTON:
     case NS_THEME_SPINNER_DOWNBUTTON:
     {
       SInt32 buttonHeight = 0, buttonWidth = 0;
       if (aFrame->GetContent()->IsXULElement()) {
         ::GetThemeMetric(kThemeMetricLittleArrowsWidth, &buttonWidth);
         ::GetThemeMetric(kThemeMetricLittleArrowsHeight, &buttonHeight);
@@ -3824,16 +3827,17 @@ nsNativeThemeCocoa::ThemeSupportsWidget(
     case NS_THEME_MAC_HELP_BUTTON:
     case NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN:
     case NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED:
     case NS_THEME_BUTTON:
     case NS_THEME_BUTTON_ARROW_UP:
     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:
     case NS_THEME_TOOLBAR:
     case NS_THEME_STATUSBAR:
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
@@ -3964,16 +3968,17 @@ nsNativeThemeCocoa::WidgetAppearanceDepe
     case NS_THEME_BUTTON_ARROW_UP:
     case NS_THEME_BUTTON_ARROW_DOWN:
     case NS_THEME_CHECKMENUITEM:
     case NS_THEME_MENUPOPUP:
     case NS_THEME_MENUARROW:
     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:
     case NS_THEME_SEPARATOR:
     case NS_THEME_TOOLBOX:
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TREEVIEW:
--- a/widget/gtk/gtk2drawing.c
+++ b/widget/gtk/gtk2drawing.c
@@ -1361,16 +1361,61 @@ moz_gtk_scrollbar_thumb_paint(WidgetNode
                      rect->width,  rect->height,
                      (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
                      GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
 
     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)
 {
     GtkStyle* style;
 
     ensure_spin_widget();
     gtk_widget_set_direction(gSpinWidget, direction);
     style = gSpinWidget->style;
@@ -2979,16 +3024,17 @@ moz_gtk_get_widget_border(WidgetNodeType
     case MOZ_GTK_GRIPPER:
     case MOZ_GTK_PROGRESS_CHUNK:
     case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
     case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
     case MOZ_GTK_TREEVIEW_EXPANDER:
     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:
     case MOZ_GTK_MENUARROW:
     case MOZ_GTK_TOOLBARBUTTON_ARROW:
     case MOZ_GTK_TOOLBAR:
     case MOZ_GTK_MENUBAR:
     case MOZ_GTK_TAB_SCROLLARROW:
@@ -3242,16 +3288,19 @@ moz_gtk_widget_paint(WidgetNodeType widg
         return moz_gtk_scale_paint(drawable, rect, cliprect, state,
                                    (GtkOrientation) flags, direction);
         break;
     case MOZ_GTK_SCALE_THUMB_HORIZONTAL:
     case MOZ_GTK_SCALE_THUMB_VERTICAL:
         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;
     case MOZ_GTK_SPINBUTTON_UP:
     case MOZ_GTK_SPINBUTTON_DOWN:
         return moz_gtk_spin_updown_paint(drawable, rect,
                                          (widget == MOZ_GTK_SPINBUTTON_DOWN),
                                          state, direction);
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -793,16 +793,50 @@ moz_gtk_scrollbar_thumb_paint(WidgetNode
                      (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
                      GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
 
 
     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)
 {
     GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, direction);
     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);
     return MOZ_GTK_SUCCESS;
 }
@@ -2278,16 +2312,17 @@ moz_gtk_get_widget_border(WidgetNodeType
     case MOZ_GTK_GRIPPER:
     case MOZ_GTK_PROGRESS_CHUNK:
     case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
     case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
     case MOZ_GTK_TREEVIEW_EXPANDER:
     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:
     case MOZ_GTK_MENUARROW:
     case MOZ_GTK_TOOLBARBUTTON_ARROW:
     case MOZ_GTK_TOOLBAR:
     case MOZ_GTK_MENUBAR:
     case MOZ_GTK_TAB_SCROLLARROW:
@@ -2840,16 +2875,19 @@ moz_gtk_widget_paint(WidgetNodeType widg
         return moz_gtk_scale_paint(cr, rect, state,
                                    (GtkOrientation) flags, direction);
         break;
     case MOZ_GTK_SCALE_THUMB_HORIZONTAL:
     case MOZ_GTK_SCALE_THUMB_VERTICAL:
         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;
     case MOZ_GTK_SPINBUTTON_UP:
     case MOZ_GTK_SPINBUTTON_DOWN:
         return moz_gtk_spin_updown_paint(cr, rect,
                                          (widget == MOZ_GTK_SPINBUTTON_DOWN),
                                          state, direction);
--- a/widget/gtk/gtkdrawing.h
+++ b/widget/gtk/gtkdrawing.h
@@ -170,16 +170,17 @@ typedef enum {
   MOZ_GTK_SCALE_CONTENTS_HORIZONTAL,
   MOZ_GTK_SCALE_CONTENTS_VERTICAL,
   MOZ_GTK_SCALE_TROUGH_HORIZONTAL,
   MOZ_GTK_SCALE_TROUGH_VERTICAL,
   /* Paints a GtkScale thumb. */
   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,
   MOZ_GTK_SPINBUTTON_ENTRY,
   /* Paints the gripper of a GtkHandleBox. */
   MOZ_GTK_GRIPPER,
   /* Paints a GtkEntry. */
   MOZ_GTK_ENTRY,
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -434,16 +434,19 @@ nsNativeThemeGTK::GetGtkWidgetAndState(u
     aGtkWidgetType = MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL;
     break;
   case NS_THEME_SCROLLBARTHUMB_VERTICAL:
     aGtkWidgetType = MOZ_GTK_SCROLLBAR_THUMB_VERTICAL;
     break;
   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;
   case NS_THEME_SPINNER_UPBUTTON:
     aGtkWidgetType = MOZ_GTK_SPINBUTTON_UP;
     break;
   case NS_THEME_SPINNER_DOWNBUTTON:
     aGtkWidgetType = MOZ_GTK_SPINBUTTON_DOWN;
@@ -1652,16 +1655,17 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
     {
       gint separator_width;
     
       moz_gtk_get_toolbar_separator_width(&separator_width);
     
       aResult->width = separator_width;
     }
     break;
+  case NS_THEME_INNER_SPIN_BUTTON:
   case NS_THEME_SPINNER:
     // hard code these sizes
     aResult->width = 14;
     aResult->height = 26;
     break;
   case NS_THEME_TREEHEADERSORTARROW:
   case NS_THEME_SPINNER_UPBUTTON:
   case NS_THEME_SPINNER_DOWNBUTTON:
@@ -1839,16 +1843,17 @@ nsNativeThemeGTK::ThemeSupportsWidget(ns
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TAB:
     // case NS_THEME_TABPANEL:
     case NS_THEME_TABPANELS:
     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:
   case NS_THEME_SPINNER_TEXTFIELD:
     // case NS_THEME_SCROLLBAR:  (n/a for gtk)
     // case NS_THEME_SCROLLBAR_SMALL: (n/a for gtk)
   case NS_THEME_SCROLLBARBUTTON_UP:
   case NS_THEME_SCROLLBARBUTTON_DOWN:
--- a/widget/headless/HeadlessThemeGTK.cpp
+++ b/widget/headless/HeadlessThemeGTK.cpp
@@ -218,16 +218,17 @@ HeadlessThemeGTK::GetMinimumWidgetSize(n
       aResult->height = 13;
       break;
     case NS_THEME_TAB_SCROLL_ARROW_BACK:
     case NS_THEME_TAB_SCROLL_ARROW_FORWARD:
       aResult->width = 16;
       aResult->height = 16;
       *aIsOverridable = false;
       break;
+    case NS_THEME_INNER_SPIN_BUTTON:
     case NS_THEME_SPINNER:
       aResult->width = 14;
       aResult->height = 26;
       break;
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_TEXTFIELD:
       aResult->width = 0;
       aResult->height = 12;
@@ -353,16 +354,17 @@ HeadlessThemeGTK::ThemeSupportsWidget(ns
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TAB:
     case NS_THEME_TABPANELS:
     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:
     case NS_THEME_SPINNER_TEXTFIELD:
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_SCROLLBAR_HORIZONTAL:
     case NS_THEME_SCROLLBAR_VERTICAL:
     case NS_THEME_SCROLLBARBUTTON_UP:
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -677,16 +677,17 @@ nsresult nsNativeThemeWin::GetCachedMini
   }
 
   SIZE sz;
   GetThemePartSize(aTheme, hdc, aPart, aState, nullptr, aSizeReq, &sz);
   aResult->width = sz.cx;
   aResult->height = sz.cy;
 
   switch (aWidgetType) {
+    case NS_THEME_INNER_SPIN_BUTTON:
     case NS_THEME_SPINNER_UPBUTTON:
     case NS_THEME_SPINNER_DOWNBUTTON:
       aResult->width++;
       aResult->height = aResult->height / 2 + 1;
       break;
 
     case NS_THEME_MENUSEPARATOR:
     {
@@ -761,16 +762,17 @@ mozilla::Maybe<nsUXThemeClass> nsNativeT
       return Some(eUXScrollbar);
     case NS_THEME_RANGE:
     case NS_THEME_RANGE_THUMB:
     case NS_THEME_SCALE_HORIZONTAL:
     case NS_THEME_SCALE_VERTICAL:
     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);
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
     case NS_THEME_RESIZERPANEL:
     case NS_THEME_RESIZER:
       return Some(eUXStatus);
@@ -1138,16 +1140,17 @@ nsNativeThemeWin::GetThemePartAndState(n
           aState = TKP_FOCUSED;
         else if (eventState.HasState(NS_EVENT_STATE_HOVER))
           aState = TS_HOVER;
         else
           aState = TS_NORMAL;
       }
       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) ?
               SPNP_UP : SPNP_DOWN;
       EventStates eventState = GetContentState(aFrame, aWidgetType);
       if (!aFrame)
         aState = TS_NORMAL;
       else if (IsDisabled(aFrame, eventState))
@@ -2713,16 +2716,17 @@ nsNativeThemeWin::ClassicThemeSupportsWi
     case NS_THEME_SCROLLBAR_VERTICAL:
     case NS_THEME_SCROLLBAR_HORIZONTAL:
     case NS_THEME_SCROLLBAR_NON_DISAPPEARING:
     case NS_THEME_SCALE_HORIZONTAL:
     case NS_THEME_SCALE_VERTICAL:
     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:
     case NS_THEME_TREEVIEW:
     case NS_THEME_MENULIST_TEXTFIELD:
     case NS_THEME_MENULIST:
     case NS_THEME_TOOLTIP:
     case NS_THEME_STATUSBAR:
@@ -2868,16 +2872,17 @@ nsNativeThemeWin::ClassicGetMinimumWidge
       (*aResult).width = (*aResult).height = 13;
       break;
     case NS_THEME_MENUCHECKBOX:
     case NS_THEME_MENURADIO:
     case NS_THEME_MENUARROW:
       (*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);
       (*aResult).height = 8; // No good metrics available for this
       *aIsOverridable = false;
       break;
     case NS_THEME_SCROLLBARBUTTON_UP:
     case NS_THEME_SCROLLBARBUTTON_DOWN:
@@ -3269,25 +3274,27 @@ nsresult nsNativeThemeWin::ClassicGetThe
         aState |= DFCS_INACTIVE;
       else {
         if (contentState.HasAllStates(NS_EVENT_STATE_HOVER | NS_EVENT_STATE_ACTIVE))
           aState |= DFCS_PUSHED | DFCS_FLAT;
       }
 
       return NS_OK;
     }
+    case NS_THEME_INNER_SPIN_BUTTON:
     case NS_THEME_SPINNER_UPBUTTON:
     case NS_THEME_SPINNER_DOWNBUTTON: {
       EventStates contentState = GetContentState(aFrame, aWidgetType);
 
       aPart = DFC_SCROLL;
       switch (aWidgetType) {
         case NS_THEME_SPINNER_UPBUTTON:
           aState = DFCS_SCROLLUP;
           break;
+        case NS_THEME_INNER_SPIN_BUTTON:
         case NS_THEME_SPINNER_DOWNBUTTON:
           aState = DFCS_SCROLLDOWN;
           break;
       }
 
       if (IsDisabled(aFrame, contentState))
         aState |= DFCS_INACTIVE;
       else {
@@ -3578,16 +3585,17 @@ RENDER_AGAIN:
     }
     // Draw controls supported by DrawFrameControl
     case NS_THEME_CHECKBOX:
     case NS_THEME_RADIO:
     case NS_THEME_SCROLLBARBUTTON_UP:
     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:
     case NS_THEME_RESIZER: {
       int32_t oldTA;
       // setup DC to make DrawFrameControl draw correctly
       oldTA = ::SetTextAlign(hdc, TA_TOP | TA_LEFT | TA_NOUPDATECP);
       ::DrawFrameControl(hdc, &widgetRect, part, state);
@@ -3982,16 +3990,17 @@ nsNativeThemeWin::GetWidgetNativeDrawing
     case NS_THEME_SCROLLBARTHUMB_VERTICAL:
     case NS_THEME_SCROLLBARTHUMB_HORIZONTAL:
     case NS_THEME_SCROLLBAR_VERTICAL:
     case NS_THEME_SCROLLBAR_HORIZONTAL:
     case NS_THEME_SCALE_HORIZONTAL:
     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:
     case NS_THEME_TREEVIEW:
     case NS_THEME_TOOLTIP:
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
     case NS_THEME_RESIZERPANEL: