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

Issue 1738243002: Removed main-thread one dimensional scrolling paths. (Closed)

Created:
4 years, 10 months ago by bokan
Modified:
4 years, 9 months ago
Reviewers:
skobes, jbroman, tdresser
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, Eric Willigers, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rjwright, rwlbuis, shans, sof, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@removeStepFromUserScroll
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Removed main-thread one dimensional scrolling paths. This patch is a large cleanup of the main-thread scrolling paths in Blink. The main change is the removal of most single dimension scrolling paths. These paths, going from EventHandler, through ScrollableAreas, and into ScrollAnimators used a single float and a ScrollDirection to determine how to scroll. This style of scrolling is needed only for a few cases: scrollbar and keyboard scrolling. The fact that Animators and ScrollableAreas work naturally in two dimensions complicated their interface and implementations needlessly. Implementing Wheel and Gesture scrolling required awkward 2-phase scrolls and coordination between them. I've completely replaced the one dimensional interfaces in ScrollableArea and ScrollAnimators with a more standard 2d FloatSize. It's now EventHandler's job, where needed, to translate a direction/float instruction to scroll into the necessary physical scroll used by ScrollableArea. This should make future work and potential CC scroll unification work more straightforward. Some other minor cleanups along the way: -ScrollAnimator and its children use a FloatPoint rather than two floats for current position. -Split EventHandler::scroll into logical and physical. Using it for both made the interface and usage complicated. -Additionally, I've littered a number of TODOs throughout these paths where I found issues and inconsistencies to clean up in future CLs. BUG=591124 Committed: https://crrev.com/f0713e7d9da9b89301ae0ae1228d51fbb2e17afc Cr-Commit-Position: refs/heads/master@{#378642}

Patch Set 1 #

Patch Set 2 : Removed TODO that was already fixed #

Total comments: 27

Patch Set 3 : Rebase #

Patch Set 4 : Addressed feedback, updated RootFrameViewport/ScrollableArea::userScroll #

Total comments: 10

Patch Set 5 : More review updates #

Total comments: 1

Patch Set 6 : Spelling nit #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -298 lines) Patch
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/frame/RootFrameViewport.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/RootFrameViewport.cpp View 1 2 3 4 5 1 chunk +61 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/frame/RootFrameViewportTest.cpp View 4 chunks +10 lines, -60 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 3 4 2 chunks +25 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 11 chunks +74 lines, -46 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm View 1 2 3 4 5 6 2 chunks +24 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 4 5 6 5 chunks +15 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h View 3 chunks +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp View 1 2 3 4 2 chunks +18 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp View 8 chunks +19 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollTypes.h View 3 chunks +17 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp View 1 2 3 1 chunk +25 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/Scrollbar.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 35 (17 generated)
bokan
+Tim for EventHandler and friends +Steve for ScrollableArea/ScrollAnimators
4 years, 10 months ago (2016-02-26 19:50:18 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1738243002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1738243002/1
4 years, 10 months ago (2016-02-26 19:53:19 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/29984)
4 years, 10 months ago (2016-02-26 20:57:10 UTC) #10
tdresser
Thanks, this looks like a nice cleanup. https://codereview.chromium.org/1738243002/diff/20001/third_party/WebKit/Source/core/frame/LocalFrame.cpp File third_party/WebKit/Source/core/frame/LocalFrame.cpp (right): https://codereview.chromium.org/1738243002/diff/20001/third_party/WebKit/Source/core/frame/LocalFrame.cpp#newcode797 third_party/WebKit/Source/core/frame/LocalFrame.cpp:797: // positive ...
4 years, 9 months ago (2016-02-29 14:53:43 UTC) #11
skobes
https://codereview.chromium.org/1738243002/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1738243002/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp#newcode572 third_party/WebKit/Source/core/dom/Element.cpp:572: // TODO(bokan): I think the scroll deltas here are ...
4 years, 9 months ago (2016-02-29 18:52:47 UTC) #12
bokan
PTAL. In particular, I fixed the ScrollResult calculations in RFV::userScroll and SA::userScroll (and improved clarity ...
4 years, 9 months ago (2016-03-01 05:56:24 UTC) #14
tdresser
Thanks, this is a lot clearer. LGTM. https://codereview.chromium.org/1738243002/diff/80001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/1738243002/diff/80001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp#newcode255 third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:255: FloatSize visualUsedDelta ...
4 years, 9 months ago (2016-03-01 15:28:10 UTC) #15
bokan
https://codereview.chromium.org/1738243002/diff/80001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/1738243002/diff/80001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp#newcode255 third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:255: FloatSize visualUsedDelta = On 2016/03/01 15:28:10, tdresser wrote: > ...
4 years, 9 months ago (2016-03-01 18:22:58 UTC) #16
skobes
lgtm https://codereview.chromium.org/1738243002/diff/100001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/1738243002/diff/100001/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp#newcode237 third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:237: // TODO(bokan/ymalik): Once smooth scrolling is permanantly enabled ...
4 years, 9 months ago (2016-03-01 18:55:15 UTC) #17
bokan
+jbroman@ for Source/platform OWNER
4 years, 9 months ago (2016-03-01 18:59:21 UTC) #19
jbroman
platform/ rs lgtm But this work seems complicated and connected to future work, so a ...
4 years, 9 months ago (2016-03-01 19:11:37 UTC) #20
bokan
I've created a bug to track all the related work here.
4 years, 9 months ago (2016-03-01 19:21:11 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1738243002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1738243002/120001
4 years, 9 months ago (2016-03-01 19:22:40 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/180129) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 9 months ago (2016-03-01 19:27:17 UTC) #27
jbroman
On 2016/03/01 at 19:21:11, bokan wrote: > I've created a bug to track all the ...
4 years, 9 months ago (2016-03-01 19:41:25 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1738243002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1738243002/140001
4 years, 9 months ago (2016-03-01 21:26:12 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 9 months ago (2016-03-02 01:14:45 UTC) #33
commit-bot: I haz the power
4 years, 9 months ago (2016-03-02 01:15:44 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f0713e7d9da9b89301ae0ae1228d51fbb2e17afc
Cr-Commit-Position: refs/heads/master@{#378642}

Powered by Google App Engine
This is Rietveld 408576698