Chromium Code Reviews| Index: chrome/browser/ui/cocoa/full_size_content_window.mm |
| diff --git a/chrome/browser/ui/cocoa/full_size_content_window.mm b/chrome/browser/ui/cocoa/full_size_content_window.mm |
| index eddf7f4da1d0e43fc21445e9e28ce0015f547f29..459a5ef5d40981320bf2cf1d23449db43373056c 100644 |
| --- a/chrome/browser/ui/cocoa/full_size_content_window.mm |
| +++ b/chrome/browser/ui/cocoa/full_size_content_window.mm |
| @@ -9,6 +9,7 @@ |
| #include "base/auto_reset.h" |
| #include "base/logging.h" |
| #include "base/mac/foundation_util.h" |
| +#include "base/mac/mac_util.h" |
| #include "base/mac/scoped_objc_class_swizzler.h" |
| @interface FullSizeContentWindow () |
| @@ -139,20 +140,22 @@ static IMP g_original_callstacksymbols_implementation; |
| [self setContentView:chromeWindowView_]; |
| [chromeWindowView_ setFrame:[[chromeWindowView_ superview] bounds]]; |
| - // Our content view overlaps the window control buttons, so we must ensure |
| - // it is positioned below the buttons. |
| - NSView* superview = [chromeWindowView_ superview]; |
| - [chromeWindowView_ removeFromSuperview]; |
| + if (base::mac::IsAtMostOS10_10()) { |
| + // Our content view overlaps the window control buttons, so we must |
| + // ensureit is positioned below the buttons. |
|
erikchen
2016/09/20 23:07:47
s/ensureit/ensure it/
shrike
2016/09/20 23:27:17
Done.
|
| + NSView* superview = [chromeWindowView_ superview]; |
| + [chromeWindowView_ removeFromSuperview]; |
| - // Prevent the AppKit from generating a backtrace to include in it's |
| - // complaint about our upcoming call to addSubview:positioned:relativeTo:. |
| - // See +load for more info. |
| - base::AutoReset<bool> disable_symbolication(&g_disable_callstacksymbols, |
| - true); |
| + // Prevent the AppKit from generating a backtrace to include in it's |
| + // complaint about our upcoming call to |
| + // addSubview:positioned:relativeTo:. See +load for more info. |
| + base::AutoReset<bool> disable_symbolication(&g_disable_callstacksymbols, |
| + true); |
| - [superview addSubview:chromeWindowView_ |
| - positioned:NSWindowBelow |
| + [superview addSubview:chromeWindowView_ |
| + positioned:NSWindowBelow |
| relativeTo:nil]; |
| + } |
| } |
| } |
| return self; |