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

Issue 2383113003: Refactor ScrollableArea::setScrollPosition. (Closed)

Created:
4 years, 2 months ago by szager1
Modified:
4 years, 2 months ago
Reviewers:
bokan, pdr., skobes
CC:
chromium-reviews, blink-reviews-html_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, eae+blinkwatch, shans, kinuko+watch, rwlbuis, krit, drott+blinkwatch_chromium.org, szager+layoutwatch_chromium.org, Justin Novosad, dglazkov+blink, Rik, jchaffraix+rendering, blink-reviews-paint_chromium.org, blink-reviews, ajuma+watch_chromium.org, Eric Willigers, rjwright, zoltan1, blink-reviews-layout_chromium.org, jbroman, pdr+graphicswatchlist_chromium.org, darktears, Stephen Chennney, blink-reviews-animation_chromium.org, pdr+renderingwatchlist_chromium.org, leviw+renderwatch, slimming-paint-reviews_chromium.org, blink-layers+watch_chromium.org, f(malita), danakj+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor ScrollableArea::setScrollPosition. - Eliminate some redundant PaintLayerScrollableArea methods and indirection. - ScrollableArea::setScrollPosition now always clamps its argument. Code inspection revealed that nearly all callers were clamping the position argument anyway. - ScrollableArea::setScrollPosition returns immediately if the scroll position did not change. This avoids a bunch of unnecessary work. - For the rare instances where the scroll position should not be clamped, or the scroll position update code should run even if the scroll position didn't change, add the method setScrollPositionUnconditionally. - When modifying the scroll position due to a change in effective zoom, preserve the offset from beginning of flow, rather than the distance from top-left of overflow area. BUG=417782 R=skobes@chromium.org,bokan@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/cddc823c56d453758003a831fd5a2475e94c0387 Cr-Commit-Position: refs/heads/master@{#423033}

Patch Set 1 #

Total comments: 8

Patch Set 2 : tweaks #

Patch Set 3 : Back out offset/position renames #

Patch Set 4 : rebase #

Patch Set 5 : Fix clamping, comment tweaks #

Total comments: 16

Patch Set 6 : nits and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -140 lines) Patch
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 8 chunks +34 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp View 1 2 5 chunks +25 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ScrollEnums.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/SpatialNavigation.cpp View 1 2 1 chunk +4 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h View 1 2 3 4 2 chunks +9 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 6 chunks +20 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 4 5 1 chunk +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp View 1 2 3 1 chunk +10 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 44 (26 generated)
szager1
Note that some of the naming here ('position' and 'offsetFromOrigin') will change in the dependent ...
4 years, 2 months ago (2016-10-01 18:07:57 UTC) #6
bokan
Thank you for splitting it up, this is much easier to digest. I'm about half ...
4 years, 2 months ago (2016-10-01 20:32:47 UTC) #7
szager1
+pdr for Source/platform https://codereview.chromium.org/2383113003/diff/1/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (right): https://codereview.chromium.org/2383113003/diff/1/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#newcode2824 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:2824: // Note: this is just the ...
4 years, 2 months ago (2016-10-02 19:35:29 UTC) #10
skobes
I am totally confused by your change description, your definitions of 'position' and 'offsetFromOrigin' are ...
4 years, 2 months ago (2016-10-03 18:24:11 UTC) #11
szager1
On 2016/10/03 18:24:11, skobes wrote: > I am totally confused by your change description, your ...
4 years, 2 months ago (2016-10-03 20:00:25 UTC) #12
skobes
On 2016/10/03 20:00:25, szager1 wrote: > You and I have discussed this before, and we ...
4 years, 2 months ago (2016-10-03 21:25:07 UTC) #13
pdr.
Please wrap the change description to 72 characters. This makes it more readable in various ...
4 years, 2 months ago (2016-10-04 21:21:02 UTC) #23
szager1
OK, here is a minimal patch without any renaming, PTAL.
4 years, 2 months ago (2016-10-04 21:43:46 UTC) #26
bokan
Just a nit and a question but otherwise lgtm https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3565 third_party/WebKit/Source/core/frame/FrameView.cpp:3565: ...
4 years, 2 months ago (2016-10-04 22:17:25 UTC) #31
skobes
lgtm w/ nits https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode550 third_party/WebKit/Source/core/layout/LayoutBox.cpp:550: getScrollableArea()->scrollToOffset( nit: use local scrollableArea var ...
4 years, 2 months ago (2016-10-04 22:25:26 UTC) #32
szager1
https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3565 third_party/WebKit/Source/core/frame/FrameView.cpp:3565: void FrameView::setScrollOffset(const DoublePoint& position, On 2016/10/04 22:17:25, bokan wrote: ...
4 years, 2 months ago (2016-10-04 22:54:14 UTC) #33
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/2383113003/100001
4 years, 2 months ago (2016-10-04 22:55:01 UTC) #36
bokan
https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode810 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:810: ScrollableArea::setScrollPosition(scrollPositionDouble(), On 2016/10/04 22:54:14, szager1 wrote: > On 2016/10/04 ...
4 years, 2 months ago (2016-10-04 22:56:52 UTC) #37
szager1
https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode810 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:810: ScrollableArea::setScrollPosition(scrollPositionDouble(), On 2016/10/04 22:56:51, bokan wrote: > On 2016/10/04 ...
4 years, 2 months ago (2016-10-04 23:37:38 UTC) #38
bokan
https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2383113003/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode810 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:810: ScrollableArea::setScrollPosition(scrollPositionDouble(), On 2016/10/04 23:37:37, szager1 wrote: > On 2016/10/04 ...
4 years, 2 months ago (2016-10-04 23:38:38 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-05 01:09:48 UTC) #41
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/cddc823c56d453758003a831fd5a2475e94c0387 Cr-Commit-Position: refs/heads/master@{#423033}
4 years, 2 months ago (2016-10-05 01:11:22 UTC) #43
imcheng
4 years, 2 months ago (2016-10-05 01:27:48 UTC) #44
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/2387393003/ by imcheng@chromium.org.

The reason for reverting is: Blocks revert of another patch:
https://codereview.chromium.org/2395683002/.

Powered by Google App Engine
This is Rietveld 408576698