diff options
author | agable@chromium.org <agable@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 22:59:59 +0000 |
---|---|---|
committer | agable@chromium.org <agable@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 22:59:59 +0000 |
commit | 58986e857151eae1357bdf12cb5897ad166f7acf (patch) | |
tree | 3761c51917cee29c9fe3458da0ee6fd0bb903739 /chrome/browser/ui/cocoa/version_independent_window.mm | |
parent | ff9946689eb4f04f6e20febe4c3e85949f9b67af (diff) | |
download | chromium_src-58986e857151eae1357bdf12cb5897ad166f7acf.zip chromium_src-58986e857151eae1357bdf12cb5897ad166f7acf.tar.gz chromium_src-58986e857151eae1357bdf12cb5897ad166f7acf.tar.bz2 |
Revert of mac: Fix tab dragging visual bug in Yosemite. (reland) (https://codereview.chromium.org/393933003/)
Reason for revert:
Broke TestActivate and TestFullscreen on Mac 10.6 Tests (http://build.chromium.org/p/chromium.mac/builders/Mac10.6%20Tests%20%282%29/builds/53658)
Original issue's description:
> mac: Fix tab dragging visual bug in Yosemite. (reland)
>
> -----------------Reland Description------------------
> Core animation was turned on in M35. The fullscreen window was not layer
> backed, but should have been. This original CL exposed this bug.
>
> -----------------Original Description------------------
> In OSX 10.10+, all views must be added to the NSWindow's contentView. Some
> views (like the tab strip and the profile icon) are placed on top of the title
> bar and require special treatment. All other views are added as subviews of
> 'chromeContentView' in TabWindowController. This allows tab dragging and
> fullscreen logic to easily move the views that don't need special treatment.
>
> This CL also removes the instances where a VersionIndependentWindow's
> contentView gets replaced by setContentView:. Instead, the 'chromeContentView'
> gets passed around as a subview. This allows VersionIndependentWindow to remove
> another of its internal hacks.
>
> Original CL link: https://codereview.chromium.org/379293003/
> BUG=392239
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283456
TBR=andresantoso@chromium.org,shess@chromium.org,erikchen@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=392239
Review URL: https://codereview.chromium.org/398903003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/version_independent_window.mm')
-rw-r--r-- | chrome/browser/ui/cocoa/version_independent_window.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/version_independent_window.mm b/chrome/browser/ui/cocoa/version_independent_window.mm index 98dacb3..24284a4 100644 --- a/chrome/browser/ui/cocoa/version_independent_window.mm +++ b/chrome/browser/ui/cocoa/version_independent_window.mm @@ -32,6 +32,12 @@ [super setFrameSize:size]; } +// The contentView gets moved around during certain full-screen operations. +// This is less than ideal, and should eventually be removed. +- (void)viewDidMoveToSuperview { + [self setFrame:[[self superview] bounds]]; +} + @end @implementation NSWindow (VersionIndependentWindow) @@ -73,8 +79,8 @@ chromeWindowView_.reset([[FullSizeContentView alloc] init]); [chromeWindowView_ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [self setContentView:chromeWindowView_]; [chromeWindowView_ setFrame:[[[self contentView] superview] bounds]]; + [self setContentView:chromeWindowView_]; } } return self; |