summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc b/chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc
index 683df2318be..0f4f67818d1 100644
--- a/chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc
+++ b/chromium/third_party/blink/renderer/core/scroll/programmatic_scroll_animator.cc
@@ -164,14 +164,14 @@ void ProgrammaticScrollAnimator::UpdateCompositorAnimations() {
}
}
-void ProgrammaticScrollAnimator::LayerForCompositedScrollingDidChange(
- CompositorAnimationTimeline* timeline) {
- ReattachCompositorAnimationIfNeeded(timeline);
+void ProgrammaticScrollAnimator::MainThreadScrollingDidChange() {
+ ReattachCompositorAnimationIfNeeded(
+ scrollable_area_->GetCompositorAnimationTimeline());
- // If the composited scrolling layer is lost during a composited animation,
- // continue the animation on the main thread.
+ // If the scrollable area switched to require main thread scrolling during a
+ // composited animation, continue the animation on the main thread.
if (run_state_ == RunState::kRunningOnCompositor &&
- !scrollable_area_->LayerForScrolling()) {
+ scrollable_area_->ShouldScrollOnMainThread()) {
RemoveAnimation();
run_state_ = RunState::kRunningOnMainThread;
animation_curve_->SetInitialValue(