Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE.

This commit is contained in:
Gurzau Raul 2019-08-28 17:15:26 +03:00
Родитель ad32ef1d9a
Коммит 6321d98bb4
1 изменённых файлов: 2 добавлений и 13 удалений

Просмотреть файл

@ -6577,22 +6577,11 @@ void nsWindow::SetDrawsInTitlebar(bool aState) {
}
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();
}