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

Issue 1622833002: Fix opaque frame incognito icon and tabstrip positioning. (Closed)

Created:
4 years, 11 months ago by Peter Kasting
Modified:
4 years, 11 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 opaque frame incognito icon and tabstrip positioning. This affects both MD and non-MD and is based on the current glass behavior + the fix for bug 580757. 12345678901234567890123456789012345678901234567890123456789012345678901234567890 * Eliminate kAvatarInnerSpacing. Replace with the opaque frame equivalent of https://codereview.chromium.org/1624803002/ (which unfortunately is more complicated due to the split of OpaqueBrowserFrameView and OpaqueBrowserFrameViewLayout; I'm inclined to undo that split at some point). This deals with the "caption buttons on left" case better than the existing code, and avoids excessive space in incognito or MD. * Position/size the incognito icon the same way in both normal and maximized mode for MD. This matches glass, and is necessary because the MD incognito icon is much smaller and so shouldn't be positioned/clipped the same way as in non-MD. * Remove unconditional addition of one pixel before tabstrip leading edge. Replace with code to position the tabstrip edges based on NonClientBorderThickness() instead of FrameBorderThickness() -- in restored windows, the two differ by kClientEdgeThickness (i.e. 1 pixel). This is more correct in maximized mode, where that extra pixel is removed, and more correct for the "caption buttons on left" case as well, in which case AFAICT we want the mirror behavior. (I don't know what the existing comment about how the two sides differ was supposed to mean; I think it's wrong.) This results in a variety of 1-pixel changes to the tabstrip left and/or right edges, necessitating some unit test tweaks. * Call LayoutIncognitoIcon() unconditionally so we can use it to adjust the tabstrip bounds even when there's no incognito icon. This is all a bit more confusing than on glass, where we can just lay out a zero-width incognito icon and use it to position the tabstrip in all cases, because of the need to support caption buttons on either side (screw you Linux). BUG=519020 TEST=none Committed: https://crrev.com/e7e177d81bbe474500ec0c0126a0270f6b54ef53 Cr-Commit-Position: refs/heads/master@{#371443}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -22 lines) Patch
M chrome/browser/ui/views/frame/opaque_browser_frame_view.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc View 6 chunks +18 lines, -17 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc View 6 chunks +9 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (5 generated)
Peter Kasting
4 years, 11 months ago (2016-01-23 03:34:34 UTC) #3
sky
LGTM
4 years, 11 months ago (2016-01-25 16:19:06 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1622833002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1622833002/1
4 years, 11 months ago (2016-01-26 02:55:15 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-26 03:50:38 UTC) #8
commit-bot: I haz the power
4 years, 11 months ago (2016-01-26 03:52:07 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e7e177d81bbe474500ec0c0126a0270f6b54ef53
Cr-Commit-Position: refs/heads/master@{#371443}

Powered by Google App Engine
This is Rietveld 408576698