Chromium Code Reviews
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 #
Messages
Total messages: 31 (23 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||