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

Issue 1781593005: Fix regression in dragging location bar right edge (Mac). (Closed)

Created:
4 years, 9 months ago by shrike
Modified:
4 years, 9 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@md_extensions_buttons
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix regression in dragging location bar right edge (Mac). This change fixes a regression where it was no longer possible to drag the right edge of the location bar to resize it. This fix involves adding an explicit left and right padding for the items at the start and end of the toolbar actions container. Previously the ToolbarActionsBar used the item spacing as the padding when computing the width of the container. With Material Design, the padding is 0pt, causing the left and right padding to disappear. BUG=593268

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -9 lines) Patch
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/layout_constants.h View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/layout_constants.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar.cc View 5 chunks +9 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 17 (2 generated)
shrike
PTAL pkasting@ for chrome/browser/ui/layout_constants.cc chrome/browser/ui/layout_constants.h chrome/browser/ui/toolbar/toolbar_actions_bar.cc chrome/browser/ui/toolbar/toolbar_actions_bar.h avi@ for chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
4 years, 9 months ago (2016-03-10 00:01:11 UTC) #2
Peter Kasting
I'm confused. You say that on Mac these values differ, but I see no evidence ...
4 years, 9 months ago (2016-03-10 00:05:47 UTC) #3
shrike
On 2016/03/10 00:05:47, Peter Kasting wrote: > I'm confused. You say that on Mac these ...
4 years, 9 months ago (2016-03-10 00:10:30 UTC) #4
Peter Kasting
On 2016/03/10 00:10:30, shrike wrote: > On 2016/03/10 00:05:47, Peter Kasting wrote: > > I'm ...
4 years, 9 months ago (2016-03-10 00:23:13 UTC) #5
shrike
On 2016/03/10 00:23:13, Peter Kasting wrote: > Is 0 really correct for the spacing on ...
4 years, 9 months ago (2016-03-10 00:31:40 UTC) #6
Peter Kasting
On 2016/03/10 00:31:40, shrike wrote: > > Why does Mac differ -- can the difference ...
4 years, 9 months ago (2016-03-10 00:47:56 UTC) #7
shrike
On 2016/03/10 00:47:56, Peter Kasting wrote: > I guess what I'm saying is that I ...
4 years, 9 months ago (2016-03-10 01:00:27 UTC) #8
Peter Kasting
On 2016/03/10 01:00:27, shrike wrote: > On 2016/03/10 00:47:56, Peter Kasting wrote: > > I ...
4 years, 9 months ago (2016-03-10 01:35:24 UTC) #9
Avi (use Gerrit)
I have no code issues, but come to a resolution with Peter and ping me.
4 years, 9 months ago (2016-03-10 04:08:16 UTC) #10
shrike
On 2016/03/10 01:35:24, Peter Kasting wrote: > I don't know how big your resulting click ...
4 years, 9 months ago (2016-03-10 06:05:10 UTC) #11
Peter Kasting
On 2016/03/10 06:05:10, shrike wrote: > On 2016/03/10 01:35:24, Peter Kasting wrote: > > I ...
4 years, 9 months ago (2016-03-10 06:15:04 UTC) #12
shrike
On 2016/03/10 06:15:04, Peter Kasting wrote: > On 2016/03/10 06:05:10, shrike wrote: > > On ...
4 years, 9 months ago (2016-03-10 17:08:07 UTC) #13
shrike
Our e-mail discussion was not helpful, and really got light years away from being relevant ...
4 years, 9 months ago (2016-03-11 17:26:24 UTC) #14
Peter Kasting
On 2016/03/11 17:26:24, shrike wrote: > Our e-mail discussion was not helpful, and really got ...
4 years, 9 months ago (2016-03-11 19:20:10 UTC) #16
shrike
4 years, 9 months ago (2016-03-11 20:03:14 UTC) #17
On 2016/03/11 19:20:10, Peter Kasting wrote:
> On 2016/03/11 17:26:24, shrike wrote:
> > Our e-mail discussion was not helpful, and really got light years away from
> > being relevant to this cl. To clarify:
> > 
> > The purpose of this cl is to fix a regression on the Mac under Material
> Design,
> > where it is currently not possible to drag the location bar's right edge to
> > resize it. The resizing is controlled by the ToolbarActionsView on the Mac,
> > which is a view that holds the extension buttons that appear between the
> > location bar and the actions button.
> > 
> > The Mac's ToolbarActionsView uses a ToolbarActionsBar to determine the
extent
> of
> > the view and the locations of its buttons. The ToolbarActionsBar assumes
that
> > the padding at either end of the view is equal to the button spacing. As a
> > result, when button spacing is 0 (as it is under Material Design), padding
is
> > also 0. The problem with resizing the location bar is a result of 0 padding
on
> > the left edge of the ToolbarActionsView.
> 
> The reason I'm trying to have the email discussion is that I strongly suspect
> that the correct fix is actually to not have the button spacing value be 0. 
> Even if we actually want zero space between some of the toolbar buttons that
> value _still_ probably should not be zero.  I don't think it's doing what you
> think it's doing.  (But much of the reason for that thread is to confirm what,
> precisely, it _is_ doing.)
> 
> If somehow this is wrong and we really want zero there, then it's still
unlikely
> this fix is precisely correct as-is.  We probably need to modify the toolbar
> layout code a bit.  We may not want a padding value in layout_constants.cc at
> all, and if we do, we probably don't want to define it completely separately
> from the spacing value, and if we _do_ want that, we probably only want one
such
> constant, not two.

I think this cl is fine as is. Even if spacing needed to be 0 across all
platforms, and even if we wanted 0 padding as a result, we would still want to
land this cl so that in the future when the design changes again we can easily
fill in appropriate spacing and padding values and everything will just work.

That said, sgabriel@ says that buttons should be 24x24 on all platforms so that
means spacing can go back to 4pt on the Mac. Therefore this cl is no longer
needed (although toolbar_actions_bar should really be cleaned up to not assume
that spacing == padding). I will need to land a cl to change the Mac spacing in
layout_constants back to 4pt.

Goodbye for now.

Powered by Google App Engine
This is Rietveld 408576698