Only expand maximum size constraint if there was a constraint originally (#13003)

This commit is contained in:
Heilig Benedek 2018-05-21 02:56:45 +02:00 committed by Samuel Attard
parent 156a97b80d
commit 8b2bffcf9e

View file

@ -288,7 +288,9 @@ gfx::Size NativeWindow::GetContentMinimumSize() const {
gfx::Size NativeWindow::GetContentMaximumSize() const {
gfx::Size maximum_size = GetContentSizeConstraints().GetMaximumSize();
#if defined(OS_WIN)
return GetExpandedWindowSize(this, maximum_size);
return GetContentSizeConstraints().HasMaximumSize()
? GetExpandedWindowSize(this, maximum_size)
: maximum_size;
#else
return maximum_size;
#endif