Fix for bug 420363 (Scrollbars missing due to <meta http-equiv="MSThemeCompatible" content="no">). r=mstange, sr=bzbarsky, a=beltzner.
authorJosh Aas <joshmoz@gmail.com>
Thu, 13 Nov 2008 17:52:32 +0100
changeset 21616 c299c47ffbc73d8339f12f72ff28bca00944b4e2
parent 21615 b9926411d750d5803770c64290d54844802a6eea
child 21617 8c92737298f60de7a5e5125b790364d3f598f1c1
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmstange, bzbarsky, beltzner
bugs420363
milestone1.9.1b2pre
Fix for bug 420363 (Scrollbars missing due to <meta http-equiv="MSThemeCompatible" content="no">). r=mstange, sr=bzbarsky, a=beltzner.
widget/src/cocoa/nsNativeThemeCocoa.mm
--- a/widget/src/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/src/cocoa/nsNativeThemeCocoa.mm
@@ -2009,17 +2009,20 @@ nsNativeThemeCocoa::ThemeChanged()
   return NS_OK;
 }
 
 
 PRBool 
 nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame,
                                       PRUint8 aWidgetType)
 {
-  if (aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
+  // We don't have CSS set up to render non-native scrollbars on Mac OS X so we
+  // render natively even if native theme support is disabled.
+  if (aWidgetType != NS_THEME_SCROLLBAR &&
+      aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
     return PR_FALSE;
 
   // if this is a dropdown button in a combobox the answer is always no
   if (aWidgetType == NS_THEME_DROPDOWN_BUTTON) {
     nsIFrame* parentFrame = aFrame->GetParent();
     if (parentFrame && (parentFrame->GetType() == nsWidgetAtoms::comboboxControlFrame))
       return PR_FALSE;
   }