mac: Use a full-size content view (reland 1).
commit9fa914507cbcce4fb7f05501106d0a5183d3dff9
authorerikchen <erikchen@chromium.org>
Fri, 10 Oct 2014 19:56:44 +0000 (10 12:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Oct 2014 19:56:54 +0000 (10 19:56 +0000)
tree733a7c20de8c5138ac0d103c92456ed2c3176137
parent22c781e61a21d95a102e0e72c76f05c2bbe58093
mac: Use a full-size content view (reland 1).

The original attempt to land the CL incorrectly interacted with another
recently landed CL that added the tabStripBackgroundView
(https://codereview.chromium.org/611453004). This CL was causing that view to
become layer backed, which caused it to draw on top of non-layer backed window
content, including the window controls.

This reland reworks the logic so that the tabStripBackgroundView is added to
the root view and does not become layer backed. This reland also updates
browser_tests to catch similar such errors in the future.

--------------Original CL Description---------------
Make the window's contentView have the same size as the window itself. Adjust
the view hierarchy so that Chrome does not add subviews directly to the root
view.

By default, the contentView does not occupy the full size of a framed window.
Chrome still wants to draw in the title bar. Historically, Chrome has done this
by adding subviews directly to the root view. This causes several problems. The
most egregious is related to layer ordering when the root view does not have a
layer. By making the window's contentView full-sized, there is no longer any
need to add subviews to the root view.

I deleted the tests in presentation_mode_controller_unittest.mm since they were
layout tests for the browser_window_controller, but the tests in
browser_window_layout_unittest.mm are both more robust and more comprehensive.

I fixed a bug in moveViewsForImmersiveFullscreen:... where the tabStripView was
being added to the source window rather than the destination window.

This CL is mostly a reland of https://codereview.chromium.org/399803002/.

Original CL Committed: https://crrev.com/746dbb9cfefaac243704956db431ff9bb9b0485b
Original CL Cr-Commit-Position: refs/heads/master@{#298584}

BUG=417923

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

Cr-Commit-Position: refs/heads/master@{#299168}
14 files changed:
chrome/browser/ui/cocoa/browser_window_controller.mm
chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
chrome/browser/ui/cocoa/browser_window_controller_private.mm
chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
chrome/browser/ui/cocoa/framed_browser_window.mm
chrome/browser/ui/cocoa/fullscreen_window.mm
chrome/browser/ui/cocoa/presentation_mode_controller_unittest.mm [deleted file]
chrome/browser/ui/cocoa/tabs/tab_window_controller.h
chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
chrome/browser/ui/cocoa/version_independent_window.h
chrome/browser/ui/cocoa/version_independent_window.mm
chrome/chrome_tests_unit.gypi
chrome/common/chrome_switches.cc
chrome/common/chrome_switches.h