Bug 1306332 - Don't set a maximum size on the native window if SetSizeConstraints is called with magical "unconstrained" values. r=karlt

MozReview-Commit-ID: DdHrNjmxHQJ

--HG--
extra : rebase_source : 23df78e62082691ce9a73535a24114c91c365dfe
This commit is contained in:
Markus Stange 2016-10-03 15:29:34 -04:00
Родитель 4addf0c4b3
Коммит 5f8c7d9f79
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -1044,7 +1044,14 @@ void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints)
geometry.max_height = DevicePixelsToGdkCoordRoundDown( geometry.max_height = DevicePixelsToGdkCoordRoundDown(
mSizeConstraints.mMaxSize.height); mSizeConstraints.mMaxSize.height);
uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; uint32_t hints = 0;
if (aConstraints.mMinSize != LayoutDeviceIntSize(0, 0)) {
hints |= GDK_HINT_MIN_SIZE;
}
if (aConstraints.mMaxSize !=
LayoutDeviceIntSize(NS_MAXSIZE, NS_MAXSIZE)) {
hints |= GDK_HINT_MAX_SIZE;
}
gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr,
&geometry, GdkWindowHints(hints)); &geometry, GdkWindowHints(hints));
} }