From 6b12c10255094d0255b8ac8e757786ad2430d597 Mon Sep 17 00:00:00 2001 From: "rohitrao@chromium.org" Date: Thu, 7 Oct 2010 16:03:09 +0000 Subject: [Mac] Set the TabContentsViewCocoa's resizing mask at creation time. It is better to set this mask once, at creation, rather than scattered about the code at insertion time. BUG=None TEST=Browser window should still resize properly. Review URL: http://codereview.chromium.org/3564019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61793 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/tab_contents_controller.mm | 2 -- chrome/browser/tab_contents/tab_contents_view_mac.mm | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm index 1ff7721..527d2c0 100644 --- a/chrome/browser/cocoa/tab_contents_controller.mm +++ b/chrome/browser/cocoa/tab_contents_controller.mm @@ -53,8 +53,6 @@ [contentsContainer replaceSubview:[subviews objectAtIndex:0] with:contentsNativeView]; } - [contentsNativeView setAutoresizingMask:NSViewWidthSizable| - NSViewHeightSizable]; } // Returns YES if the tab represented by this controller is the front-most. diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 9085525..f19c0a4 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -80,6 +80,7 @@ TabContentsViewMac::~TabContentsViewMac() { void TabContentsViewMac::CreateView(const gfx::Size& initial_size) { TabContentsViewCocoa* view = [[TabContentsViewCocoa alloc] initWithTabContentsViewMac:this]; + [view setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; cocoa_view_.reset(view); } -- cgit v1.1