New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666798 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

overlay scrollbar has wrong event hit bounds, initially draws in wrong place

Project Member Reported by varkha@chromium.org, Nov 18 2016

Issue description

Version: 57.0.2925.0 ToT
OS: Chrome

What steps will reproduce the problem?
(1) Open system menu -> Network page
(2) Make sure the overlay scroll bar appears (e.g. roll the wheel a bit). The scrollbar is narrow (7 dp)
(3) Move a mouse close to the scrollbar thumb (but not over it). Notice that moving over the thumb is not easy - it is narrow (7 dp) and there is a gap on the right so it is easy to overshoot.

What is the expected result?
Suggested - make the thumb becoming wider (11 dp) when the mouse crosses the imaginary vertical line 11 dp from the menu edge. That could make it easier to scroll - consider that you would now be able to move the mouse to 9-10 dp from the edge, the thumb will get widen to 11 so the mouse will now be over it and you would just click and drag.

What happens instead?
The thumb becomes wider (11 dp) but only when the mouse crosses the current narrow bounds (vertical line 7 dp from the menu edge).

sgabriel@, can you take a look at the current implementation and comment? There may be a subtle a11y here (hand tremor) so +lpalmaro.
 

Comment 1 by varkha@chromium.org, Nov 18 2016

Current implementation - see  bug 657159 .

Comment 2 by est...@chromium.org, Nov 18 2016

this suggestion is a good one, in fact it's the intent of the current implementation, but it broke when we switched to using a layer and transform for the thumb and its animation. Fix here: https://codereview.chromium.org/2520433003/
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03722d39ae28885ebd6de91429325776c77da2a7

commit 03722d39ae28885ebd6de91429325776c77da2a7
Author: estade <estade@chromium.org>
Date: Mon Nov 21 22:00:02 2016

Fix event targeting for overlay scrollbar thumbs (in native UI).

Views with layers are targeted based on their layer's transform rather
than their local coordinates. See View::GetTransform(). Hence the thumb
did not receive events until the translated area was hovered. To resolve
this, make the thumb 11 + 4 = 15 dp wide all the time, and just slide
back and forth so that 4dp is off the left or 4dp is off the right of
the 11dp track, making sure the thumb always covers the whole track
(it won't extend beyond visually or in terms of event handling because
of the track's layer clipping).

BUG= 666798 

Review-Url: https://codereview.chromium.org/2520433003
Cr-Commit-Position: refs/heads/master@{#433664}

[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scroll_view_unittest.cc
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/base_scroll_bar.cc
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/base_scroll_bar.h
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/cocoa_scroll_bar.mm
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/overlay_scroll_bar.cc
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/overlay_scroll_bar.h
[modify] https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7/ui/views/controls/scrollbar/scroll_bar_views.cc

Comment 4 by est...@chromium.org, Nov 22 2016

Labels: -Pri-3 Merge-Request-56 ReleaseBlock-Stable Pri-1
Owner: est...@chromium.org
Status: Started (was: Unconfirmed)
Summary: overlay scrollbar has wrong event hit bounds, initially draws in wrong place (was: Suggestion to make it easier to scroll with an overlay scrollbar in ash system menu)

Comment 5 by dimu@chromium.org, Nov 22 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Verified in 57.0.2933.0 canary, performing the merge now.
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 28 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/045e98625ab0fed012c6fdfd7fb13c9194d43c8e

commit 045e98625ab0fed012c6fdfd7fb13c9194d43c8e
Author: Terry Anderson <tdanderson@chromium.org>
Date: Mon Nov 28 19:41:07 2016

Fix event targeting for overlay scrollbar thumbs (in native UI).

Views with layers are targeted based on their layer's transform rather
than their local coordinates. See View::GetTransform(). Hence the thumb
did not receive events until the translated area was hovered. To resolve
this, make the thumb 11 + 4 = 15 dp wide all the time, and just slide
back and forth so that 4dp is off the left or 4dp is off the right of
the 11dp track, making sure the thumb always covers the whole track
(it won't extend beyond visually or in terms of event handling because
of the track's layer clipping).

BUG= 666798 

Review-Url: https://codereview.chromium.org/2520433003
Cr-Commit-Position: refs/heads/master@{#433664}
(cherry picked from commit 03722d39ae28885ebd6de91429325776c77da2a7)

Review URL: https://codereview.chromium.org/2535943002 .

Cr-Commit-Position: refs/branch-heads/2924@{#121}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scroll_view_unittest.cc
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/base_scroll_bar.cc
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/base_scroll_bar.h
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/cocoa_scroll_bar.mm
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/overlay_scroll_bar.cc
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/overlay_scroll_bar.h
[modify] https://crrev.com/045e98625ab0fed012c6fdfd7fb13c9194d43c8e/ui/views/controls/scrollbar/scroll_bar_views.cc

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified on ChromeOS 9000.26.0, 56.0.2924.26

Sign in to add a comment