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

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

Issue 379293003: mac: Fix tab dragging visual bug in Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set the frame of the chromeContentView when adding it as a subview. Created 6 years, 5 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/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index e1b7885bd2a795e90f310c1899a97478ede4af75..f701c6f5b01ea213a58610072945baa6207af24e 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -566,13 +566,10 @@ willPositionSheet:(NSWindow*)sheet
[tabStripView removeFromSuperview];
}
- // Ditto for the content view.
- base::scoped_nsobject<NSView> contentView(
- [[sourceWindow contentView] retain]);
// Disable autoresizing of subviews while we move views around. This prevents
// spurious renderer resizes.
- [contentView setAutoresizesSubviews:NO];
- [contentView removeFromSuperview];
+ [self.chromeContentView setAutoresizesSubviews:NO];
+ [self.chromeContentView removeFromSuperview];
// Have to do this here, otherwise later calls can crash because the window
// has no delegate.
@@ -584,8 +581,11 @@ willPositionSheet:(NSWindow*)sheet
// drawOverlayRect:]. I'm pretty convinced this is an Apple bug, but there is
// no visual impact. I have been unable to tickle it away with other window
// or view manipulation Cocoa calls. Stack added to suppressions_mac.txt.
- [contentView setAutoresizesSubviews:YES];
- [destWindow setContentView:contentView];
+ [self.chromeContentView setAutoresizesSubviews:YES];
+ [[destWindow contentView] addSubview:self.chromeContentView
+ positioned:NSWindowBelow
+ relativeTo:nil];
+ self.chromeContentView.frame = [[destWindow contentView] bounds];
// Move the incognito badge if present.
if ([self shouldShowAvatar]) {
@@ -852,7 +852,7 @@ willPositionSheet:(NSWindow*)sheet
for (NSWindow* window in [[NSApplication sharedApplication] windows]) {
if ([window
isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) {
- [window.contentView setHidden:YES];
+ [[window contentView] setHidden:YES];
}
}
}
@@ -930,7 +930,7 @@ willPositionSheet:(NSWindow*)sheet
}
- (void)updateSubviewZOrder:(BOOL)inPresentationMode {
- NSView* contentView = [[self window] contentView];
+ NSView* contentView = self.chromeContentView;
NSView* toolbarView = [toolbarController_ view];
if (inPresentationMode) {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698