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

Issue 2576963002: Scroll the position into view when the content is not visible. (Closed)

Created:
4 years ago by sunyunjia
Modified:
3 years, 11 months ago
Reviewers:
bokan
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, dshwang, jchaffraix+rendering, blink-reviews-paint_chromium.org, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Scroll the position into view when the content is not visible. Previously, we implement scrollIntoView by scrolling the intersection of the viewport and the content. However, when the content is not visible in the viewport, e.g. outside boundary and the viewport's overflow attribute is hidden, the intersection would be empty and the browser would stop the scrolling logic. In this case, we presume the webpage wants to scroll the position of the content but for some reason doesn't want to show it. In this patch, we scroll the content's position for this special case. BUG=673396 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/961e2d024412588edffbef5b3f6dfdfd2646761f Cr-Commit-Position: refs/heads/master@{#441469}

Patch Set 1 #

Patch Set 2 : typo #

Total comments: 4

Patch Set 3 : Move the logic to a static helper function. #

Total comments: 2

Patch Set 4 : Scroll the content rather than the viewport. #

Total comments: 2

Patch Set 5 : Merge the duplicate blocks. #

Total comments: 1

Patch Set 6 : Merge branch 'master' of https://chromium.googlesource.com/chromium/src into anchor-pr1 #

Patch Set 7 : remove the if condition. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -16 lines) Patch
A third_party/WebKit/LayoutTests/fast/scrolling/scroll-into-view-hidden-element.html View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 5 6 2 chunks +14 lines, -16 lines 0 comments Download

Messages

Total messages: 52 (40 generated)
sunyunjia
PTAL, thanks!
4 years ago (2016-12-15 16:11:26 UTC) #16
bokan
https://codereview.chromium.org/2576963002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1650 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1650: .localToAbsoluteQuad(FloatQuad(FloatRect(intersection( this long call chain is really obscuring the ...
4 years ago (2016-12-15 21:31:20 UTC) #17
sunyunjia
PTAL, thanks! https://codereview.chromium.org/2576963002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1650 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1650: .localToAbsoluteQuad(FloatQuad(FloatRect(intersection( On 2016/12/15 21:31:19, bokan wrote: > ...
4 years ago (2016-12-19 18:05:44 UTC) #24
bokan
https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1658 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1658: return localToAbsolute(box(), localExposeRect); This changed from layerBounds in your ...
4 years ago (2016-12-19 20:29:37 UTC) #28
sunyunjia
https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1658 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1658: return localToAbsolute(box(), localExposeRect); On 2016/12/19 20:29:36, bokan wrote: > ...
4 years ago (2016-12-19 21:35:09 UTC) #31
bokan
On 2016/12/19 21:35:09, sunyunjia wrote: > https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp > File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): > > https://codereview.chromium.org/2576963002/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1658 > ...
4 years ago (2016-12-20 15:43:50 UTC) #35
bokan
https://codereview.chromium.org/2576963002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1654 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1654: LayoutRect intersect = This part is duplicated below. I ...
4 years ago (2016-12-20 15:43:56 UTC) #36
sunyunjia
https://codereview.chromium.org/2576963002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1654 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1654: LayoutRect intersect = On 2016/12/20 15:43:56, bokan wrote: > ...
3 years, 11 months ago (2017-01-04 19:32:37 UTC) #38
bokan
lgtm % suggestion https://codereview.chromium.org/2576963002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2576963002/diff/120001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1653 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1653: if (newScrollOffset != oldScrollOffset) { I ...
3 years, 11 months ago (2017-01-04 19:41:24 UTC) #40
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/2576963002/160001
3 years, 11 months ago (2017-01-04 21:18:24 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:160001)
3 years, 11 months ago (2017-01-04 21:23:03 UTC) #50
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 21:27:15 UTC) #52
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/961e2d024412588edffbef5b3f6dfdfd2646761f
Cr-Commit-Position: refs/heads/master@{#441469}

Powered by Google App Engine
This is Rietveld 408576698