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

Issue 2841943002: Overlay scrollbars expand only when mouse is near thumb (Closed)

Created:
3 years, 8 months ago by chaopeng
Modified:
3 years, 7 months ago
Reviewers:
bokan, weiliangc
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Overlay scrollbars expand only when mouse is near thumb Overlay scrollbars expand when mouse is near the whole scrollbar today. In this patch, we change it to expand only when mouse is near thumb. We pass mouse position to SingleScrollbarAnimationControllerThinning instead of calculating the distance from mouse position to scrollbar in LayerTreeHostImpl. In SingleScrollbarAnimationControllerThinning::DidMouseMove we calculate: 1. distance from mouse to scrollbar: determind should scrollbar keep appear, fade out or hover fade in. 2. distance from mouse to scrollbar thumb: determind should thick/thin scrollbar BUG=713218 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2841943002 Cr-Commit-Position: refs/heads/master@{#468428} Committed: https://chromium.googlesource.com/chromium/src/+/982642b47574426b124f75c2e0b74f83c8705161

Patch Set 1 #

Total comments: 6

Patch Set 2 : change some interface #

Patch Set 3 : add tests #

Total comments: 3

Patch Set 4 : bokan comments addressed #

Patch Set 5 : pass point to SingleScrollbarController #

Total comments: 7

Patch Set 6 : bokan comments#8 addressed #

Total comments: 1

Patch Set 7 : weiliangc comment addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -235 lines) Patch
M cc/input/scrollbar_animation_controller.h View 1 2 3 4 5 6 4 chunks +6 lines, -6 lines 0 comments Download
M cc/input/scrollbar_animation_controller.cc View 1 2 3 4 5 6 8 chunks +27 lines, -37 lines 0 comments Download
M cc/input/scrollbar_animation_controller_unittest.cc View 1 2 3 4 5 6 35 chunks +163 lines, -67 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning.h View 1 2 3 4 5 chunks +16 lines, -6 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning.cc View 1 2 3 4 5 6 8 chunks +71 lines, -21 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning_unittest.cc View 1 2 3 4 5 19 chunks +50 lines, -28 lines 0 comments Download
M cc/layers/scrollbar_layer_impl_base.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M cc/layers/scrollbar_layer_impl_base.cc View 1 3 chunks +13 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 2 chunks +1 line, -21 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 11 chunks +118 lines, -44 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
chaopeng
Please take a early look at this patch. I will fix and add test later. ...
3 years, 8 months ago (2017-04-25 16:16:14 UTC) #3
bokan
Looks fine to me, a few suggestions inline... https://codereview.chromium.org/2841943002/diff/1/cc/input/scrollbar_animation_controller.cc File cc/input/scrollbar_animation_controller.cc (right): https://codereview.chromium.org/2841943002/diff/1/cc/input/scrollbar_animation_controller.cc#newcode14 cc/input/scrollbar_animation_controller.cc:14: float ...
3 years, 8 months ago (2017-04-25 19:36:21 UTC) #4
chaopeng
Last comments addressed and added a test `ScrollbarAnimationControllerAuraOverlayTest.MoveNearTrackThenNearThumb`. PTAL. Thank you.
3 years, 8 months ago (2017-04-27 03:13:01 UTC) #5
bokan
https://codereview.chromium.org/2841943002/diff/40001/cc/input/scrollbar_animation_controller.cc File cc/input/scrollbar_animation_controller.cc (right): https://codereview.chromium.org/2841943002/diff/40001/cc/input/scrollbar_animation_controller.cc#newcode46 cc/input/scrollbar_animation_controller.cc:46: const ScrollbarOrientation orientations[] = {HORIZONTAL, VERTICAL}; This is only ...
3 years, 7 months ago (2017-04-28 14:15:17 UTC) #6
chaopeng
On 2017/04/28 14:15:17, bokan (OOO until May 9) wrote: > https://codereview.chromium.org/2841943002/diff/40001/cc/input/scrollbar_animation_controller.cc > File cc/input/scrollbar_animation_controller.cc (right): ...
3 years, 7 months ago (2017-04-28 16:18:13 UTC) #7
bokan
Thanks, looks good! I have a few style comments but once those are addressed, lgtm! ...
3 years, 7 months ago (2017-04-28 18:08:11 UTC) #8
chaopeng
weiliangc@chromium.org: Please review changes.
3 years, 7 months ago (2017-04-28 18:54:56 UTC) #10
weiliangc
LGTM https://codereview.chromium.org/2841943002/diff/100001/cc/input/single_scrollbar_animation_controller_thinning.cc File cc/input/single_scrollbar_animation_controller_thinning.cc (right): https://codereview.chromium.org/2841943002/diff/100001/cc/input/single_scrollbar_animation_controller_thinning.cc#newcode20 cc/input/single_scrollbar_animation_controller_thinning.cc:20: float DistanceToScrollbarTrack(const gfx::PointF& device_viewport_point, nit: move common code ...
3 years, 7 months ago (2017-05-01 19:48:02 UTC) #11
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/2841943002/120001
3 years, 7 months ago (2017-05-01 20:18:45 UTC) #14
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/2841943002/120001
3 years, 7 months ago (2017-05-01 20:28:02 UTC) #18
commit-bot: I haz the power
3 years, 7 months ago (2017-05-01 21:45:48 UTC) #21
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/982642b47574426b124f75c2e0b7...

Powered by Google App Engine
This is Rietveld 408576698