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

Unified Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 210011: [Mac] Disable autoresizing of subviews when going into and out of fullscreen... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller.mm (revision 26362)
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy)
@@ -910,6 +910,9 @@
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 @@
[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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698