Backed out changeset 84302aebbe43 (bug 1573813) for failing mochitest jobs on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Thu, 12 Sep 2019 18:35:47 +0300
changeset 492845 259ebccb8ae8529c35098445b1583bdbba403f78
parent 492844 1af08cc97756b0d4d60a47c76b0b56e971d9662f
child 492846 1f0a09043c26c8d315273e22f08b9a3bdd5762a0
push id95189
push userrgurzau@mozilla.com
push dateThu, 12 Sep 2019 15:36:48 +0000
treeherderautoland@259ebccb8ae8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1573813
milestone71.0a1
backs out84302aebbe43e2ed1ebb9201ca76b11aa5650599
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
Backed out changeset 84302aebbe43 (bug 1573813) for failing mochitest jobs on a CLOSED TREE.
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6584,32 +6584,21 @@ void nsWindow::SetDrawsInTitlebar(bool a
       UpdateTitlebarTransparencyBitmap();
     } else {
       ClearTransparencyBitmap();
     }
   }
 }
 
 gint nsWindow::GdkScaleFactor() {
-  // For popup windows with parent window we need to get scale factor of the
-  // parent window. Otherwise the scale factor of the popup is not updated
-  // during it's hidden.
-  GdkWindow* scaledGdkWindow = mGdkWindow;
-  if (mWindowType == eWindowType_popup && mToplevelParentWindow) {
-    scaledGdkWindow = gtk_widget_get_window(GTK_WIDGET(mToplevelParentWindow));
-    // Fallback for windows which parent has been unrealized.
-    if (!scaledGdkWindow) {
-      scaledGdkWindow = mGdkWindow;
-    }
-  }
   // Available as of GTK 3.10+
   static auto sGdkWindowGetScaleFactorPtr =
       (gint(*)(GdkWindow*))dlsym(RTLD_DEFAULT, "gdk_window_get_scale_factor");
-  if (sGdkWindowGetScaleFactorPtr && scaledGdkWindow)
-    return (*sGdkWindowGetScaleFactorPtr)(scaledGdkWindow);
+  if (sGdkWindowGetScaleFactorPtr && mGdkWindow)
+    return (*sGdkWindowGetScaleFactorPtr)(mGdkWindow);
   return ScreenHelperGTK::GetGTKMonitorScaleFactor();
 }
 
 gint nsWindow::DevicePixelsToGdkCoordRoundUp(int pixels) {
   gint scale = GdkScaleFactor();
   return (pixels + scale - 1) / scale;
 }