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

Issue 1653003002: Make scrollAnimatorEnabled work on Mac like it does on other platforms (Closed)

Created:
4 years, 10 months ago by bokan
Modified:
4 years, 10 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, Eric Willigers, jam, kinuko+watch, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, rjwright, shans, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make scrollAnimatorEnabled work on Mac like it does on other platforms Mac currently has a separate path to enable/disable scroll animations in Blink. Instead of using the existing Blink setting for scroll animations, ScrollbarThemeMacCommon sets a flag scrollAnimationEnabledForSystem which is then checked along side the Blink setting. A side-effect of this is that --(disable|enable)-scroll-animator doesn't work on Mac and layout tests default to scroll animations disabled with no way to turn them on. This patch removes the scrollAnimationEnabledForSystem flag and instead unifies this setting with how it's handled on other platforms. When Blink settings are computed, the OSX setting is queried and set into the usual enable_scroll_animator setting. Changes to the OSX setting cause the browser process to recalculate and apply new Blink settings. This allows layout tests to use internals.settings.setScrollAnimatorEnabled to allow testing of scroll animation semantics on Mac. BUG= Committed: https://crrev.com/b9c004266f7f0d0380935dfc8a527bb08409627d Cr-Commit-Position: refs/heads/master@{#376025}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Added DCHECK that we're querying OS settings in Browser #

Patch Set 6 : Also allow IO ML for unit tests #

Total comments: 4

Patch Set 7 : Rebase #

Patch Set 8 : Move from base/mac to animation_mac.mm #

Total comments: 10

Patch Set 9 : Addressed comments from avi@ #

Patch Set 10 : Also add new files to GN build #

Patch Set 11 : Previous patch accidentally lost new files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -68 lines) Patch
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 7 8 9 2 chunks +18 lines, -14 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/theme_helper_mac.mm View 1 5 chunks +11 lines, -20 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacCommon.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacCommon.mm View 3 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/web/mac/WebScrollbarTheme.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/mac/WebScrollbarTheme.h View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/animation/animation.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/animation/animation.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -14 lines 0 comments Download
A ui/gfx/animation/animation_mac.mm View 1 2 3 4 5 6 7 8 10 1 chunk +33 lines, -0 lines 0 comments Download
A ui/gfx/animation/animation_win.cc View 1 2 3 4 5 6 7 8 10 1 chunk +28 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (17 generated)
bokan
Hi Greg, I see you've done some related work in https://codereview.chromium.org/1234783005, could you PTAL? Feel ...
4 years, 10 months ago (2016-02-01 17:14:02 UTC) #3
bokan
https://codereview.chromium.org/1653003002/diff/20001/content/browser/theme_helper_mac.mm File content/browser/theme_helper_mac.mm (right): https://codereview.chromium.org/1653003002/diff/20001/content/browser/theme_helper_mac.mm#newcode167 content/browser/theme_helper_mac.mm:167: static_cast<RenderProcessHostImpl*>(it.GetCurrentValue()); In particular, I'm not sure if this is ...
4 years, 10 months ago (2016-02-02 19:45:39 UTC) #4
Greg K
On 2016/02/02 19:45:39, bokan wrote: > https://codereview.chromium.org/1653003002/diff/20001/content/browser/theme_helper_mac.mm > File content/browser/theme_helper_mac.mm (right): > > https://codereview.chromium.org/1653003002/diff/20001/content/browser/theme_helper_mac.mm#newcode167 > ...
4 years, 10 months ago (2016-02-02 19:54:58 UTC) #5
bokan
On 2016/02/02 19:54:58, Greg Kerr wrote: > On 2016/02/02 19:45:39, bokan wrote: > > > ...
4 years, 10 months ago (2016-02-02 19:58:41 UTC) #6
Robert Sesek
On 2016/02/02 19:58:41, bokan wrote: > On 2016/02/02 19:54:58, Greg Kerr wrote: > > On ...
4 years, 10 months ago (2016-02-02 20:02:30 UTC) #7
bokan
On 2016/02/02 20:02:30, Robert Sesek wrote: > On 2016/02/02 19:58:41, bokan wrote: > > On ...
4 years, 10 months ago (2016-02-02 20:15:54 UTC) #8
bokan
rsesek@, could you PTAL? I've added a DCHECK that we only call the new method ...
4 years, 10 months ago (2016-02-07 00:53:53 UTC) #11
Robert Sesek
Sorry, I either forgot to add myself to the reviewers list or was somehow dropped ...
4 years, 10 months ago (2016-02-08 17:39:51 UTC) #12
bokan
Done, ptal. https://codereview.chromium.org/1653003002/diff/120001/base/mac/mac_util.mm File base/mac/mac_util.mm (right): https://codereview.chromium.org/1653003002/diff/120001/base/mac/mac_util.mm#newcode607 base/mac/mac_util.mm:607: bool IsScrollAnimationEnabled() { On 2016/02/08 17:39:51, Robert ...
4 years, 10 months ago (2016-02-08 20:55:06 UTC) #14
Robert Sesek
LGTM https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation_mac.mm File ui/gfx/animation/animation_mac.mm (right): https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation_mac.mm#newcode16 ui/gfx/animation/animation_mac.mm:16: DCHECK(base::MessageLoopForUI::IsCurrent() || Not sure about how useful this ...
4 years, 10 months ago (2016-02-09 18:57:45 UTC) #15
bokan
https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation_mac.mm File ui/gfx/animation/animation_mac.mm (right): https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation_mac.mm#newcode16 ui/gfx/animation/animation_mac.mm:16: DCHECK(base::MessageLoopForUI::IsCurrent() || On 2016/02/09 18:57:45, Robert Sesek wrote: > ...
4 years, 10 months ago (2016-02-09 19:00:39 UTC) #16
bokan
kernel@, are you ok with these changes since the calls are still from the browser ...
4 years, 10 months ago (2016-02-09 22:44:42 UTC) #18
Greg K
On 2016/02/09 22:44:42, bokan wrote: > kernel@, are you ok with these changes since the ...
4 years, 10 months ago (2016-02-09 22:55:55 UTC) #19
Avi (use Gerrit)
lgtm Just nits. https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation.cc File ui/gfx/animation/animation.cc (right): https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation.cc#newcode94 ui/gfx/animation/animation.cc:94: // Defined in platform specific file ...
4 years, 10 months ago (2016-02-10 00:24:54 UTC) #20
Ian Vollick
On 2016/02/10 00:24:54, Avi wrote: > lgtm > > Just nits. > > https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation.cc > ...
4 years, 10 months ago (2016-02-10 00:31:35 UTC) #21
kenrb
ipc lgtm
4 years, 10 months ago (2016-02-10 15:21:35 UTC) #22
bokan
https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation.cc File ui/gfx/animation/animation.cc (right): https://codereview.chromium.org/1653003002/diff/180001/ui/gfx/animation/animation.cc#newcode94 ui/gfx/animation/animation.cc:94: // Defined in platform specific file for Win On ...
4 years, 10 months ago (2016-02-10 16:31:22 UTC) #23
bokan
chrishtr@: ptal.
4 years, 10 months ago (2016-02-11 19:27:26 UTC) #24
chrishtr
I went as far back as notifyPrefsChangedWithRedraw in theme_helper_mac.mm to see where it was being ...
4 years, 10 months ago (2016-02-12 18:24:24 UTC) #26
bokan
On 2016/02/12 18:24:24, chrishtr wrote: > I went as far back as notifyPrefsChangedWithRedraw in theme_helper_mac.mm ...
4 years, 10 months ago (2016-02-12 18:45:27 UTC) #27
bokan
chrishtr@: ping.
4 years, 10 months ago (2016-02-16 19:49:55 UTC) #28
chrishtr
lgtm
4 years, 10 months ago (2016-02-16 20:27:05 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1653003002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1653003002/200001
4 years, 10 months ago (2016-02-16 21:03:54 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/67074)
4 years, 10 months ago (2016-02-16 21:40:12 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1653003002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1653003002/220001
4 years, 10 months ago (2016-02-17 21:08:43 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/67759)
4 years, 10 months ago (2016-02-17 21:18:47 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1653003002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1653003002/240001
4 years, 10 months ago (2016-02-17 21:25:22 UTC) #42
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years, 10 months ago (2016-02-17 23:22:18 UTC) #44
commit-bot: I haz the power
4 years, 10 months ago (2016-02-17 23:23:06 UTC) #46
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/b9c004266f7f0d0380935dfc8a527bb08409627d
Cr-Commit-Position: refs/heads/master@{#376025}

Powered by Google App Engine
This is Rietveld 408576698