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

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)

Created:
4 years, 2 months ago by skobes
Modified:
4 years, 1 month ago
Reviewers:
bokan, ojan, ymalik, eae, szager1
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dglazkov+blink, dshwang, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Tie scroll anchoring adjustments to frame lifecycle instead of layout. This applies suppressions to the entire animation frame, which lets us spec the behavior without referring to layout passes. ScrollAnchor::notifyBeforeLayout, formerly known as save(), adds the scroller to a queue owned by the FrameView, which iterates the queue to do the scroll adjustments after layout, but before the compositing update. Web APIs that force synchronous layout also force these adjustments to happen synchronously. This means it is impossible for script to observe an un-adjusted scroll position after an anchor node movement. BUG=648780 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/e0e3af8004e7f656ae8e1cb45c76a4a013c43961 Cr-Commit-Position: refs/heads/master@{#428155}

Patch Set 1 #

Total comments: 11

Patch Set 2 : address review comments #

Total comments: 9

Patch Set 3 : rebase #

Patch Set 4 : force adjustments in Document::updateStyleAndLayout #

Total comments: 5

Patch Set 5 : add DCHECK #

Messages

Total messages: 61 (33 generated)
skobes
4 years, 2 months ago (2016-10-13 01:40:05 UTC) #18
ymalik
Thanks, some questions: 1) Are we just landing this in favor of anchoring on every ...
4 years, 2 months ago (2016-10-13 13:05:40 UTC) #21
bokan
https://codereview.chromium.org/2404393003/diff/60001/third_party/WebKit/Source/core/layout/ScrollAnchor.h File third_party/WebKit/Source/core/layout/ScrollAnchor.h (right): https://codereview.chromium.org/2404393003/diff/60001/third_party/WebKit/Source/core/layout/ScrollAnchor.h#newcode91 third_party/WebKit/Source/core/layout/ScrollAnchor.h:91: // by the main frame's FrameView. On 2016/10/13 13:05:40, ...
4 years, 2 months ago (2016-10-13 14:23:57 UTC) #22
skobes
On 2016/10/13 13:05:40, ymalik wrote: > 1) Are we just landing this in favor of ...
4 years, 2 months ago (2016-10-13 17:21:38 UTC) #24
ymalik
lgtm https://codereview.chromium.org/2404393003/diff/60001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp File third_party/WebKit/Source/web/tests/VisualViewportTest.cpp (right): https://codereview.chromium.org/2404393003/diff/60001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp#newcode2000 third_party/WebKit/Source/web/tests/VisualViewportTest.cpp:2000: webViewImpl()->updateAllLifecyclePhases(); On 2016/10/13 17:21:37, skobes wrote: > On ...
4 years, 2 months ago (2016-10-13 17:53:20 UTC) #25
szager1
https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2652 third_party/WebKit/Source/core/frame/FrameView.cpp:2652: forAllNonThrottledFrameViews([](FrameView& frameView) { Shouldn't this happen before updateViewportIntersectionsForSubtree? https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ...
4 years, 2 months ago (2016-10-13 17:54:49 UTC) #27
skobes
https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2652 third_party/WebKit/Source/core/frame/FrameView.cpp:2652: forAllNonThrottledFrameViews([](FrameView& frameView) { On 2016/10/13 17:54:49, szager1 wrote: > ...
4 years, 2 months ago (2016-10-13 18:00:31 UTC) #28
szager1
https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2652 third_party/WebKit/Source/core/frame/FrameView.cpp:2652: forAllNonThrottledFrameViews([](FrameView& frameView) { On 2016/10/13 18:00:31, skobes wrote: > ...
4 years, 2 months ago (2016-10-13 18:50:56 UTC) #29
bokan
https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp File third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp#newcode187 third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp:187: case ClampingScroll: On 2016/10/13 18:50:56, szager1 wrote: > On ...
4 years, 2 months ago (2016-10-13 18:53:59 UTC) #30
skobes
https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp File third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp#newcode187 third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp:187: case ClampingScroll: On 2016/10/13 18:50:56, szager1 wrote: > This ...
4 years, 2 months ago (2016-10-13 18:55:19 UTC) #31
szager1
lgtm https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp File third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp (right): https://codereview.chromium.org/2404393003/diff/80001/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp#newcode187 third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp:187: case ClampingScroll: On 2016/10/13 18:55:19, skobes wrote: > ...
4 years, 2 months ago (2016-10-13 19:00:39 UTC) #32
ojan
Hmmm...now that I see the patch, I'm kind of concerned about how we decide which ...
4 years, 2 months ago (2016-10-13 19:17:40 UTC) #33
skobes
On 2016/10/13 19:17:40, ojan wrote: > Hmmm...now that I see the patch, I'm kind of ...
4 years, 2 months ago (2016-10-13 19:42:38 UTC) #34
ojan
Stefan and I talked about it over lunch today and it's hard for me to ...
4 years, 2 months ago (2016-10-13 22:55:28 UTC) #35
skobes
On 2016/10/13 22:55:28, ojan wrote: > From my perspective at the moment, I think we ...
4 years, 2 months ago (2016-10-14 16:47:51 UTC) #36
skobes
Updated for option #3, PTAL.
4 years, 1 month ago (2016-10-26 23:30:50 UTC) #39
bokan
Code is lgtm if y'all are happy with the behavior. https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode247 ...
4 years, 1 month ago (2016-10-27 15:41:49 UTC) #43
skobes
https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode247 third_party/WebKit/Source/core/layout/ScrollAnchor.cpp:247: m_scroller->isRootFrameViewport() On 2016/10/27 15:41:48, bokan wrote: > Override ScrollableArea::scrollAnchor ...
4 years, 1 month ago (2016-10-27 16:57:20 UTC) #44
bokan
https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode247 third_party/WebKit/Source/core/layout/ScrollAnchor.cpp:247: m_scroller->isRootFrameViewport() On 2016/10/27 16:57:20, skobes wrote: > On 2016/10/27 ...
4 years, 1 month ago (2016-10-27 17:13:40 UTC) #45
ojan
One crash concern, lgtm if I'm reading the code wrong. https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2795 ...
4 years, 1 month ago (2016-10-27 19:02:25 UTC) #46
skobes
https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2404393003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2795 third_party/WebKit/Source/core/frame/FrameView.cpp:2795: scroller->scrollAnchor()->adjust(); On 2016/10/27 19:02:24, ojan wrote: > It looks ...
4 years, 1 month ago (2016-10-27 19:44:09 UTC) #48
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/2404393003/140001
4 years, 1 month ago (2016-10-27 19:45:04 UTC) #51
skobes
+eae for platform/OWNERS
4 years, 1 month ago (2016-10-27 19:51:16 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/291288)
4 years, 1 month ago (2016-10-27 19:53:22 UTC) #55
eae
RS LGTM
4 years, 1 month ago (2016-10-27 20:42:27 UTC) #56
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/2404393003/140001
4 years, 1 month ago (2016-10-27 20:44:03 UTC) #58
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 1 month ago (2016-10-27 22:10:41 UTC) #59
commit-bot: I haz the power
4 years, 1 month ago (2016-10-27 22:13:56 UTC) #61
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e0e3af8004e7f656ae8e1cb45c76a4a013c43961
Cr-Commit-Position: refs/heads/master@{#428155}

Powered by Google App Engine
This is Rietveld 408576698