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

Issue 1671313002: MacViews: Overlay Scrollbars with Show/Hide Animations (Closed)

Created:
4 years, 10 months ago by spqchan
Modified:
4 years, 10 months ago
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Overlay Scrollbars with Show/Hide Animations The scrollbars are implemented in CocoaScrollBar. They switch between overlay and non-overlay style, depending on the system's preference If using the overlay style, the scrollbars will: - Hide if unused - Display the scrolltrack if the user hovers over it - Currently hovering will not adjust the width. That will come later. In addition, since we are switching to CocoaScrollbars on OSX, dead code is cleaned up in native_theme_mac. Tests are modified and written for the overlay scrollbars. Changes are made to scoped_preferred_scroller_style_legacy_mac so that we can force the scroller style to be non-overlay and overlay in our tests. BUG=568409 Committed: https://crrev.com/83534ab036f32a6aa7417e64fa3bc37a0b61be9d Cr-Commit-Position: refs/heads/master@{#377052}

Patch Set 1 #

Patch Set 2 : Added comments and fixed nits #

Total comments: 39

Patch Set 3 : Switched to animating using layers #

Patch Set 4 : nit #

Total comments: 13

Patch Set 5 : #

Total comments: 32

Patch Set 6 : Switched to CocoaScrollbar #

Patch Set 7 : #

Total comments: 34

Patch Set 8 : Remove dead native theme code, fixed overlapping scrollbars #

Patch Set 9 : #

Patch Set 10 : nit #

Total comments: 4

Patch Set 11 : Update layout according to scroller style #

Total comments: 22

Patch Set 12 : Added hover thumb color and fixed dragging issue #

Patch Set 13 : Fixed scrollview.scrollbar test #

Patch Set 14 : Added test for Overlay scrollers #

Patch Set 15 : nit #

Patch Set 16 : #

Total comments: 16

Patch Set 17 : Tests and nits #

Patch Set 18 : #

Total comments: 6

Patch Set 19 : #

Total comments: 11

Patch Set 20 : #

Total comments: 8

Patch Set 21 : Rebased and fixed test #

Patch Set 22 : #

Patch Set 23 : nit #

Total comments: 7

Patch Set 24 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+686 lines, -303 lines) Patch
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -2 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/test/scoped_preferred_scroller_style_legacy_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -36 lines 0 comments Download
M ui/base/test/scoped_preferred_scroller_style_legacy_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -63 lines 0 comments Download
A + ui/base/test/scoped_preferred_scroller_style_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -6 lines 0 comments Download
A ui/base/test/scoped_preferred_scroller_style_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +83 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M ui/native_theme/native_theme_mac.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -12 lines 0 comments Download
M ui/native_theme/native_theme_mac.mm View 1 2 3 4 5 6 7 3 chunks +0 lines, -143 lines 0 comments Download
A ui/views/cocoa/views_scrollbar_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +40 lines, -0 lines 0 comments Download
A ui/views/cocoa/views_scrollbar_bridge.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +54 lines, -0 lines 0 comments Download
M ui/views/controls/scroll_view.cc View 1 2 3 4 5 6 7 17 4 chunks +10 lines, -6 lines 0 comments Download
M ui/views/controls/scroll_view_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 8 chunks +90 lines, -8 lines 0 comments Download
A ui/views/controls/scrollbar/cocoa_scroll_bar.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +70 lines, -0 lines 0 comments Download
A ui/views/controls/scrollbar/cocoa_scroll_bar.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +301 lines, -0 lines 0 comments Download
M ui/views/style/platform_style.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
D ui/views/style/platform_style_mac.cc View 1 chunk +0 lines, -22 lines 0 comments Download
A + ui/views/style/platform_style_mac.mm View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 55 (14 generated)
spqchan
On 2016/02/06 03:38:41, spqchan wrote: > mailto:spqchan@chromium.org changed reviewers: > + mailto:tapted@chromium.org Hey, can you ...
4 years, 10 months ago (2016-02-06 04:26:19 UTC) #2
tapted
Using GetLayer()->GetAnimator()->SetOpacity(0.0) might simplify a lot of the NativeTheme changes and other decisions around NativeScrollBarWrapper ...
4 years, 10 months ago (2016-02-08 00:31:15 UTC) #3
spqchan
Wow, I had no idea about GetLayer()->GetAnimator()->SetOpacity(0.0). That would really simplify things. I'll give that ...
4 years, 10 months ago (2016-02-08 22:12:50 UTC) #4
spqchan
On 2016/02/08 22:12:50, spqchan wrote: > Wow, I had no idea about GetLayer()->GetAnimator()->SetOpacity(0.0). That would ...
4 years, 10 months ago (2016-02-09 21:20:59 UTC) #5
spqchan
I just changed the code to use the layer animation and it simplified a large ...
4 years, 10 months ago (2016-02-09 21:21:26 UTC) #6
tapted
Some initial feedback since I'm about to disappear into talks for a couple of hours. ...
4 years, 10 months ago (2016-02-09 23:51:49 UTC) #7
spqchan
Sounds good. I also have a new patch for your review https://codereview.chromium.org/1671313002/diff/60001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): ...
4 years, 10 months ago (2016-02-10 00:35:16 UTC) #8
tapted
I'm currently thinking NativeScrollBarViews might not actually be providing us with much. It might be ...
4 years, 10 months ago (2016-02-11 08:46:18 UTC) #9
spqchan
On 2016/02/11 08:46:18, tapted wrote: > I'm currently thinking NativeScrollBarViews might not actually be providing ...
4 years, 10 months ago (2016-02-11 18:05:17 UTC) #10
spqchan
I made the switch to CocoaScrollbar, which inherits from BaseScrollBar. I migrated the code from ...
4 years, 10 months ago (2016-02-13 01:39:24 UTC) #11
spqchan
I think I have an idea on how to fix the corner issue with the ...
4 years, 10 months ago (2016-02-13 02:02:29 UTC) #12
tapted
neato https://codereview.chromium.org/1671313002/diff/120001/ui/compositor/layer_animator.h File ui/compositor/layer_animator.h (right): https://codereview.chromium.org/1671313002/diff/120001/ui/compositor/layer_animator.h#newcode109 ui/compositor/layer_animator.h:109: void SetTransitionDuration(base::TimeDelta duration); Ah curious. So I think ...
4 years, 10 months ago (2016-02-16 06:47:59 UTC) #13
tapted
oh also if there's now some dead code in native_theme_mac we should remove that...
4 years, 10 months ago (2016-02-16 07:05:37 UTC) #14
spqchan
On 2016/02/16 07:05:37, tapted wrote: > oh also if there's now some dead code in ...
4 years, 10 months ago (2016-02-16 23:18:09 UTC) #15
spqchan
Fixed the nits and other issues according to your comments. I also fixed the overlapping ...
4 years, 10 months ago (2016-02-16 23:18:19 UTC) #16
spqchan
Sorry, I just realized what you meant about this. The scrollbar shouldn't overlap for legacy ...
4 years, 10 months ago (2016-02-16 23:22:49 UTC) #17
tapted
just did a quick pass, but it's looking really close https://codereview.chromium.org/1671313002/diff/120001/ui/views/controls/scrollbar/cocoa_scroll_bar.mm File ui/views/controls/scrollbar/cocoa_scroll_bar.mm (right): https://codereview.chromium.org/1671313002/diff/120001/ui/views/controls/scrollbar/cocoa_scroll_bar.mm#newcode220 ...
4 years, 10 months ago (2016-02-16 23:32:57 UTC) #18
spqchan
Fixed the layout for scroller style. The scrollbar will only overlap the content if we're ...
4 years, 10 months ago (2016-02-17 00:05:29 UTC) #19
tapted
I think a views_unittest will fail after this -- ScrollViewTest.ScrollBars (fails on Mac, not sure ...
4 years, 10 months ago (2016-02-17 08:46:21 UTC) #20
tapted
ooh! I forgot to mention - a yandex contributor landed ui::test::ScopedPreferredScrollerStyleLegacy recently ( https://codereview.chromium.org/1642553004 ). ...
4 years, 10 months ago (2016-02-17 22:55:09 UTC) #21
spqchan
On 2016/02/17 22:55:09, tapted wrote: > ooh! I forgot to mention - a yandex contributor ...
4 years, 10 months ago (2016-02-19 00:13:43 UTC) #22
spqchan
Thanks for the heads up on the Yandex change, it was really helpful! Several things ...
4 years, 10 months ago (2016-02-19 00:14:03 UTC) #23
tapted
hm, I guess it's tricky to test around the timers/animations. A few more suggestions below ...
4 years, 10 months ago (2016-02-19 06:56:37 UTC) #24
spqchan
https://codereview.chromium.org/1671313002/diff/300001/ui/base/test/scoped_preferred_scroller_style_mac.h File ui/base/test/scoped_preferred_scroller_style_mac.h (right): https://codereview.chromium.org/1671313002/diff/300001/ui/base/test/scoped_preferred_scroller_style_mac.h#newcode25 ui/base/test/scoped_preferred_scroller_style_mac.h:25: ScopedPreferredScrollerStyle(bool overlay); On 2016/02/19 06:56:37, tapted wrote: > nit: ...
4 years, 10 months ago (2016-02-19 19:35:33 UTC) #25
spqchan
PTAL
4 years, 10 months ago (2016-02-19 19:35:45 UTC) #26
tapted
lgtm with a couple of tweaks On 2016/02/17 08:46:21, tapted wrote: > Then before sending ...
4 years, 10 months ago (2016-02-22 04:42:15 UTC) #27
spqchan
+avi for OWNERS https://codereview.chromium.org/1671313002/diff/340001/ui/views/controls/scrollbar/base_scroll_bar.cc File ui/views/controls/scrollbar/base_scroll_bar.cc (right): https://codereview.chromium.org/1671313002/diff/340001/ui/views/controls/scrollbar/base_scroll_bar.cc#newcode131 ui/views/controls/scrollbar/base_scroll_bar.cc:131: void BaseScrollBar::Layout() { On 2016/02/22 04:42:15, ...
4 years, 10 months ago (2016-02-22 19:01:37 UTC) #32
Avi (use Gerrit)
https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm#newcode30 ui/views/cocoa/views_scrollbar_bridge.mm:30: object:nil]; Won't this end up with a double registration ...
4 years, 10 months ago (2016-02-22 19:37:08 UTC) #33
spqchan
PTAL https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm#newcode30 ui/views/cocoa/views_scrollbar_bridge.mm:30: object:nil]; On 2016/02/22 19:37:07, Avi wrote: > Won't ...
4 years, 10 months ago (2016-02-22 20:49:25 UTC) #34
Avi (use Gerrit)
lgtm https://codereview.chromium.org/1671313002/diff/360001/ui/views/controls/scroll_view.cc File ui/views/controls/scroll_view.cc (right): https://codereview.chromium.org/1671313002/diff/360001/ui/views/controls/scroll_view.cc#newcode128 ui/views/controls/scroll_view.cc:128: vert_sb_(PlatformStyle::CreateScrollBar(false).release()), On 2016/02/22 20:49:25, spqchan wrote: > On ...
4 years, 10 months ago (2016-02-22 20:54:15 UTC) #35
spqchan
On 2016/02/22 20:54:15, Avi wrote: > lgtm > > https://codereview.chromium.org/1671313002/diff/360001/ui/views/controls/scroll_view.cc > File ui/views/controls/scroll_view.cc (right): > ...
4 years, 10 months ago (2016-02-22 21:00:38 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671313002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671313002/380001
4 years, 10 months ago (2016-02-22 21:04:40 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/128742) linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 10 months ago (2016-02-22 21:23:32 UTC) #41
tapted
https://codereview.chromium.org/1671313002/diff/360001/ui/views/controls/scroll_view.cc File ui/views/controls/scroll_view.cc (right): https://codereview.chromium.org/1671313002/diff/360001/ui/views/controls/scroll_view.cc#newcode128 ui/views/controls/scroll_view.cc:128: vert_sb_(PlatformStyle::CreateScrollBar(false).release()), On 2016/02/22 20:54:15, Avi wrote: > On 2016/02/22 ...
4 years, 10 months ago (2016-02-22 22:22:23 UTC) #42
tapted
https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): https://codereview.chromium.org/1671313002/diff/360001/ui/views/cocoa/views_scrollbar_bridge.mm#newcode30 ui/views/cocoa/views_scrollbar_bridge.mm:30: object:nil]; On 2016/02/22 20:49:25, spqchan wrote: > On 2016/02/22 ...
4 years, 10 months ago (2016-02-22 22:34:57 UTC) #43
spqchan
PTAL https://codereview.chromium.org/1671313002/diff/380001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): https://codereview.chromium.org/1671313002/diff/380001/ui/views/cocoa/views_scrollbar_bridge.mm#newcode20 ui/views/cocoa/views_scrollbar_bridge.mm:20: if (self = [super init]) { On 2016/02/22 ...
4 years, 10 months ago (2016-02-22 23:26:03 UTC) #44
tapted
lgtm % nits https://codereview.chromium.org/1671313002/diff/440001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1671313002/diff/440001/content/browser/site_per_process_browsertest.cc#newcode1 content/browser/site_per_process_browsertest.cc:1: // Copyright (c) 2012 The Chromium ...
4 years, 10 months ago (2016-02-22 23:41:56 UTC) #45
spqchan
https://codereview.chromium.org/1671313002/diff/440001/ui/views/cocoa/views_scrollbar_bridge.mm File ui/views/cocoa/views_scrollbar_bridge.mm (right): https://codereview.chromium.org/1671313002/diff/440001/ui/views/cocoa/views_scrollbar_bridge.mm#newcode31 ui/views/cocoa/views_scrollbar_bridge.mm:31: -(void)clearDelegate { On 2016/02/22 23:41:55, tapted wrote: > nit: ...
4 years, 10 months ago (2016-02-23 17:56:27 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671313002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671313002/460001
4 years, 10 months ago (2016-02-23 18:01:41 UTC) #51
commit-bot: I haz the power
Committed patchset #24 (id:460001)
4 years, 10 months ago (2016-02-23 19:28:38 UTC) #53
commit-bot: I haz the power
4 years, 10 months ago (2016-02-23 19:30:46 UTC) #55
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/83534ab036f32a6aa7417e64fa3bc37a0b61be9d
Cr-Commit-Position: refs/heads/master@{#377052}

Powered by Google App Engine
This is Rietveld 408576698