DescriptionFix 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 #
Depends on Patchset: Messages
Total messages: 10 (5 generated)
|