Commit b733d244 authored by erikchen@chromium.org's avatar erikchen@chromium.org

Mac: Fix a recently introduced layering bug.

The code made assumptions about whether the window's root view was layer
backed. The CL that introduced the bug:
https://codereview.chromium.org/390503003/

BUG=NONE

Review URL: https://codereview.chromium.org/481273002

Cr-Commit-Position: refs/heads/master@{#291188}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291188 0039d316-1c4b-4281-b951-d872f2087c98
parent 72de2f77
......@@ -168,6 +168,9 @@ class Command;
// The Extension Command Registry used to determine which keyboard events to
// handle.
scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
// Whether the root view of the window is layer backed.
BOOL windowViewWantsLayer_;
}
// A convenience class method which gets the |BrowserWindowController| for a
......
......@@ -683,6 +683,7 @@ willPositionSheet:(NSWindow*)sheet
// Leaving wantsLayer on for the duration of presentation mode causes
// performance issues when the dropdown is animated in/out. It also does
// not seem to be required for the exit animation.
windowViewWantsLayer_ = [[[self window] cr_windowView] wantsLayer];
[[[self window] cr_windowView] setWantsLayer:YES];
}
NSView* contentView = [[self window] contentView];
......@@ -920,7 +921,7 @@ willPositionSheet:(NSWindow*)sheet
[self showFullscreenExitBubbleIfNecessary];
browser_->WindowFullscreenStateChanged();
[[[self window] cr_windowView] setWantsLayer:NO];
[[[self window] cr_windowView] setWantsLayer:windowViewWantsLayer_];
[self updateRoundedBottomCorners];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment