From 923ae52658998f1f1a4d04a7e56bff5e59f81f68 Mon Sep 17 00:00:00 2001 From: "dholbert@cs.stanford.edu" Date: Wed, 3 Oct 2007 13:04:32 -0700 Subject: [PATCH] Backing out patch for Bug 396984 -- its issues will be addressed via Bug 240117. (see comments 27-28 on Bug 396984) --- layout/style/forms.css | 24 +++--------------------- widget/src/xpwidgets/nsNativeTheme.cpp | 17 ++++------------- 2 files changed, 7 insertions(+), 34 deletions(-) diff --git a/layout/style/forms.css b/layout/style/forms.css index 7c032d7d7b20..e2e8bc83e308 100644 --- a/layout/style/forms.css +++ b/layout/style/forms.css @@ -80,11 +80,7 @@ input { must be the same here, for buttons, and for . For buttons, make sure to include the -moz-focus-inner border/padding. */ padding: 0px 6px 0px 6px; -%ifdef MOZ_WIDGET_GTK2 - border: 3px outset ButtonFace; -%else border: 2px outset ButtonFace; -%endif background-color: ButtonFace; color: ButtonText; font: -moz-button; @@ -536,11 +522,7 @@ input[type="submit"][disabled] { /* The sum of border-top, border-bottom, padding-top, padding-bottom must be the same here and for text inputs */ padding: 0px 6px 0px 6px; -%ifdef MOZ_WIDGET_GTK2 - border: 3px outset ButtonFace; -%else border: 2px outset ButtonFace; -%endif color: GrayText; cursor: inherit; } diff --git a/widget/src/xpwidgets/nsNativeTheme.cpp b/widget/src/xpwidgets/nsNativeTheme.cpp index f371a8cc3bf3..43041e22be60 100644 --- a/widget/src/xpwidgets/nsNativeTheme.cpp +++ b/widget/src/xpwidgets/nsNativeTheme.cpp @@ -50,6 +50,7 @@ #include "nsThemeConstants.h" #include "nsIComponentManager.h" +nsMargin nsNativeTheme::sButtonBorderSize(2, 2, 2, 2); PRUint8 nsNativeTheme::sButtonActiveBorderStyle = NS_STYLE_BORDER_STYLE_INSET; PRUint8 nsNativeTheme::sButtonInactiveBorderStyle = NS_STYLE_BORDER_STYLE_OUTSET; nsILookAndFeel::nsColorID nsNativeTheme::sButtonBorderColorID = nsILookAndFeel::eColor_buttonface; @@ -57,36 +58,26 @@ nsILookAndFeel::nsColorID nsNativeTheme::sButtonDisabledBorderColorID = nsILookA nsILookAndFeel::nsColorID nsNativeTheme::sButtonBGColorID = nsILookAndFeel::eColor_buttonface; nsILookAndFeel::nsColorID nsNativeTheme::sButtonDisabledBGColorID = nsILookAndFeel::eColor_buttonface; +nsMargin nsNativeTheme::sTextfieldBorderSize(2, 2, 2, 2); PRUint8 nsNativeTheme::sTextfieldBorderStyle = NS_STYLE_BORDER_STYLE_INSET; nsILookAndFeel::nsColorID nsNativeTheme::sTextfieldBorderColorID = nsILookAndFeel::eColor_threedface; PRBool nsNativeTheme::sTextfieldBGTransparent = PR_FALSE; nsILookAndFeel::nsColorID nsNativeTheme::sTextfieldBGColorID = nsILookAndFeel::eColor__moz_field; nsILookAndFeel::nsColorID nsNativeTheme::sTextfieldDisabledBGColorID = nsILookAndFeel::eColor_threedface; +nsMargin nsNativeTheme::sListboxBorderSize(2, 2, 2, 2); PRUint8 nsNativeTheme::sListboxBorderStyle = NS_STYLE_BORDER_STYLE_INSET; nsILookAndFeel::nsColorID nsNativeTheme::sListboxBorderColorID = nsILookAndFeel::eColor_threedface; nsILookAndFeel::nsColorID nsNativeTheme::sListboxBGColorID = nsILookAndFeel::eColor__moz_field; nsILookAndFeel::nsColorID nsNativeTheme::sListboxDisabledBGColorID = nsILookAndFeel::eColor_threedface; +nsMargin nsNativeTheme::sComboboxBorderSize(2, 2, 2, 2); PRUint8 nsNativeTheme::sComboboxBorderStyle = NS_STYLE_BORDER_STYLE_INSET; nsILookAndFeel::nsColorID nsNativeTheme::sComboboxBorderColorID = nsILookAndFeel::eColor_threedface; PRBool nsNativeTheme::sComboboxBGTransparent = PR_FALSE; nsILookAndFeel::nsColorID nsNativeTheme::sComboboxBGColorID = nsILookAndFeel::eColor__moz_field; nsILookAndFeel::nsColorID nsNativeTheme::sComboboxDisabledBGColorID = nsILookAndFeel::eColor_threedface; -#ifdef MOZ_WIDGET_GTK2 -// Cross-platform assumptions are evil. GTK seems to give 3px border on every widget. -nsMargin nsNativeTheme::sTextfieldBorderSize(3, 3, 3, 3); -nsMargin nsNativeTheme::sListboxBorderSize(3, 3, 3, 3); -nsMargin nsNativeTheme::sComboboxBorderSize(3, 3, 3, 3); -nsMargin nsNativeTheme::sButtonBorderSize(3, 3, 3, 3); -#else -nsMargin nsNativeTheme::sTextfieldBorderSize(2, 2, 2, 2); -nsMargin nsNativeTheme::sListboxBorderSize(2, 2, 2, 2); -nsMargin nsNativeTheme::sComboboxBorderSize(2, 2, 2, 2); -nsMargin nsNativeTheme::sButtonBorderSize(2, 2, 2, 2); -#endif - nsNativeTheme::nsNativeTheme() { }