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 1150003003: Cleanup ScrollableArea scrolling API (Closed)

Created:
5 years, 7 months ago by bokan
Modified:
5 years, 6 months ago
Reviewers:
skobes
CC:
blink-reviews, szager+layoutwatch_chromium.org, dshwang, eae+blinkwatch, shans, apavlov+blink_chromium.org, rwlbuis, krit, caseq+blink_chromium.org, pdr+graphicswatchlist_chromium.org, aboxhall, pfeldman+blink_chromium.org, blink-reviews-html_chromium.org, yurys+blink_chromium.org, Justin Novosad, danakj, blink-reviews-dom_chromium.org, dglazkov+blink, je_julie, gavinp+loader_chromium.org, jchaffraix+rendering, blink-reviews-paint_chromium.org, Eric Willigers, rjwright, zoltan1, sof, jbroman, lushnikov+blink_chromium.org, dmazzoni, darktears, Nate Chapin, sergeyv+blink_chromium.org, devtools-reviews_chromium.org, tyoshino+watch_chromium.org, blink-reviews-rendering, Rik, blink-reviews-animation_chromium.org, pdr+renderingwatchlist_chromium.org, leviw+renderwatch, slimming-paint-reviews_chromium.org, blink-layers+watch_chromium.org, blink-reviews-events_chromium.org, nektarios, f(malita), Stephen Chennney, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Cleanup ScrollableArea scrolling API This CL attempts to consolidate the various scroll methods in ScrollableArea and associated classes into a more rational set. A summary of the changes: -Consolidated most scrolling to happen through setScrollPosition -Added an enum ScrollType since the behavior of a scroll varies slightly based on whether the scroll is initiated programmatically, by the user, or comes from a compositor update. -Renamed scroll to userScroll to make it more clear that this method is for scroll gestures originating from user generated events. -Call updateCompositorScrollAnimations on RootFrameViewport since the new control flow causes us to use RootFrameViewport's scroll animators in the programmatic case. -Removed unused methods in ScrollAnimatorMac -Route instant programmatic scrolls through ProgrammaticScrollAnimator rather than ScrollAnimator. In general, made the two classes more symmetric w.r.t each other. e.g updating ScrollableArea now takes same path through notifyPositionChanged -> ScrollableArea::scrollPositionChanged for both classes. -Moved scroll position truncation to happen in scrollPositionChanged rather than ScrollAnimators. BUG=

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -98 lines) Patch
M Source/core/frame/FrameView.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/frame/RootFrameViewportTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/Page.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M Source/platform/mac/ScrollAnimatorMac.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/mac/ScrollAnimatorMac.mm View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M Source/platform/scroll/ProgrammaticScrollAnimator.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/platform/scroll/ProgrammaticScrollAnimator.cpp View 5 chunks +16 lines, -5 lines 0 comments Download
M Source/platform/scroll/ScrollAnimator.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 4 2 chunks +5 lines, -8 lines 0 comments Download
M Source/platform/scroll/ScrollAnimatorNone.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/scroll/ScrollAnimatorNone.cpp View 1 2 3 4 2 chunks +11 lines, -12 lines 0 comments Download
M Source/platform/scroll/ScrollTypes.h View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download
M Source/platform/scroll/ScrollableArea.h View 1 2 3 4 3 chunks +5 lines, -9 lines 0 comments Download
M Source/platform/scroll/ScrollableArea.cpp View 1 2 3 4 6 chunks +26 lines, -29 lines 0 comments Download
M Source/platform/scroll/ScrollableAreaTest.cpp View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/web/tests/PinchViewportTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/ScrollAnimatorNoneTest.cpp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 13 (9 generated)
bokan
Hey Steve, WDYT? Compare the picture in this CL (http://bokan.ca/new-scrollablearea.png) vs what exists now: https://docs.google.com/presentation/d/1vmnIwRdJP25J2j6MbEADJeYmDNP88Bp6BxLuVZbFUyU/edit#slide=id.g9ca3a1661_0_8 ...
5 years, 6 months ago (2015-06-02 16:16:46 UTC) #10
skobes
On 2015/06/02 16:16:46, bokan wrote: > Hey Steve, WDYT? > > Compare the picture in ...
5 years, 6 months ago (2015-06-02 18:24:32 UTC) #11
bokan
> This CL is quite large. Is there any way to break it up into ...
5 years, 6 months ago (2015-06-02 18:33:09 UTC) #12
skobes
5 years, 6 months ago (2015-06-02 18:47:20 UTC) #13
On 2015/06/02 18:33:09, bokan wrote:
> I don't mean to do any refactoring there. I mean to unify the implementation
> with DPLScrollableArea and move it to ScrollableArea (or make it work through
> DPLSA). I'm thinking of things like how clamping and RTL paths diverge between
> these two classes.

Yeah unifying divergent behavior between FrameView and DPLSA is part of what we
are trying to do with root layer scrolling.  I'm just saying, don't think of it
as hoisting things from FrameView into ScrollableArea.  Rather, fix whatever
prevents DPLSA from being the sole implementation, and treat FrameView as
eventual dead code.

Powered by Google App Engine
This is Rietveld 408576698