diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 15:17:06 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 15:17:06 +0000 |
commit | 7f1cb244394882a0ab0f11e67f22b87885d8ba20 (patch) | |
tree | aedd236c775891c9f869379cd30088a97de20a8c /chrome | |
parent | 7b8d865ce5fdf99d3ee8e3ce48f17139840f0009 (diff) | |
download | chromium_src-7f1cb244394882a0ab0f11e67f22b87885d8ba20.zip chromium_src-7f1cb244394882a0ab0f11e67f22b87885d8ba20.tar.gz chromium_src-7f1cb244394882a0ab0f11e67f22b87885d8ba20.tar.bz2 |
[Mac] Disable autoresizing of subviews when going into and out of fullscreen
mode. This will prevent spurious renderer resizes and reduce flicker.
BUG=http://crbug.com/21666
TEST=Layout of www.google.com should not be messed up after exiting fullscreen
mode.
Review URL: http://codereview.chromium.org/210011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index 9700691..3aeb91d 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -910,6 +910,9 @@ willPositionSheet:(NSWindow*)sheet if (fullscreen) { // Move content to a new fullscreen window NSView* content = [[self window] contentView]; + // Disable autoresizing of subviews while we move views around. This + // prevents spurious renderer resizes. + [content setAutoresizesSubviews:NO]; fullscreen_window_.reset([[self fullscreenWindow] retain]); [content removeFromSuperview]; [fullscreen_window_ setContentView:content]; @@ -919,16 +922,21 @@ willPositionSheet:(NSWindow*)sheet [self adjustUIForFullscreen:fullscreen]; // Show one window, hide the other. [fullscreen_window_ makeKeyAndOrderFront:self]; + [content setAutoresizesSubviews:YES]; [content setNeedsDisplay:YES]; [window_ orderOut:self]; } else { NSView* content = [fullscreen_window_ contentView]; + // Disable autoresizing of subviews while we move views around. This + // prevents spurious renderer resizes. + [content setAutoresizesSubviews:NO]; [content removeFromSuperview]; [window_ setContentView:content]; [self setWindow:window_.get()]; // This call triggers a relayout, so it needs to come after we move the // contentview to the new window. [self adjustUIForFullscreen:fullscreen]; + [content setAutoresizesSubviews:YES]; [content setNeedsDisplay:YES]; // With this call, valgrind yells at me about "Conditional jump or |