Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| index f349fbb93ce698c980bd96a6ada90c07f1bbde95..e145477d3cc3d4921a7bc1475dc022123af4d3c2 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| @@ -838,6 +838,19 @@ using content::WebContents; |
| NSRect windowFrame = [window frame]; |
| NSRect workarea = [[window screen] visibleFrame]; |
| + // Prevent the window from growing smaller than its minimum height: |
| + // http://crbug.com/230400 . |
| + if (deltaH < 0) { |
| + NSSize minWindowSize = [window minSize]; |
|
Avi (use Gerrit)
2015/04/15 04:27:26
Might as well do
CGFloat minWindowHeight = [windo
shrike
2015/04/15 17:01:33
Agreed.
|
| + if (windowFrame.size.height + deltaH < minWindowSize.height) { |
| + // |deltaH| + |windowFrame.size.height| = |minWindowSize.height|. |
| + deltaH = minWindowSize.height - windowFrame.size.height; |
| + } |
| + if (deltaH == 0) { |
| + return NO; |
| + } |
| + } |
| + |
| // If the window is not already fully in the workarea, do not adjust its frame |
| // at all. |
| if (!NSContainsRect(workarea, windowFrame)) |