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

Issue 2629723005: [Mac] Fix bugs in resizing the browser actions area next to the omnibox. (Closed)

Created:
3 years, 11 months ago by Sidney San Martín
Modified:
3 years, 11 months ago
Reviewers:
Robert Sesek, shrike
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, mac-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Fix bugs in resizing the browser actions area next to the omnibox. - Consistently bounds-check the new width of the BrowserActionsContainerView during dragging. Fixes crbug/681004. - Don't trust -[NSEvent deltaX/deltaY], it's inaccurate over time: http://stackoverflow.com/q/30324935/84745 - Get rid of kMinimumContainerWidth and another magic number (3.0) in browser_actions_controller.mm, which were both slightly wrong. This fixes the 1px jump when you let go of the resizing handle at the minimum width. - Refactor and de-dupe. This fixes animation when you stop dragging in between icons. The new size was getting applied twice, which aborted the animation. BUG=681004 TEST=On a Mac, install several extensions. - Try resizing the browser actions area. - Try resizing it quickly (by moving the mouse back and forth quickly) to make sure you can't make it bigger than it needs to be for the number of icons, and can't make it so small that the omnibox overlaps the wrench menu. - Make sure that, when you let go of the mouse button with the browser actions area fully open or closed, nothing changes (e.g. the omnibox doesn't grow or shrink by a pixel). - Make sure that, when you resize the browser actions area and let go with only some extension icons visible, it smoothly animates to a size that doesn't leave any icon partially visible. Review-Url: https://codereview.chromium.org/2629723005 Cr-Commit-Position: refs/heads/master@{#444847} Committed: https://chromium.googlesource.com/chromium/src/+/ae80f9c27eb768d8a53f780c16af4d024e454659

Patch Set 1 #

Patch Set 2 : Clarity tweaks. #

Total comments: 2

Patch Set 3 : Do some refactoring to avoid needing layout_constants.h. Also fixes animation. #

Patch Set 4 : Fix RTL and tests. #

Total comments: 2

Patch Set 5 : Format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -214 lines) Patch
M chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h View 1 2 3 5 chunks +4 lines, -30 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm View 1 2 3 6 chunks +35 lines, -71 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm View 1 2 3 4 3 chunks +4 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 10 chunks +18 lines, -44 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.h View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm View 1 2 6 chunks +14 lines, -48 lines 0 comments Download

Messages

Total messages: 31 (23 generated)
Sidney San Martín
3 years, 11 months ago (2017-01-13 22:14:12 UTC) #6
Robert Sesek
LGTM % comment https://codereview.chromium.org/2629723005/diff/40001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm File chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm (right): https://codereview.chromium.org/2629723005/diff/40001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm#newcode12 chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm:12: #include "chrome/browser/ui/layout_constants.h" I can't find any ...
3 years, 11 months ago (2017-01-13 22:53:59 UTC) #9
Robert Sesek
+shrike for real
3 years, 11 months ago (2017-01-13 22:54:23 UTC) #11
Sidney San Martín
https://codereview.chromium.org/2629723005/diff/40001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm File chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm (right): https://codereview.chromium.org/2629723005/diff/40001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm#newcode12 chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm:12: #include "chrome/browser/ui/layout_constants.h" On 2017/01/13 22:53:59, Robert Sesek wrote: > ...
3 years, 11 months ago (2017-01-13 23:03:29 UTC) #12
Sidney San Martín
This new patch set does some refactoring (much more could be done) which gets rid ...
3 years, 11 months ago (2017-01-19 08:04:01 UTC) #22
Robert Sesek
This does seem simpler. LGTM % two nits https://codereview.chromium.org/2629723005/diff/80001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm File chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm (right): https://codereview.chromium.org/2629723005/diff/80001/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm#newcode34 chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm:34: [view_ ...
3 years, 11 months ago (2017-01-19 20:55:42 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2629723005/100001
3 years, 11 months ago (2017-01-19 21:05:00 UTC) #28
commit-bot: I haz the power
3 years, 11 months ago (2017-01-19 21:30:16 UTC) #31
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ae80f9c27eb768d8a53f780c16af...

Powered by Google App Engine
This is Rietveld 408576698