Chromium Code Reviews| Index: ui/aura/toplevel_window_event_filter.cc |
| diff --git a/ui/aura/toplevel_window_event_filter.cc b/ui/aura/toplevel_window_event_filter.cc |
| index 98d29d302ca3d7e22f83460086447e22a07668d6..5a08b7f28d06e8b759cbe415e6bd7493231da1e8 100644 |
| --- a/ui/aura/toplevel_window_event_filter.cc |
| +++ b/ui/aura/toplevel_window_event_filter.cc |
| @@ -232,10 +232,17 @@ gfx::Size ToplevelWindowEventFilter::GetSizeForDrag(int bounds_change, |
| int x_multiplier = GetXMultiplierForWindowComponent(window_component_); |
| int y_multiplier = GetYMultiplierForWindowComponent(window_component_); |
| - size.Enlarge(size_change_direction & kBoundsChangeDirection_Horizontal ? |
| - x_multiplier * (first_x - second_x) : 0, |
| - size_change_direction & kBoundsChangeDirection_Vertical ? |
| - y_multiplier * (first_y - second_y) : 0); |
| + |
| + int width = size.width() + |
| + (size_change_direction & kBoundsChangeDirection_Horizontal ? |
| + x_multiplier * (first_x - second_x) : 0); |
| + int height = size.height() + |
| + (size_change_direction & kBoundsChangeDirection_Vertical ? |
| + y_multiplier * (first_y - second_y) : 0); |
|
Ben Goodger (Google)
2011/10/14 15:40:05
insert a newline after this line
|
| + const gfx::Size min_size = target->minimum_size(); |
| + // Window should have minimum window size. |
|
Ben Goodger (Google)
2011/10/14 15:40:05
Move this comment above the previous line. Reword
|
| + size.SetSize(std::max(width, min_size.width()), |
| + std::max(height, min_size.height())); |
| } |
| return size; |
| } |