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

Issue 1685763004: Fix various issues with popup/app window layout/drawing. (Closed)

Created:
4 years, 10 months ago by Peter Kasting
Modified:
4 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@cleanup
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix various issues with popup/app window layout/drawing. * Moves responsibility for drawing the top and bottom location bar borders back to the location bar. In MD, where these borders are 1 px thick even at >1x scales, drawing them in the frame code doesn't work well, since they have to be drawn atop the location bar contents. One ramification of this is that due to the way the location bar size and position is specified, the popup-mode location bar in MD at >1x scale is slightly larger than the non-popup location bar. The only way to fix this is to argue with Sebastien that the location bar size/position should be modified a bit and I just don't care about this enough. * Draws the location bar top and bottom borders in the "location bar border" color, instead of the toolbar/content separator colors. This generally leads to greater visibility of these borders. * Draws the location bar side borders (only present in opaque frames) in the "location bar border" color, instead of the client edge color. This looks less glitchy. * Gives the same height, padding, etc. to location bar contents in all modes (to the degree possible given the caveats above). * Moves the window icon 1 px to the left, which looks slightly better in the restored case. * Makes the 2 px at the bottom of the titlebar part of the titlebar bounds, not part of the toolbar bounds. This simplifies some layout code a bit. * Uses a saner titlebar height calculation, which currently results in the same gap between caption buttons and titlebar bottom in restored windows as maximized ones. * Centers the window icon/title vertically within the whole center titlebar space. This is closely entwined with the bullet above. BUG=585265 TEST=Run Chrome with --top-chrome-md=material --force-device-scale-factor=2. Open a popup window, screenshot it, load the screenshot in an image editor, and verify the location bar does not have a transparent row just inside either top or bottom border. Committed: https://crrev.com/68ef33932afca3e855671c8428ee29f506c55a20 Cr-Commit-Position: refs/heads/master@{#375360}

Patch Set 1 #

Patch Set 2 : Rework popup layout again #

Patch Set 3 : Resync #

Patch Set 4 : Add Ash frame code #

Patch Set 5 : Fix unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -406 lines) Patch
M chrome/browser/ui/layout_constants.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc View 1 2 3 4 2 chunks +64 lines, -87 lines 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.cc View 1 2 3 3 chunks +88 lines, -116 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 chunks +114 lines, -118 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc View 1 2 3 4 6 chunks +23 lines, -23 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc View 1 2 3 4 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 3 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 14 chunks +44 lines, -28 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.cc View 1 2 3 chunks +1 line, -9 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
Peter Kasting
Much of the delta in the frame views is due to unindenting and then reordering ...
4 years, 10 months ago (2016-02-10 07:44:22 UTC) #2
sky
My eyes glaze over when looking at painting changes. I'm assuming it all looks good. ...
4 years, 10 months ago (2016-02-10 17:26:06 UTC) #3
Peter Kasting
I fixed a variety of further issues in popup/app layout. I imagine your glazed eyes ...
4 years, 10 months ago (2016-02-11 08:54:58 UTC) #5
sky
SLGTM
4 years, 10 months ago (2016-02-11 16:39:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685763004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685763004/80001
4 years, 10 months ago (2016-02-13 09:49:25 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-02-13 10:45:19 UTC) #11
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:47:45 UTC) #13
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/68ef33932afca3e855671c8428ee29f506c55a20
Cr-Commit-Position: refs/heads/master@{#375360}

Powered by Google App Engine
This is Rietveld 408576698