Bug 1506248 - Backout bug 1498898 (0a63507e990c) since bug 1503272 makes it unnecessary now. r=stransky
authorMike Conley <mconley@mozilla.com>
Mon, 12 Nov 2018 12:16:22 +0000
changeset 446043 42ea9b7ef9c6399f7b276fd8ae8f63e0e8cdbbd5
parent 446042 fe0444b43773290c07c42ff9d648db66d28f0abd
child 446044 6e2a207d1e4795c3dd1ca95796f8de890f3655f8
push id72870
push usermconley@mozilla.com
push dateTue, 13 Nov 2018 15:13:05 +0000
treeherderautoland@7c2e45e82f07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky
bugs1506248, 1498898, 1503272
milestone65.0a1
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
Bug 1506248 - Backout bug 1498898 (0a63507e990c) since bug 1503272 makes it unnecessary now. r=stransky Differential Revision: https://phabricator.services.mozilla.com/D11523
widget/gtk/nsNativeThemeGTK.cpp
widget/gtk/nsNativeThemeGTK.h
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -1141,42 +1141,28 @@ nsNativeThemeGTK::GetExtraSizeForWidget(
   gint scale = GetMonitorScaleFactor(aFrame);
   aExtra->top *= scale;
   aExtra->right *= scale;
   aExtra->bottom *= scale;
   aExtra->left *= scale;
   return true;
 }
 
-bool
-nsNativeThemeGTK::IsWidgetVisible(StyleAppearance aAppearance)
-{
-  switch (aAppearance) {
-  case StyleAppearance::MozWindowButtonBox:
-    return false;
-  default:
-    break;
-  }
-  return true;
-}
-
 NS_IMETHODIMP
 nsNativeThemeGTK::DrawWidgetBackground(gfxContext* aContext,
                                        nsIFrame* aFrame,
                                        StyleAppearance aAppearance,
                                        const nsRect& aRect,
                                        const nsRect& aDirtyRect)
 {
   GtkWidgetState state;
   WidgetNodeType gtkWidgetType;
   GtkTextDirection direction = GetTextDirection(aFrame);
   gint flags;
-
-  if (!IsWidgetVisible(aAppearance) ||
-      !GetGtkWidgetAndState(aAppearance, aFrame, gtkWidgetType, &state,
+  if (!GetGtkWidgetAndState(aAppearance, aFrame, gtkWidgetType, &state,
                             &flags)) {
     return NS_OK;
   }
 
   gfxContext* ctx = aContext;
   nsPresContext *presContext = aFrame->PresContext();
 
   gfxRect rect = presContext->AppUnitsToGfxUnits(aRect);
--- a/widget/gtk/nsNativeThemeGTK.h
+++ b/widget/gtk/nsNativeThemeGTK.h
@@ -93,17 +93,16 @@ private:
   bool GetGtkWidgetAndState(StyleAppearance aAppearance,
                             nsIFrame* aFrame,
                             WidgetNodeType& aGtkWidgetType,
                             GtkWidgetState* aState,
                             gint* aWidgetFlags);
   bool GetExtraSizeForWidget(nsIFrame* aFrame,
                              StyleAppearance aAppearance,
                              nsIntMargin* aExtra);
-  bool IsWidgetVisible(StyleAppearance aAppearance);
 
   void RefreshWidgetWindow(nsIFrame* aFrame);
   WidgetNodeType NativeThemeToGtkTheme(StyleAppearance aAppearance,
                                        nsIFrame* aFrame);
 
   uint8_t mDisabledWidgetTypes[(static_cast<size_t>(mozilla::StyleAppearance::Count) + 7) / 8];
   uint8_t mSafeWidgetStates[static_cast<size_t>(mozilla::StyleAppearance::Count) * 4]; // 32 bits per widget
   static const char* sDisabledEngines[];