[go: nahoru, domu]

Defer mid-frame scroll update with linked animation.

InputHandlerProxy queues events as they come in, but sometimes flushes
the queue immediately (e.g. for is_first_wheel_scroll_update).

If an animation depends on the scroll offset, we shouldn't process a
GestureScrollUpdate after animations have ticked.  Instead, keep it
queued until the next frame begins.

Bug: 1431186
Change-Id: I8628ee8809fa1149ff8e8a8a065c9f48e9be9969
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4457289
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1134600}
diff --git a/cc/animation/animation_timeline.cc b/cc/animation/animation_timeline.cc
index f2ea00f..0a31a87bf 100644
--- a/cc/animation/animation_timeline.cc
+++ b/cc/animation/animation_timeline.cc
@@ -184,6 +184,10 @@
   return false;
 }
 
+bool AnimationTimeline::IsLinkedToScroller(ElementId scroller) const {
+  return false;
+}
+
 bool AnimationTimeline::IsOwnerThread() const {
   return !animation_host_ || animation_host_->IsOwnerThread();
 }