Index: chrome/browser/ui/cocoa/html_dialog_window_controller.mm |
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm |
index f4ac3af1507a6e1ed1ff2cae9719037ea7972ce4..d328a03804c63c1d640ffd8d4d589ac5dca6ceca 100644 |
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm |
@@ -258,11 +258,8 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent( |
gfx::Size dialogSize; |
delegate->GetDialogSize(&dialogSize); |
NSRect dialogRect = NSMakeRect(0, 0, dialogSize.width(), dialogSize.height()); |
- // TODO(akalin): Make the window resizable (but with the minimum size being |
- // dialog_size and always on top (but not modal) to match the Windows |
- // behavior. On the other hand, the fact that HTML dialogs on Windows |
- // are resizable could just be an accident. Investigate futher... |
- NSUInteger style = NSTitledWindowMask | NSClosableWindowMask; |
+ NSUInteger style = NSTitledWindowMask | NSClosableWindowMask | |
+ NSResizableWindowMask; |
scoped_nsobject<ChromeEventProcessingWindow> window( |
[[ChromeEventProcessingWindow alloc] |
initWithContentRect:dialogRect |
@@ -279,6 +276,7 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent( |
[window setWindowController:self]; |
[window setDelegate:self]; |
[window setTitle:base::SysUTF16ToNSString(delegate->GetDialogTitle())]; |
+ [window setMinSize:dialogRect.size]; |
[window center]; |
delegate_.reset(new HtmlDialogWindowDelegateBridge(self, profile, delegate)); |
return self; |