Bug 459708 - Remove -moz-appearance values "radio-small" and "checkbox-small", r=roc
authorMarkus Stange <mstange@themasta.com>
Mon, 03 Nov 2008 14:12:59 +0100
changeset 21220 920f440d7c884f6f45912074dba929378da7c6ed
parent 21219 e1c09ee9eb9f084a9e72f9859f632ca41b9aa524
child 21221 ba895ab8cbe7e5fb74889eb2e44736ec262c86b6
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs459708
milestone1.9.1b2pre
Bug 459708 - Remove -moz-appearance values "radio-small" and "checkbox-small", r=roc
gfx/public/nsThemeConstants.h
layout/style/forms.css
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
widget/src/cocoa/nsNativeThemeCocoa.mm
widget/src/gtk2/nsNativeThemeGTK.cpp
widget/src/qt/nsNativeThemeQt.cpp
widget/src/windows/nsNativeThemeWin.cpp
widget/src/xpwidgets/nsNativeTheme.cpp
--- a/gfx/public/nsThemeConstants.h
+++ b/gfx/public/nsThemeConstants.h
@@ -5,22 +5,16 @@
 #define NS_THEME_BUTTON                                    1
 
 // A radio element within a radio group.
 #define NS_THEME_RADIO                                     2
 
 // A checkbox element. 
 #define NS_THEME_CHECKBOX                                  3
 
-// A small radio button, for HTML forms
-#define NS_THEME_RADIO_SMALL                               4
-
-// A small checkbox, for HTML forms
-#define NS_THEME_CHECKBOX_SMALL                            5
-
 // A rectangular button that contains complex content
 // like images (e.g. HTML <button> elements)
 #define NS_THEME_BUTTON_BEVEL                              7
 
 // The toolbox that contains the toolbars.
 #define NS_THEME_TOOLBOX                                   11
 
 // A toolbar in an application window.
--- a/layout/style/forms.css
+++ b/layout/style/forms.css
@@ -391,30 +391,30 @@ input[type="file"] > input[type="text"] 
 input[type="file"] > input[type="button"] {
   height: inherit;
   font-size: inherit;
   letter-spacing: inherit;
 }
 
 /* radio buttons */
 input[type="radio"] {
-  -moz-appearance: radio-small;
+  -moz-appearance: radio;
   width: 13px;
   height: 13px;
   margin: 3px 3px 0px 5px;
   padding: 0 !important;
   cursor: default;
   -moz-binding: none;
 
   -moz-border-radius: 100% !important;
 }
 
 /* check boxes */
 input[type="checkbox"] {
-  -moz-appearance: checkbox-small;
+  -moz-appearance: checkbox;
   width: 13px;
   height: 13px;
   margin: 3px 3px 3px 4px;
   padding: 0 !important;
   cursor: default;
   -moz-binding: none;
 
   -moz-border-radius: 0 !important;
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -489,18 +489,16 @@ CSS_KEY(x-slow, x_slow)
 CSS_KEY(x-small, x_small)
 CSS_KEY(x-soft, x_soft)
 CSS_KEY(xx-large, xx_large)
 CSS_KEY(xx-small, xx_small)
 
 // Appearance keywords for widget styles
 CSS_KEY(radio, radio)
 CSS_KEY(checkbox, checkbox)
-CSS_KEY(radio-small, radio_small)
-CSS_KEY(checkbox-small, checkbox_small)
 CSS_KEY(button-bevel, button_bevel)
 CSS_KEY(toolbox, toolbox)
 CSS_KEY(toolbar, toolbar)
 CSS_KEY(toolbarbutton, toolbarbutton)
 CSS_KEY(toolbargripper, toolbargripper)
 CSS_KEY(dualbutton, dualbutton)
 CSS_KEY(toolbarbutton-dropdown, toolbarbutton_dropdown)
 CSS_KEY(separator, separator)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -234,18 +234,16 @@ nsCSSProps::GetStringValue(nsCSSFontDesc
 
 /***************************************************************************/
 
 const PRInt32 nsCSSProps::kAppearanceKTable[] = {
   eCSSKeyword_none,                   NS_THEME_NONE,
   eCSSKeyword_button,                 NS_THEME_BUTTON,
   eCSSKeyword_radio,                  NS_THEME_RADIO,
   eCSSKeyword_checkbox,               NS_THEME_CHECKBOX,
-  eCSSKeyword_radio_small,            NS_THEME_RADIO_SMALL,
-  eCSSKeyword_checkbox_small,         NS_THEME_CHECKBOX_SMALL,
   eCSSKeyword_button_bevel,           NS_THEME_BUTTON_BEVEL,
   eCSSKeyword_toolbox,                NS_THEME_TOOLBOX,
   eCSSKeyword_toolbar,                NS_THEME_TOOLBAR,
   eCSSKeyword_toolbarbutton,          NS_THEME_TOOLBAR_BUTTON,
   eCSSKeyword_toolbargripper,         NS_THEME_TOOLBAR_GRIPPER,
   eCSSKeyword_dualbutton,             NS_THEME_TOOLBAR_DUAL_BUTTON,
   eCSSKeyword_toolbarbutton_dropdown, NS_THEME_TOOLBAR_BUTTON_DROPDOWN,
   eCSSKeyword_separator,              NS_THEME_TOOLBAR_SEPARATOR,
--- a/widget/src/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/src/cocoa/nsNativeThemeCocoa.mm
@@ -1329,21 +1329,18 @@ nsNativeThemeCocoa::DrawWidgetBackground
       break;
 
     case NS_THEME_TOOLTIP:
       CGContextSetRGBFillColor(cgContext, 1.0, 1.0, 0.78, 1.0);
       CGContextFillRect(cgContext, macRect);
       break;
 
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
-    case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL: {
-      PRBool isCheckbox = (aWidgetType == NS_THEME_CHECKBOX ||
-                           aWidgetType == NS_THEME_CHECKBOX_SMALL);
+    case NS_THEME_RADIO: {
+      PRBool isCheckbox = (aWidgetType == NS_THEME_CHECKBOX);
       DrawCheckboxOrRadio(cgContext, isCheckbox, macRect, GetCheckedOrSelected(aFrame, !isCheckbox),
                           IsDisabled(aFrame), eventState, aFrame);
     }
       break;
 
     case NS_THEME_BUTTON:
       DrawPushButton(cgContext, macRect, IsDefaultButton(aFrame), IsDisabled(aFrame), eventState, aFrame);
       break;
@@ -1701,19 +1698,17 @@ nsNativeThemeCocoa::GetWidgetPadding(nsI
   // We don't want CSS padding being used for certain widgets.
   // See bug 381639 for an example of why.
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
     // Radios and checkboxes return a fixed size in GetMinimumWidgetSize
     // and have a meaningful baseline, so they can't have
     // author-specified padding.
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
       aResult->SizeTo(0, 0, 0, 0);
       return PR_TRUE;
   }
   return PR_FALSE;
 }
 
 
 PRBool
@@ -1723,19 +1718,17 @@ nsNativeThemeCocoa::GetWidgetOverflow(ns
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
     case NS_THEME_LISTBOX:
     case NS_THEME_DROPDOWN:
     case NS_THEME_DROPDOWN_BUTTON:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     {
       // We assume that the above widgets can draw a focus ring that will be less than
       // or equal to 4 pixels thick.
       nsIntMargin extraSize = nsIntMargin(MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH);
       PRInt32 p2a = aContext->AppUnitsPerDevPixel();
       nsMargin m(NSIntPixelsToAppUnits(extraSize.left, p2a),
                  NSIntPixelsToAppUnits(extraSize.top, p2a),
                  NSIntPixelsToAppUnits(extraSize.right, p2a),
@@ -2034,20 +2027,18 @@ nsNativeThemeCocoa::ThemeSupportsWidget(
     case NS_THEME_DIALOG:
     case NS_THEME_WINDOW:
     case NS_THEME_MENUPOPUP:
     case NS_THEME_MENUITEM:
     case NS_THEME_MENUSEPARATOR:
     case NS_THEME_TOOLTIP:
     
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_CHECKBOX_CONTAINER:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_RADIO_CONTAINER:
     case NS_THEME_GROUPBOX:
     case NS_THEME_BUTTON:
     case NS_THEME_BUTTON_BEVEL:
     case NS_THEME_SPINNER:
     case NS_THEME_TOOLBAR:
     case NS_THEME_MOZ_MAC_UNIFIED_TOOLBAR:
     case NS_THEME_STATUSBAR:
@@ -2104,36 +2095,32 @@ nsNativeThemeCocoa::ThemeSupportsWidget(
 
 PRBool
 nsNativeThemeCocoa::WidgetIsContainer(PRUint8 aWidgetType)
 {
   // flesh this out at some point
   switch (aWidgetType) {
    case NS_THEME_DROPDOWN_BUTTON:
    case NS_THEME_RADIO:
-   case NS_THEME_RADIO_SMALL:
    case NS_THEME_CHECKBOX:
-   case NS_THEME_CHECKBOX_SMALL:
    case NS_THEME_PROGRESSBAR:
     return PR_FALSE;
     break;
   }
   return PR_TRUE;
 }
 
 
 PRBool
 nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, PRUint8 aWidgetType)
 {
   if (aWidgetType == NS_THEME_DROPDOWN ||
       aWidgetType == NS_THEME_BUTTON ||
       aWidgetType == NS_THEME_RADIO ||
-      aWidgetType == NS_THEME_RADIO_SMALL ||
-      aWidgetType == NS_THEME_CHECKBOX ||
-      aWidgetType == NS_THEME_CHECKBOX_SMALL)
+      aWidgetType == NS_THEME_CHECKBOX)
     return PR_TRUE;
 
   return PR_FALSE;
 }
 
 PRBool
 nsNativeThemeCocoa::ThemeNeedsComboboxDropmarker()
 {
--- a/widget/src/gtk2/nsNativeThemeGTK.cpp
+++ b/widget/src/gtk2/nsNativeThemeGTK.cpp
@@ -67,26 +67,16 @@
 #include "gfxContext.h"
 #include "gfxPlatformGtk.h"
 #include "gfxGdkNativeRenderer.h"
 
 NS_IMPL_ISUPPORTS2(nsNativeThemeGTK, nsITheme, nsIObserver)
 
 static int gLastGdkError;
 
-static inline bool IsCheckboxWidgetType(PRUint8 aWidgetType)
-{
-  return (aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_CHECKBOX_SMALL);
-}
-
-static inline bool IsRadioWidgetType(PRUint8 aWidgetType)
-{
-  return (aWidgetType == NS_THEME_RADIO || aWidgetType == NS_THEME_RADIO_SMALL);
-}
-
 nsNativeThemeGTK::nsNativeThemeGTK()
 {
   if (moz_gtk_init() != MOZ_GTK_SUCCESS) {
     memset(mDisabledWidgetTypes, 0xff, sizeof(mDisabledWidgetTypes));
     return;
   }
 
   // We have to call moz_gtk_shutdown before the event loop stops running.
@@ -189,18 +179,18 @@ nsNativeThemeGTK::GetGtkWidgetAndState(P
     if (!aFrame) {
       // reset the entire struct to zero
       memset(aState, 0, sizeof(GtkWidgetState));
     } else {
 
       // For XUL checkboxes and radio buttons, the state of the parent
       // determines our state.
       nsIFrame *stateFrame = aFrame;
-      if (aFrame && ((aWidgetFlags && (IsCheckboxWidgetType(aWidgetType) ||
-                                       IsRadioWidgetType(aWidgetType))) ||
+      if (aFrame && ((aWidgetFlags && (aWidgetType == NS_THEME_CHECKBOX ||
+                                       aWidgetType == NS_THEME_RADIO)) ||
                      aWidgetType == NS_THEME_CHECKBOX_LABEL ||
                      aWidgetType == NS_THEME_RADIO_LABEL)) {
 
         nsIAtom* atom = nsnull;
         nsIContent *content = aFrame->GetContent();
         if (content->IsNodeOfType(nsINode::eXUL)) {
           if (aWidgetType == NS_THEME_CHECKBOX_LABEL ||
               aWidgetType == NS_THEME_RADIO_LABEL) {
@@ -208,17 +198,17 @@ nsNativeThemeGTK::GetGtkWidgetAndState(P
             stateFrame = aFrame = aFrame->GetParent()->GetParent();
           } else {
             // GetContentState knows to look one frame up for radio/checkbox
             // widgets, so don't adjust stateFrame here.
             aFrame = aFrame->GetParent();
           }
           if (aWidgetFlags) {
             if (!atom) {
-              atom = (IsCheckboxWidgetType(aWidgetType) ||
+              atom = (aWidgetType == NS_THEME_CHECKBOX ||
                       aWidgetType == NS_THEME_CHECKBOX_LABEL) ? nsWidgetAtoms::checked
                                                               : nsWidgetAtoms::selected;
             }
             *aWidgetFlags = CheckBooleanAttr(aFrame, atom);
           }
         } else {
           if (aWidgetFlags) {
             nsCOMPtr<nsIDOMHTMLInputElement> inputElt(do_QueryInterface(content));
@@ -250,18 +240,18 @@ nsNativeThemeGTK::GetGtkWidgetAndState(P
         // to see whether to draw in the focused state.
         if (aWidgetType == NS_THEME_TEXTFIELD ||
             aWidgetType == NS_THEME_TEXTFIELD_MULTILINE ||
             aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||
             aWidgetType == NS_THEME_SPINNER_TEXTFIELD ||
             aWidgetType == NS_THEME_RADIO_CONTAINER ||
             aWidgetType == NS_THEME_RADIO_LABEL) {
           aState->focused = IsFocused(aFrame);
-        } else if (IsRadioWidgetType(aWidgetType) ||
-                   IsCheckboxWidgetType(aWidgetType)) {
+        } else if (aWidgetType == NS_THEME_RADIO ||
+                   aWidgetType == NS_THEME_CHECKBOX) {
           // In XUL, checkboxes and radios shouldn't have focus rings, their labels do
           aState->focused = FALSE;
         }
 
         if (aWidgetType == NS_THEME_SCROLLBAR_THUMB_VERTICAL ||
             aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL) {
           // for scrollbars we need to go up two to go from the thumb to
           // the slider to the actual scrollbar object
@@ -366,20 +356,18 @@ nsNativeThemeGTK::GetGtkWidgetAndState(P
   case NS_THEME_BUTTON:
   case NS_THEME_TOOLBAR_BUTTON:
   case NS_THEME_TOOLBAR_DUAL_BUTTON:
     if (aWidgetFlags)
       *aWidgetFlags = (aWidgetType == NS_THEME_BUTTON) ? GTK_RELIEF_NORMAL : GTK_RELIEF_NONE;
     aGtkWidgetType = MOZ_GTK_BUTTON;
     break;
   case NS_THEME_CHECKBOX:
-  case NS_THEME_CHECKBOX_SMALL:
   case NS_THEME_RADIO:
-  case NS_THEME_RADIO_SMALL:
-    aGtkWidgetType = IsRadioWidgetType(aWidgetType) ? MOZ_GTK_RADIOBUTTON : MOZ_GTK_CHECKBUTTON;
+    aGtkWidgetType = (aWidgetType == NS_THEME_RADIO) ? MOZ_GTK_RADIOBUTTON : MOZ_GTK_CHECKBUTTON;
     break;
   case NS_THEME_SCROLLBAR_BUTTON_UP:
   case NS_THEME_SCROLLBAR_BUTTON_DOWN:
   case NS_THEME_SCROLLBAR_BUTTON_LEFT:
   case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
     aGtkWidgetType = MOZ_GTK_SCROLLBAR_BUTTON;
     break;
   case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
@@ -665,23 +653,21 @@ GetExtraSizeForWidget(PRUint8 aWidgetTyp
     aExtra->top = aExtra->bottom = 1;
     return PR_TRUE;
   case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
     aExtra->left = aExtra->right = 1;
     return PR_TRUE;
 
   // Include the indicator spacing (the padding around the control).
   case NS_THEME_CHECKBOX:
-  case NS_THEME_CHECKBOX_SMALL:
   case NS_THEME_RADIO:
-  case NS_THEME_RADIO_SMALL:
     {
       gint indicator_size, indicator_spacing;
 
-      if (IsCheckboxWidgetType(aWidgetType)) {
+      if (aWidgetType == NS_THEME_CHECKBOX) {
         moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing);
       } else {
         moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing);
       }
 
       aExtra->top = indicator_spacing;
       aExtra->right = indicator_spacing;
       aExtra->bottom = indicator_spacing;
@@ -875,19 +861,17 @@ nsNativeThemeGTK::GetWidgetPadding(nsIDe
     case NS_THEME_TOOLBAR_DUAL_BUTTON:
     case NS_THEME_TAB_SCROLLARROW_BACK:
     case NS_THEME_TAB_SCROLLARROW_FORWARD:
     case NS_THEME_DROPDOWN_BUTTON:
     // Radios and checkboxes return a fixed size in GetMinimumWidgetSize
     // and have a meaningful baseline, so they can't have
     // author-specified padding.
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
       aResult->SizeTo(0, 0, 0, 0);
       return PR_TRUE;
   }
 
   return PR_FALSE;
 }
 
 PRBool
@@ -1044,23 +1028,21 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
 
       moz_gtk_get_menu_separator_height(&separator_height);
       aResult->height = separator_height;
     
       *aIsOverridable = PR_FALSE;
     }
     break;
   case NS_THEME_CHECKBOX:
-  case NS_THEME_CHECKBOX_SMALL:
   case NS_THEME_RADIO:
-  case NS_THEME_RADIO_SMALL:
     {
       gint indicator_size, indicator_spacing;
 
-      if (IsCheckboxWidgetType(aWidgetType)) {
+      if (aWidgetType == NS_THEME_CHECKBOX) {
         moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing);
       } else {
         moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing);
       }
 
       // Include space for the indicator and the padding around it.
       aResult->width = indicator_size;
       aResult->height = indicator_size;
@@ -1212,19 +1194,17 @@ nsNativeThemeGTK::ThemeSupportsWidget(ns
 {
   if (IsWidgetTypeDisabled(mDisabledWidgetTypes, aWidgetType))
     return PR_FALSE;
 
   switch (aWidgetType) {
   case NS_THEME_BUTTON:
   case NS_THEME_BUTTON_FOCUS:
   case NS_THEME_RADIO:
-  case NS_THEME_RADIO_SMALL:
   case NS_THEME_CHECKBOX:
-  case NS_THEME_CHECKBOX_SMALL:
   case NS_THEME_TOOLBOX: // N/A
   case NS_THEME_TOOLBAR:
   case NS_THEME_TOOLBAR_BUTTON:
   case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
   case NS_THEME_TOOLBAR_BUTTON_DROPDOWN:
   case NS_THEME_TOOLBAR_SEPARATOR:
   case NS_THEME_TOOLBAR_GRIPPER:
   case NS_THEME_STATUSBAR:
@@ -1305,18 +1285,18 @@ nsNativeThemeGTK::ThemeSupportsWidget(ns
   return PR_FALSE;
 }
 
 NS_IMETHODIMP_(PRBool)
 nsNativeThemeGTK::WidgetIsContainer(PRUint8 aWidgetType)
 {
   // XXXdwh At some point flesh all of this out.
   if (aWidgetType == NS_THEME_DROPDOWN_BUTTON ||
-      IsRadioWidgetType(aWidgetType) ||
-      IsCheckboxWidgetType(aWidgetType) ||
+      aWidgetType == NS_THEME_RADIO ||
+      aWidgetType == NS_THEME_CHECKBOX ||
       aWidgetType == NS_THEME_TAB_SCROLLARROW_BACK ||
       aWidgetType == NS_THEME_TAB_SCROLLARROW_FORWARD)
     return PR_FALSE;
   return PR_TRUE;
 }
 
 PRBool
 nsNativeThemeGTK::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, PRUint8 aWidgetType)
--- a/widget/src/qt/nsNativeThemeQt.cpp
+++ b/widget/src/qt/nsNativeThemeQt.cpp
@@ -136,24 +136,21 @@ nsNativeThemeQt::DrawWidgetBackground(ns
 
     QRect r = qRectInPixels(aRect, p2a);
     QRect cr = qRectInPixels(aClipRect, p2a);
 
     QStyle::State extraFlags = QStyle::State_None;
 
     switch (aWidgetType) {
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL: 
-    case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL: {
+    case NS_THEME_CHECKBOX: {
         QStyleOptionButton opt;
         InitButtonStyle (aWidgetType, aFrame, r, opt);
 
-        if (aWidgetType == NS_THEME_CHECKBOX ||
-            aWidgetType == NS_THEME_CHECKBOX_SMALL)
+        if (aWidgetType == NS_THEME_CHECKBOX)
         {
             style->drawPrimitive (QStyle::PE_IndicatorCheckBox, &opt, qPainter);
         } else {
             style->drawPrimitive (QStyle::PE_IndicatorRadioButton, &opt, qPainter);
         }
         break;
     }
     case NS_THEME_BUTTON:
@@ -327,30 +324,28 @@ nsNativeThemeQt::GetMinimumWidgetSize(ns
     (*aResult).width = (*aResult).height = 0;
     *aIsOverridable = PR_TRUE;
 
     QStyle *s = qApp->style();
 
     PRInt32 p2a = GetAppUnitsPerDevPixel(aContext);
 
     switch (aWidgetType) {
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_CHECKBOX: {
         nsRect frameRect = aFrame->GetRect();
 
         QRect qRect = qRectInPixels(frameRect, p2a);
 
         QStyleOptionButton option;
 
         InitButtonStyle(aWidgetType, aFrame, qRect, option);
 
         QRect rect = s->subElementRect(
-            (aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_CHECKBOX_SMALL ) ?
+            (aWidgetType == NS_THEME_CHECKBOX) ?
                 QStyle::SE_CheckBoxIndicator :
                 QStyle::SE_RadioButtonIndicator,
             &option,
             NULL);
 
         (*aResult).width = rect.width();
         (*aResult).height = rect.height();
         break;
@@ -515,19 +510,17 @@ nsNativeThemeQt::ThemeSupportsWidget(nsP
     case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
     case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
     case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
     //case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL:
     //case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:
     case NS_THEME_SCROLLBAR_TRACK_HORIZONTAL:
     case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_BUTTON_BEVEL:
     case NS_THEME_BUTTON:
     case NS_THEME_DROPDOWN:
     case NS_THEME_DROPDOWN_BUTTON:
     case NS_THEME_DROPDOWN_TEXT:
     case NS_THEME_DROPDOWN_TEXTFIELD:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
@@ -590,19 +583,17 @@ nsNativeThemeQt::InitButtonStyle(PRUint8
     if (eventState & NS_EVENT_STATE_FOCUS)
         opt.state |= QStyle::State_HasFocus;
     if (!disabled && eventState & NS_EVENT_STATE_ACTIVE)
         // Don't allow sunken when disabled
         opt.state |= QStyle::State_Sunken;
 
     switch (aWidgetType) {
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
         if (IsChecked(aFrame))
             opt.state |= QStyle::State_On;
         else
             opt.state |= QStyle::State_Off;
 
         break;
     default:
         if (!(eventState & NS_EVENT_STATE_ACTIVE))
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -67,26 +67,16 @@
 #include "gfxWindowsSurface.h"
 #include "gfxWindowsNativeDrawing.h"
 
 #include "nsUXThemeData.h"
 #include "nsUXThemeConstants.h"
 
 NS_IMPL_ISUPPORTS1(nsNativeThemeWin, nsITheme)
 
-static inline bool IsCheckboxWidgetType(PRUint8 aWidgetType)
-{
-  return (aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_CHECKBOX_SMALL);
-}
-
-static inline bool IsRadioWidgetType(PRUint8 aWidgetType)
-{
-  return (aWidgetType == NS_THEME_RADIO || aWidgetType == NS_THEME_RADIO_SMALL);
-}
-
 static inline bool IsHTMLContent(nsIFrame *frame)
 {
   nsIContent* content = frame->GetContent();
   return content && content->IsNodeOfType(nsINode::eHTML);
 }
 
 nsNativeThemeWin::nsNativeThemeWin() {
   // If there is a relevant change in forms.css for windows platform,
@@ -256,19 +246,17 @@ nsNativeThemeWin::GetTheme(PRUint8 aWidg
     // apps do the textfield border business as well).
     if (aWidgetType == NS_THEME_DROPDOWN)
       aWidgetType = NS_THEME_TEXTFIELD;
   }
 
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
       return nsUXThemeData::GetTheme(eUXButton);
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
       return nsUXThemeData::GetTheme(eUXEdit);
     case NS_THEME_TOOLTIP:
       // BUG #161600: XP/2K3 should force a classic treatment of tooltips
       return nsUXThemeData::sIsVistaOrLater ? nsUXThemeData::GetTheme(eUXTooltip) : NULL;
     case NS_THEME_TOOLBOX:
@@ -398,20 +386,18 @@ nsNativeThemeWin::GetThemePartAndState(n
       
       // Check for default dialog buttons.  These buttons should always look
       // focused.
       if (aState == TS_NORMAL && IsDefaultButton(aFrame))
         aState = TS_FOCUSED;
       return NS_OK;
     }
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
-    case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL: {
-      bool isCheckbox = IsCheckboxWidgetType(aWidgetType);
+    case NS_THEME_RADIO: {
+      bool isCheckbox = (aWidgetType == NS_THEME_CHECKBOX);
       aPart = isCheckbox ? BP_CHECKBOX : BP_RADIO;
 
       // XXXdwh This check will need to be more complicated, since HTML radio groups
       // use checked, but XUL radio groups use selected.  There will need to be an
       // IsNodeOfType test for HTML vs. XUL here.
       nsIAtom* atom = isCheckbox ? nsWidgetAtoms::checked
                                  : nsWidgetAtoms::selected;
 
@@ -1119,17 +1105,17 @@ RENDER_AGAIN:
   // If part is negative, the element wishes us to not render a themed
   // background, instead opting to be drawn specially below.
   else if (part >= 0) {
     nsUXThemeData::drawThemeBG(theme, hdc, part, state, &widgetRect, &clipRect);
   }
 
   // Draw focus rectangles for XP HTML checkboxes and radio buttons
   // XXX it'd be nice to draw these outside of the frame
-  if ((IsCheckboxWidgetType(aWidgetType) || IsRadioWidgetType(aWidgetType)) &&
+  if ((aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_RADIO) &&
       aFrame->GetContent()->IsNodeOfType(nsINode::eHTML) ||
       aWidgetType == NS_THEME_SCALE_HORIZONTAL ||
       aWidgetType == NS_THEME_SCALE_VERTICAL) {
       PRInt32 contentState ;
       contentState = GetContentState(aFrame, aWidgetType);  
             
       if (contentState & NS_EVENT_STATE_FOCUS) {
         // setup DC to make DrawFocusRect draw correctly
@@ -1270,19 +1256,17 @@ nsNativeThemeWin::GetWidgetPadding(nsIDe
                                    PRUint8 aWidgetType,
                                    nsMargin* aResult)
 {
   switch (aWidgetType) {
     // Radios and checkboxes return a fixed size in GetMinimumWidgetSize
     // and have a meaningful baseline, so they can't have
     // author-specified padding.
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
       aResult->SizeTo(0, 0, 0, 0);
       return PR_TRUE;
   }
 
   HANDLE theme = GetTheme(aWidgetType);
   if (!theme)
     return PR_FALSE;
 
@@ -1648,18 +1632,18 @@ nsNativeThemeWin::ThemeSupportsWidget(ns
   return PR_FALSE;
 }
 
 PRBool 
 nsNativeThemeWin::WidgetIsContainer(PRUint8 aWidgetType)
 {
   // XXXdwh At some point flesh all of this out.
   if (aWidgetType == NS_THEME_DROPDOWN_BUTTON || 
-      IsRadioWidgetType(aWidgetType) ||
-      IsCheckboxWidgetType(aWidgetType))
+      aWidgetType == NS_THEME_RADIO ||
+      aWidgetType == NS_THEME_CHECKBOX)
     return PR_FALSE;
   return PR_TRUE;
 }
 
 PRBool
 nsNativeThemeWin::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, PRUint8 aWidgetType)
 {
   return PR_FALSE;
@@ -1683,19 +1667,17 @@ nsNativeThemeWin::ClassicThemeSupportsWi
     case NS_THEME_MENUPOPUP:
       // Classic non-flat menus are handled almost entirely through CSS.
       if (!nsUXThemeData::sFlatMenus)
         return PR_FALSE;
     case NS_THEME_BUTTON:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_SCROLLBAR_BUTTON_UP:
     case NS_THEME_SCROLLBAR_BUTTON_DOWN:
     case NS_THEME_SCROLLBAR_BUTTON_LEFT:
     case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
     case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
     case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
     case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
     case NS_THEME_SCROLLBAR_TRACK_HORIZONTAL:
@@ -1821,19 +1803,17 @@ nsresult
 nsNativeThemeWin::ClassicGetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
                                        PRUint8 aWidgetType,
                                        nsSize* aResult, PRBool* aIsOverridable)
 {
   (*aResult).width = (*aResult).height = 0;
   *aIsOverridable = PR_TRUE;
   switch (aWidgetType) {
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
       (*aResult).width = (*aResult).height = 13;
       break;
     case NS_THEME_MENUCHECKBOX:
     case NS_THEME_MENURADIO:
     case NS_THEME_MENUARROW:
 #ifdef WINCE
       (*aResult).width =  16;
       (*aResult).height = 16;
@@ -1969,29 +1949,27 @@ nsresult nsNativeThemeWin::ClassicGetThe
           aFocused = PR_TRUE;          
         }
 
       }
 
       return NS_OK;
     }
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
-    case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL: {
+    case NS_THEME_RADIO: {
       PRInt32 contentState ;
       aFocused = PR_FALSE;
 
       aPart = DFC_BUTTON;
-      aState = (IsCheckboxWidgetType(aWidgetType)) ? DFCS_BUTTONCHECK : DFCS_BUTTONRADIO;
+      aState = (aWidgetType == NS_THEME_CHECKBOX) ? DFCS_BUTTONCHECK : DFCS_BUTTONRADIO;
       nsIContent* content = aFrame->GetContent();
            
       if (content->IsNodeOfType(nsINode::eXUL)) {
         // XUL
-        if (IsCheckboxWidgetType(aWidgetType)) {
+        if (aWidgetType == NS_THEME_CHECKBOX) {
           if (IsChecked(aFrame))
             aState |= DFCS_CHECKED;
         }
         else
           if (IsSelected(aFrame))
             aState |= DFCS_CHECKED;
         contentState = GetContentState(aFrame, aWidgetType);
       }
@@ -2418,36 +2396,34 @@ RENDER_AGAIN:
         if (brush)
           ::FrameRect(hdc, &widgetRect, brush);
         InflateRect(&widgetRect, -1, -1);
       }
       // fall-through...
     }
     // Draw controls supported by DrawFrameControl
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_SCROLLBAR_BUTTON_UP:
     case NS_THEME_SCROLLBAR_BUTTON_DOWN:
     case NS_THEME_SCROLLBAR_BUTTON_LEFT:
     case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
     case NS_THEME_SPINNER_UP_BUTTON:
     case NS_THEME_SPINNER_DOWN_BUTTON:
     case NS_THEME_DROPDOWN_BUTTON:
     case NS_THEME_RESIZER: {
       PRInt32 oldTA;
       // setup DC to make DrawFrameControl draw correctly
       oldTA = ::SetTextAlign(hdc, TA_TOP | TA_LEFT | TA_NOUPDATECP);
       ::DrawFrameControl(hdc, &widgetRect, part, state);
       ::SetTextAlign(hdc, oldTA);
 
       // Draw focus rectangles for HTML checkboxes and radio buttons
       // XXX it'd be nice to draw these outside of the frame
-      if (focused && (IsCheckboxWidgetType(aWidgetType) || IsRadioWidgetType(aWidgetType))) {
+      if (focused && (aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_RADIO)) {
         // setup DC to make DrawFocusRect draw correctly
         POINT vpOrg;
         ::GetViewportOrgEx(hdc, &vpOrg);
         ::SetBrushOrgEx(hdc, vpOrg.x + widgetRect.left, vpOrg.y + widgetRect.top, NULL);
         PRInt32 oldColor;
         oldColor = ::SetTextColor(hdc, 0);
         // draw focus rectangle
         ::DrawFocusRect(hdc, &widgetRect);
@@ -2736,19 +2712,17 @@ nsNativeThemeWin::GetWidgetNativeDrawing
       break;
 
     // the dropdown button /almost/ renders correctly with scaling,
     // except that the graphic in the dropdown button (the downward arrow)
     // doesn't get scaled up.
     case NS_THEME_DROPDOWN_BUTTON:
     // these are definitely no; they're all graphics that don't get scaled up
     case NS_THEME_CHECKBOX:
-    case NS_THEME_CHECKBOX_SMALL:
     case NS_THEME_RADIO:
-    case NS_THEME_RADIO_SMALL:
     case NS_THEME_CHECKMENUITEM:
     case NS_THEME_RADIOMENUITEM:
     case NS_THEME_MENUCHECKBOX:
     case NS_THEME_MENURADIO:
     case NS_THEME_MENUARROW:
       return
         gfxWindowsNativeDrawing::CANNOT_DRAW_TO_COLOR_ALPHA |
         gfxWindowsNativeDrawing::CANNOT_AXIS_ALIGNED_SCALE |
--- a/widget/src/xpwidgets/nsNativeTheme.cpp
+++ b/widget/src/xpwidgets/nsNativeTheme.cpp
@@ -69,31 +69,29 @@ nsNativeTheme::GetPresShell(nsIFrame* aF
 PRInt32
 nsNativeTheme::GetContentState(nsIFrame* aFrame, PRUint8 aWidgetType)
 {
   if (!aFrame)
     return 0;
 
   PRBool isXULCheckboxRadio = 
     (aWidgetType == NS_THEME_CHECKBOX ||
-     aWidgetType == NS_THEME_CHECKBOX_SMALL ||
-     aWidgetType == NS_THEME_RADIO ||
-     aWidgetType == NS_THEME_RADIO_SMALL) &&
+     aWidgetType == NS_THEME_RADIO) &&
     aFrame->GetContent()->IsNodeOfType(nsINode::eXUL);
   if (isXULCheckboxRadio)
     aFrame = aFrame->GetParent();
 
   nsIPresShell *shell = GetPresShell(aFrame);
   if (!shell)
     return 0;
 
   PRInt32 flags = 0;
   shell->GetPresContext()->EventStateManager()->GetContentState(aFrame->GetContent(), flags);
   
-  if (isXULCheckboxRadio && (aWidgetType == NS_THEME_RADIO || aWidgetType == NS_THEME_RADIO_SMALL)) {
+  if (isXULCheckboxRadio && aWidgetType == NS_THEME_RADIO) {
     if (IsFocused(aFrame))
       flags |= NS_EVENT_STATE_FOCUS;
   }
   
   return flags;
 }
 
 PRBool