Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1487)

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm

Issue 1430023002: Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per erikchen@'s comments. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
index 3c71f00e0a19063454872beb63e876e6bea5a0f5..6e7d3f191fc0c265e3014b5379114c18de225a10 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
@@ -27,4 +27,14 @@
[super updateSheetPosition];
}
+- (void)resizeWithNewSize:(NSSize)size {
+ [customWindow_ setContentSize:size];
+
+ // self's updateSheetPosition() sets |customWindow_|'s contentSize to a
+ // fixed dialog size. Here, we want to resize to |size| instead. Use
+ // super rather than self to bypass the setContentSize() call for the fixed
+ // size.
+ [super updateSheetPosition];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698