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

Unified Diff: chrome/browser/ui/cocoa/full_size_content_window.mm

Issue 2738623002: [Mac] Turn on Auto Layout for browser windows. (Closed)
Patch Set: Add a test. Created 3 years, 9 months 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/full_size_content_window.mm
diff --git a/chrome/browser/ui/cocoa/full_size_content_window.mm b/chrome/browser/ui/cocoa/full_size_content_window.mm
index 3b4c82b2e1e22f2dedc6816bb12a8f3748825098..481d09ebc58eaf781c62f7c94cf7515d768d24d9 100644
--- a/chrome/browser/ui/cocoa/full_size_content_window.mm
+++ b/chrome/browser/ui/cocoa/full_size_content_window.mm
@@ -33,6 +33,14 @@
@implementation FullSizeContentView
tapted 2017/03/21 02:16:51 nit: Maybe we want #pragma mark - NSView Override
Sidney San Martín 2017/03/22 21:40:22 Done.
+// Since Auto Layout and frame-based layout behave differently in small but
+// important ways (e.g. Auto Layout can restrict window resizing, frame-based
+// layout doesn't log a warning when a view's autoresizing mask can't be
+// maintained), ensure that it's on instead of letting it depend on content.
++ (BOOL)requiresConstraintBasedLayout {
+ return YES;
+}
+
// This method is directly called by AppKit during a live window resize.
// Override it to prevent the content view from shrinking.
- (void)setFrameSize:(NSSize)size {

Powered by Google App Engine
This is Rietveld 408576698