Bug 1239683 - Replace NS_UNCONSTRAINEDSIZE with NS_MAXSIZE in windows/nsWindow.cpp. r=mats

This commit is contained in:
Ryan VanderMeulen 2016-01-14 14:46:29 -05:00
parent 84319afca9
commit 72778193b3

View File

@ -133,7 +133,6 @@
#include "mozilla/WindowsVersion.h"
#include "mozilla/TextEvents.h" // For WidgetKeyboardEvent
#include "nsThemeConstants.h"
#include "nsIFrame.h"
#include "nsIGfxInfo.h"
#include "nsUXThemeConstants.h"
@ -1425,16 +1424,16 @@ nsWindow::GetSizeConstraints()
}
scale /= mSizeConstraintsScale;
SizeConstraints c = mSizeConstraints;
if (c.mMinSize.width != NS_UNCONSTRAINEDSIZE) {
if (c.mMinSize.width != NS_MAXSIZE) {
c.mMinSize.width = NSToIntRound(c.mMinSize.width * scale);
}
if (c.mMinSize.height != NS_UNCONSTRAINEDSIZE) {
if (c.mMinSize.height != NS_MAXSIZE) {
c.mMinSize.height = NSToIntRound(c.mMinSize.height * scale);
}
if (c.mMaxSize.width != NS_UNCONSTRAINEDSIZE) {
if (c.mMaxSize.width != NS_MAXSIZE) {
c.mMaxSize.width = NSToIntRound(c.mMaxSize.width * scale);
}
if (c.mMaxSize.height != NS_UNCONSTRAINEDSIZE) {
if (c.mMaxSize.height != NS_MAXSIZE) {
c.mMaxSize.height = NSToIntRound(c.mMaxSize.height * scale);
}
return c;