Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Wed, 28 Aug 2019 17:15:26 +0300
changeset 554158 3b09fca43df93b0f2ba1a1ada33053f504dfea16
parent 554157 230fc45161d843f990b2d58de509ea2e45bf2ce3
child 554159 4af7a75a66f2ac8918ef42d9da2eae4a62d7e6c5
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1573813, 1113005
milestone70.0a1
backs out9b5ceca1eedf6bbaddee2a67bf027db5c7b90404
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 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE.
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6572,32 +6572,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 (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;
 }