Backout changeset af5273034fdf (bug 871264), which doesn't compile (didn't fix nsRangeFrame.cpp (and possibly others).
authorL. David Baron <dbaron@dbaron.org>
Mon, 13 May 2013 17:28:47 -0700
changeset 131834 abc9d00d1025eb46c15a6340b03a5cccd2280be5
parent 131833 e9e0810ff90c5b8afc1879cda35d9a009676c0a0
child 131835 3e8d566542d8842c34661648cba22b823e692b53
push id24672
push useremorley@mozilla.com
push dateTue, 14 May 2013 12:24:29 +0000
treeherdermozilla-central@820f28f1f2ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs871264
milestone24.0a1
backs outaf5273034fdf9b99556f4dc1e6b0b6162b2085d4
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
Backout changeset af5273034fdf (bug 871264), which doesn't compile (didn't fix nsRangeFrame.cpp (and possibly others).
gfx/src/nsITheme.h
layout/forms/nsButtonFrameRenderer.cpp
layout/forms/nsComboboxControlFrame.cpp
widget/cocoa/nsNativeThemeCocoa.h
widget/cocoa/nsNativeThemeCocoa.mm
widget/gtk2/nsNativeThemeGTK.cpp
widget/gtk2/nsNativeThemeGTK.h
widget/qt/nsNativeThemeQt.cpp
widget/qt/nsNativeThemeQt.h
widget/windows/nsNativeThemeWin.cpp
widget/windows/nsNativeThemeWin.h
--- a/gfx/src/nsITheme.h
+++ b/gfx/src/nsITheme.h
@@ -148,17 +148,19 @@ public:
                                      nsIFrame* aFrame,
                                      uint8_t aWidgetType)=0;
 
   virtual bool WidgetIsContainer(uint8_t aWidgetType)=0;
 
   /**
    * Does the nsITheme implementation draw its own focus ring for this widget?
    */
-  virtual bool ThemeDrawsFocusForWidget(uint8_t aWidgetType)=0;
+  virtual bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
+                                          nsIFrame* aFrame,
+                                          uint8_t aWidgetType)=0;
   
   /**
     * Should we insert a dropmarker inside of combobox button?
    */
   virtual bool ThemeNeedsComboboxDropmarker()=0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsITheme, NS_ITHEME_IID)
--- a/layout/forms/nsButtonFrameRenderer.cpp
+++ b/layout/forms/nsButtonFrameRenderer.cpp
@@ -163,17 +163,17 @@ void nsDisplayButtonBorderBackground::Pa
 }
 
 void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder,
                                       nsRenderingContext* aCtx)
 {
   nsPresContext *presContext = mFrame->PresContext();
   const nsStyleDisplay *disp = mFrame->StyleDisplay();
   if (!mFrame->IsThemed(disp) ||
-      !presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) {
+      !presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, mFrame, disp->mAppearance)) {
     // draw the focus and outline borders
     nsRect r = nsRect(ToReferenceFrame(), mFrame->GetSize());
     mBFR->PaintOutlineAndFocusBorders(presContext, *aCtx, mVisibleRect, r);
   }
 }
 
 nsresult
 nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -1531,17 +1531,17 @@ nsComboboxControlFrame::BuildDisplayList
   // draw a focus indicator only when focus rings should be drawn
   nsIDocument* doc = mContent->GetCurrentDoc();
   if (doc) {
     nsPIDOMWindow* window = doc->GetWindow();
     if (window && window->ShouldShowFocusRing()) {
       nsPresContext *presContext = PresContext();
       const nsStyleDisplay *disp = StyleDisplay();
       if ((!IsThemed(disp) ||
-           !presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) &&
+           !presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) &&
           mDisplayFrame && IsVisibleForPainting(aBuilder)) {
         aLists.Content()->AppendNewToTop(
           new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
       }
     }
   }
 
   DisplaySelectionOverlay(aBuilder, aLists.Content());
--- a/widget/cocoa/nsNativeThemeCocoa.h
+++ b/widget/cocoa/nsNativeThemeCocoa.h
@@ -52,17 +52,17 @@ public:
   NS_IMETHOD GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* aFrame,
                                   uint8_t aWidgetType,
                                   nsIntSize* aResult, bool* aIsOverridable);
   NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType, 
                                 nsIAtom* aAttribute, bool* aShouldRepaint);
   NS_IMETHOD ThemeChanged();
   bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
   bool WidgetIsContainer(uint8_t aWidgetType);
-  bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
+  bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
   bool ThemeNeedsComboboxDropmarker();
   virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType);
 
   void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
                     bool inIsIndeterminate, bool inIsHorizontal,
                     double inValue, double inMaxValue, nsIFrame* aFrame);
 
 protected:  
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -3063,17 +3063,17 @@ nsNativeThemeCocoa::WidgetIsContainer(ui
    case NS_THEME_RANGE:
     return false;
     break;
   }
   return true;
 }
 
 bool
-nsNativeThemeCocoa::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
+nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
 {
   if (aWidgetType == NS_THEME_DROPDOWN ||
       aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||
       aWidgetType == NS_THEME_BUTTON ||
       aWidgetType == NS_THEME_RADIO ||
       aWidgetType == NS_THEME_RANGE ||
       aWidgetType == NS_THEME_CHECKBOX)
     return true;
--- a/widget/gtk2/nsNativeThemeGTK.cpp
+++ b/widget/gtk2/nsNativeThemeGTK.cpp
@@ -1445,17 +1445,17 @@ nsNativeThemeGTK::WidgetIsContainer(uint
       aWidgetType == NS_THEME_BUTTON_ARROW_DOWN ||
       aWidgetType == NS_THEME_BUTTON_ARROW_NEXT ||
       aWidgetType == NS_THEME_BUTTON_ARROW_PREVIOUS)
     return false;
   return true;
 }
 
 bool
-nsNativeThemeGTK::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
+nsNativeThemeGTK::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
 {
    if (aWidgetType == NS_THEME_DROPDOWN ||
       aWidgetType == NS_THEME_BUTTON || 
       aWidgetType == NS_THEME_TREEVIEW_HEADER_CELL)
     return true;
   
   return false;
 }
--- a/widget/gtk2/nsNativeThemeGTK.h
+++ b/widget/gtk2/nsNativeThemeGTK.h
@@ -49,17 +49,18 @@ public:
   NS_IMETHOD ThemeChanged();
 
   NS_IMETHOD_(bool) ThemeSupportsWidget(nsPresContext* aPresContext,
                                           nsIFrame* aFrame,
                                           uint8_t aWidgetType);
 
   NS_IMETHOD_(bool) WidgetIsContainer(uint8_t aWidgetType);
   
-  NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
+  NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
+                                               nsIFrame* aFrame, uint8_t aWidgetType);
 
   bool ThemeNeedsComboboxDropmarker();
 
   virtual Transparency GetWidgetTransparency(nsIFrame* aFrame,
                                              uint8_t aWidgetType);
 
   nsNativeThemeGTK();
   virtual ~nsNativeThemeGTK();
--- a/widget/qt/nsNativeThemeQt.cpp
+++ b/widget/qt/nsNativeThemeQt.cpp
@@ -570,17 +570,17 @@ nsNativeThemeQt::WidgetIsContainer(uint8
 //         aWidgetType == NS_THEME_CHECKBOX) {
 //         return false;
 //     }
 
    return true;
 }
 
 bool
-nsNativeThemeQt::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
+nsNativeThemeQt::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
 {
     if (aWidgetType == NS_THEME_DROPDOWN ||
         aWidgetType == NS_THEME_BUTTON || 
         aWidgetType == NS_THEME_TREEVIEW_HEADER_CELL) { 
         return true;
     }
 
     return false;
--- a/widget/qt/nsNativeThemeQt.h
+++ b/widget/qt/nsNativeThemeQt.h
@@ -53,17 +53,18 @@ public:
 
   bool WidgetIsContainer(uint8_t aWidgetType);
 
   virtual NS_HIDDEN_(bool) GetWidgetPadding(nsDeviceContext* aContext,
                                               nsIFrame* aFrame,
                                               uint8_t aWidgetType,
                                               nsIntMargin* aResult);
 
-  NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
+  NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
+                                               nsIFrame* aFrame, uint8_t aWidgetType);
 
   bool ThemeNeedsComboboxDropmarker();
 
   nsNativeThemeQt();
   virtual ~nsNativeThemeQt();
 
 private:
 
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -2577,17 +2577,17 @@ nsNativeThemeWin::WidgetIsContainer(uint
   if (aWidgetType == NS_THEME_DROPDOWN_BUTTON || 
       aWidgetType == NS_THEME_RADIO ||
       aWidgetType == NS_THEME_CHECKBOX)
     return false;
   return true;
 }
 
 bool
-nsNativeThemeWin::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
+nsNativeThemeWin::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
 {
   return false;
 }
 
 bool
 nsNativeThemeWin::ThemeNeedsComboboxDropmarker()
 {
   return true;
--- a/widget/windows/nsNativeThemeWin.h
+++ b/widget/windows/nsNativeThemeWin.h
@@ -58,17 +58,17 @@ public:
   NS_IMETHOD ThemeChanged();
 
   bool ThemeSupportsWidget(nsPresContext* aPresContext, 
                              nsIFrame* aFrame,
                              uint8_t aWidgetType);
 
   bool WidgetIsContainer(uint8_t aWidgetType);
 
-  bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
+  bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
 
   bool ThemeNeedsComboboxDropmarker();
 
   nsNativeThemeWin();
   virtual ~nsNativeThemeWin();
 
 protected:
   HANDLE GetTheme(uint8_t aWidgetType);