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

Issue 2454323002: MacViews: Reveal scrollbars when resting on the trackpad. (Closed)

Created:
4 years, 1 month ago by tapted
Modified:
4 years, 1 month ago
Reviewers:
spqchan, sky
CC:
chromium-reviews, tfarina, mac-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Reveal scrollbars when resting on the trackpad. ScrollViews on Mac should reveal overlay scrollers when just resting on the trackpad, without movement. Currently they only appear once scrolling has begun in a particular direction. To fix, allow scrollbars to observe ui::ScrollEvents on their hosting ScrollView, and behave appropriately. Update the overlay scroll bars in an override of ScrollBar::Update(..) rather than BaseScrollBar::ScrollToPosition(..). This is because changes to scroll positions coming from a cc::InputHandler go through ScrollView::OnLayerScrolled(), and not ScrollView::ScrollToOffset, so they are not always seen by ScrollToPosition(). Update ui::test::EventGenerator to support these Rest/CancelRest events, and map them to native NSEvents in event_generator_delegate_mac.mm. Also map EventGenerator::ScrollSequence in a way that makes sense for the event stream that AppKit provides. BUG=664894 Committed: https://crrev.com/83cbf3e99c4710133abde8c5a26e8c1ff4f0d721 Cr-Commit-Position: refs/heads/master@{#432417}

Patch Set 1 #

Patch Set 2 : It works \o/ It has tests \o/ #

Patch Set 3 : fix compile #

Patch Set 4 : Lint #

Patch Set 5 : fix compile #

Total comments: 8

Patch Set 6 : respond to comments #

Total comments: 3

Patch Set 7 : GenerateTrackpadRest #

Patch Set 8 : rebase for r432358 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -14 lines) Patch
M ui/events/event.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/event.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M ui/events/test/event_generator.h View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M ui/events/test/event_generator.cc View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
M ui/views/controls/scroll_view.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M ui/views/controls/scroll_view_unittest.cc View 1 2 3 4 5 6 7 5 chunks +104 lines, -6 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M ui/views/controls/scrollbar/cocoa_scroll_bar.h View 1 2 3 4 5 3 chunks +10 lines, -2 lines 0 comments Download
M ui/views/controls/scrollbar/cocoa_scroll_bar.mm View 1 2 3 4 5 4 chunks +59 lines, -3 lines 0 comments Download
M ui/views/controls/scrollbar/scroll_bar.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/controls/scrollbar/scroll_bar.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/test/event_generator_delegate_mac.mm View 1 2 3 3 chunks +90 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (41 generated)
tapted
Hi Sarah, could please do the initial review. Thanks!
4 years, 1 month ago (2016-11-14 06:40:57 UTC) #15
spqchan
LGTM with some nits https://codereview.chromium.org/2454323002/diff/80001/ui/views/controls/scroll_view_unittest.cc File ui/views/controls/scroll_view_unittest.cc (right): https://codereview.chromium.org/2454323002/diff/80001/ui/views/controls/scroll_view_unittest.cc#newcode184 ui/views/controls/scroll_view_unittest.cc:184: // Call this before adding ...
4 years, 1 month ago (2016-11-14 23:27:58 UTC) #22
tapted
+sky - please take a look (OWNERS for all files except event_generator_delegate_mac.mm [but of course ...
4 years, 1 month ago (2016-11-15 12:22:23 UTC) #28
sky
LGTM https://codereview.chromium.org/2454323002/diff/100001/ui/events/test/event_generator.h File ui/events/test/event_generator.h (right): https://codereview.chromium.org/2454323002/diff/100001/ui/events/test/event_generator.h#newcode356 ui/events/test/event_generator.h:356: void TrackpadRest(); optional: for clarity name this GenerateTrackpadReset.
4 years, 1 month ago (2016-11-15 14:19:51 UTC) #29
tapted
Thanks all! https://codereview.chromium.org/2454323002/diff/100001/ui/events/test/event_generator.h File ui/events/test/event_generator.h (right): https://codereview.chromium.org/2454323002/diff/100001/ui/events/test/event_generator.h#newcode356 ui/events/test/event_generator.h:356: void TrackpadRest(); On 2016/11/15 14:19:51, sky wrote: ...
4 years, 1 month ago (2016-11-16 02:54:46 UTC) #38
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/2454323002/160001
4 years, 1 month ago (2016-11-16 02:55:38 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/317956)
4 years, 1 month ago (2016-11-16 03:02:50 UTC) #44
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/2454323002/180001
4 years, 1 month ago (2016-11-16 06:30:04 UTC) #47
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years, 1 month ago (2016-11-16 08:04:35 UTC) #49
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 08:06:21 UTC) #51
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/83cbf3e99c4710133abde8c5a26e8c1ff4f0d721
Cr-Commit-Position: refs/heads/master@{#432417}

Powered by Google App Engine
This is Rietveld 408576698