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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2840883003: Experimental fix for scroll animation update bug. [DO NOT COMMIT THIS CHANGE]
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/scroll_offset_animations_impl.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 6965594181cb0a4dd868f89b7894ae6e36d2fdfa..baaacb65e37ed484c52b0c8d66064a61aa1e9b49 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2959,9 +2959,14 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
if (ScrollAnimationUpdateTarget(scroll_node, delta, delayed_by)) {
scroll_status.thread = SCROLL_ON_IMPL_THREAD;
} else {
- scroll_status.thread = SCROLL_IGNORED;
- scroll_status.main_thread_scrolling_reasons =
- MainThreadScrollingReason::kNotScrollable;
+ if (ScrollAnimationCreate(scroll_node, scroll_delta, delayed_by)) {
+ scroll_animating_latched_node_id_ = scroll_node->id;
+ scroll_status.thread = SCROLL_ON_IMPL_THREAD;
+ } else {
+ scroll_status.thread = SCROLL_IGNORED;
+ scroll_status.main_thread_scrolling_reasons =
+ MainThreadScrollingReason::kNotScrollable;
+ }
}
return scroll_status;
}
« no previous file with comments | « cc/animation/scroll_offset_animations_impl.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698