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

Issue 646703002: mac: Use a full-size content view (reland 1). (Closed)

Created:
6 years, 2 months ago by erikchen
Modified:
6 years, 2 months ago
Reviewers:
Avi (use Gerrit), Andre
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/9fa914507cbcce4fb7f05501106d0a5183d3dff9 Cr-Commit-Position: refs/heads/master@{#299168}

Patch Set 1 : Clone of patch set 7 from https://codereview.chromium.org/609833003/. #

Patch Set 2 : Fix interaction with tabStripBackgroundView. Add tests. #

Total comments: 12

Patch Set 3 : Comments from andre. #

Total comments: 2

Patch Set 4 : Comments from andre. #

Total comments: 7

Patch Set 5 : Comments from andre. #

Total comments: 2

Patch Set 6 : Comments from avi. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -364 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.mm View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 1 2 3 4 5 3 chunks +120 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 2 6 chunks +19 lines, -20 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_unittest.mm View 4 chunks +52 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/framed_browser_window.mm View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/fullscreen_window.mm View 1 chunk +1 line, -0 lines 0 comments Download
D chrome/browser/ui/cocoa/presentation_mode_controller_unittest.mm View 1 chunk +0 lines, -228 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_window_controller.h View 1 3 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_window_controller.mm View 1 2 8 chunks +42 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/version_independent_window.h View 2 chunks +12 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/version_independent_window.mm View 4 chunks +19 lines, -43 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.cc View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
erikchen
andre: Please review. https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_private.mm File chrome/browser/ui/cocoa/browser_window_controller_private.mm (right): https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_private.mm#newcode322 chrome/browser/ui/cocoa/browser_window_controller_private.mm:322: [self insertTabStripBackgroundViewIntoWindow:destWindow]; I assume this was ...
6 years, 2 months ago (2014-10-09 21:24:39 UTC) #3
Andre
https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode255 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:255: std::vector<NSView*> exceptions; How about something like this, NSArray* exceptions ...
6 years, 2 months ago (2014-10-09 23:15:49 UTC) #4
erikchen
andresantoso: PTAL https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/240001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode255 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:255: std::vector<NSView*> exceptions; On 2014/10/09 23:15:48, Andre wrote: ...
6 years, 2 months ago (2014-10-10 00:47:46 UTC) #6
Andre
https://codereview.chromium.org/646703002/diff/420001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/420001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode292 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:292: CheckViewsDoNotObscure([[[view window] contentView] superview]); I still think it is ...
6 years, 2 months ago (2014-10-10 04:37:14 UTC) #7
erikchen
andresantoso: PTAL https://codereview.chromium.org/646703002/diff/420001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/420001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode292 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:292: CheckViewsDoNotObscure([[[view window] contentView] superview]); On 2014/10/10 04:37:13, ...
6 years, 2 months ago (2014-10-10 17:38:08 UTC) #8
Andre
lgtm https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode89 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:89: private: DISALLOW_COPY_AND_ASSIGN https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode133 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:133: if (view == exposed_view_) ...
6 years, 2 months ago (2014-10-10 18:08:50 UTC) #9
Andre
lgtm
6 years, 2 months ago (2014-10-10 18:08:52 UTC) #10
erikchen
avi: Please review.
6 years, 2 months ago (2014-10-10 18:11:00 UTC) #12
erikchen
avi: Oops, failed to see andre's first lgtm. Need 5 min to respond to his ...
6 years, 2 months ago (2014-10-10 18:11:41 UTC) #13
erikchen
https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode89 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:89: private: On 2014/10/10 18:08:49, Andre wrote: > DISALLOW_COPY_AND_ASSIGN Done. ...
6 years, 2 months ago (2014-10-10 18:19:11 UTC) #14
erikchen
avi: Please review.
6 years, 2 months ago (2014-10-10 18:21:49 UTC) #15
Andre
https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/520001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode133 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:133: if (view == exposed_view_) { On 2014/10/10 18:19:11, erikchen ...
6 years, 2 months ago (2014-10-10 18:22:20 UTC) #16
Avi (use Gerrit)
lgtm https://codereview.chromium.org/646703002/diff/610001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/610001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode152 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:152: // flag is set to false. Weird wrapping.
6 years, 2 months ago (2014-10-10 18:30:29 UTC) #17
erikchen
https://codereview.chromium.org/646703002/diff/610001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm File chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm (right): https://codereview.chromium.org/646703002/diff/610001/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm#newcode152 chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm:152: // flag is set to false. On 2014/10/10 18:30:29, ...
6 years, 2 months ago (2014-10-10 18:33:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/646703002/690001
6 years, 2 months ago (2014-10-10 18:34:54 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:690001)
6 years, 2 months ago (2014-10-10 19:56:51 UTC) #21
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 19:57:29 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9fa914507cbcce4fb7f05501106d0a5183d3dff9
Cr-Commit-Position: refs/heads/master@{#299168}

Powered by Google App Engine
This is Rietveld 408576698