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

Issue 2520433003: Fix event targeting for overlay scrollbar thumbs (in native UI). (Closed)

Created:
4 years, 1 month ago by Evan Stade
Modified:
4 years ago
Reviewers:
varkha, sadrul
CC:
chromium-reviews, tfarina, varkha
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7 Cr-Commit-Position: refs/heads/master@{#433664}

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix 2 bugs #

Total comments: 8

Patch Set 3 : remove circular construction dependency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -28 lines) Patch
M ui/views/controls/scroll_view_unittest.cc View 1 2 2 chunks +3 lines, -6 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.cc View 1 2 3 chunks +11 lines, -8 lines 0 comments Download
M ui/views/controls/scrollbar/cocoa_scroll_bar.mm View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M ui/views/controls/scrollbar/overlay_scroll_bar.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/scrollbar/overlay_scroll_bar.cc View 1 2 6 chunks +30 lines, -11 lines 0 comments Download
M ui/views/controls/scrollbar/scroll_bar_views.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 24 (12 generated)
Evan Stade
4 years, 1 month ago (2016-11-18 19:08:06 UTC) #5
varkha
There is some artifact painted when I try this (near the bottom left edge) when ...
4 years, 1 month ago (2016-11-18 20:27:41 UTC) #7
sadrul
https://codereview.chromium.org/2520433003/diff/1/ui/views/controls/scrollbar/overlay_scroll_bar.cc File ui/views/controls/scrollbar/overlay_scroll_bar.cc (right): https://codereview.chromium.org/2520433003/diff/1/ui/views/controls/scrollbar/overlay_scroll_bar.cc#newcode45 ui/views/controls/scrollbar/overlay_scroll_bar.cc:45: kThumbThickness + kThumbHoverOffset); This would affect layout (and thus ...
4 years, 1 month ago (2016-11-19 01:43:04 UTC) #10
Evan Stade
https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc File ui/views/controls/scrollbar/overlay_scroll_bar.cc (right): https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc#newcode31 ui/views/controls/scrollbar/overlay_scroll_bar.cc:31: // |scroll_bar| isn't done being constructed; it's not safe ...
4 years, 1 month ago (2016-11-19 02:23:34 UTC) #11
varkha
https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc File ui/views/controls/scrollbar/overlay_scroll_bar.cc (right): https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc#newcode31 ui/views/controls/scrollbar/overlay_scroll_bar.cc:31: // |scroll_bar| isn't done being constructed; it's not safe ...
4 years, 1 month ago (2016-11-19 02:58:01 UTC) #12
Evan Stade
https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc File ui/views/controls/scrollbar/overlay_scroll_bar.cc (right): https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc#newcode31 ui/views/controls/scrollbar/overlay_scroll_bar.cc:31: // |scroll_bar| isn't done being constructed; it's not safe ...
4 years ago (2016-11-21 15:26:21 UTC) #13
varkha
LGTM with attempt to clarify the guideline. https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc File ui/views/controls/scrollbar/overlay_scroll_bar.cc (right): https://codereview.chromium.org/2520433003/diff/20001/ui/views/controls/scrollbar/overlay_scroll_bar.cc#newcode113 ui/views/controls/scrollbar/overlay_scroll_bar.cc:113: static_cast<Thumb*>(GetThumb())->Init(); On ...
4 years ago (2016-11-21 17:16:46 UTC) #14
sadrul
lgtm
4 years ago (2016-11-21 17:25:56 UTC) #15
Evan Stade
On 2016/11/21 17:16:46, varkha wrote: > LGTM with attempt to clarify the guideline. > > ...
4 years ago (2016-11-21 20:40:44 UTC) #16
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/2520433003/40001
4 years ago (2016-11-21 20:41:55 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-11-21 22:00:37 UTC) #22
commit-bot: I haz the power
4 years ago (2016-11-21 22:08:20 UTC) #24
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/03722d39ae28885ebd6de91429325776c77da2a7
Cr-Commit-Position: refs/heads/master@{#433664}

Powered by Google App Engine
This is Rietveld 408576698