Bug 966861 - Make the <input type=number> up/down spin buttons appear for classic WinXP/7 theming. r=roc, a=sylvestre
authorJonathan Watt <jwatt@jwatt.org>
Wed, 19 Feb 2014 14:25:28 +0000
changeset 182915 37bd222fb869a0a8a6cf21c6cd15d90fdfc9120c
parent 182914 43e47b7a6eda91c7902d90392ae5b83571f248bf
child 182916 0d08b822b2a20a6bb29dfeea99d66f471ae0a1a5
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sylvestre
bugs966861
milestone29.0a2
Bug 966861 - Make the <input type=number> up/down spin buttons appear for classic WinXP/7 theming. r=roc, a=sylvestre
widget/windows/nsNativeThemeWin.cpp
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -2861,16 +2861,22 @@ 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_SPINNER_UP_BUTTON:
+    case NS_THEME_SPINNER_DOWN_BUTTON:
+      (*aResult).width = ::GetSystemMetrics(SM_CXVSCROLL);
+      (*aResult).height = 8; // No good metrics available for this
+      *aIsOverridable = false;
+      break;
     case NS_THEME_SCROLLBAR_BUTTON_UP:
     case NS_THEME_SCROLLBAR_BUTTON_DOWN:
       (*aResult).width = ::GetSystemMetrics(SM_CXVSCROLL);
       (*aResult).height = ::GetSystemMetrics(SM_CYVSCROLL);
       *aIsOverridable = false;
       break;
     case NS_THEME_SCROLLBAR_BUTTON_LEFT:
     case NS_THEME_SCROLLBAR_BUTTON_RIGHT: