Chromium Code Reviews| Index: ash/wm/window_resizer.cc |
| diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc |
| index 16070e7eaa21b9bb2048cdb2642a593b9cbcf283..51fca5b07fd6fd0589592c794241ca657a47c558 100644 |
| --- a/ash/wm/window_resizer.cc |
| +++ b/ash/wm/window_resizer.cc |
| @@ -324,6 +324,9 @@ int WindowResizer::GetWidthForDrag(const Details& details, |
| // And don't let the window go bigger than the display. |
| int max_width = Shell::GetScreen()->GetDisplayNearestWindow( |
| details.window).bounds().width(); |
| + gfx::Size max_size = details.window->delegate()->GetMaximumSize(); |
| + if (!max_size.IsEmpty()) |
|
jeremya
2012/11/15 01:12:43
Perhaps you only want to check the max width here?
koz (OOO until 15th September)
2012/11/15 02:46:13
Good catch. Fixed here and below.
|
| + max_width = std::min(max_width, max_size.width()); |
| if (width > max_width) { |
| width = max_width; |
| *delta_x = -x_multiplier * (details.initial_bounds_in_parent.width() - |
| @@ -354,6 +357,9 @@ int WindowResizer::GetHeightForDrag(const Details& details, |
| // And don't let the window go bigger than the display. |
| int max_height = Shell::GetScreen()->GetDisplayNearestWindow( |
| details.window).bounds().height(); |
| + gfx::Size max_size = details.window->delegate()->GetMaximumSize(); |
| + if (!max_size.IsEmpty()) |
| + max_height = std::min(max_height, max_size.height()); |
| if (height > max_height) { |
| height = max_height; |
| *delta_y = -y_multiplier * (details.initial_bounds_in_parent.height() - |