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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1646663002: Refactor Scroll Customization to share cc::ScrollStateData with blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linking. Created 4 years, 10 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/input/scroll_state_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 7eaa142fde40031ce88e0237ff1b3724ced2ecbf..a9c7e52587abfbf3fc0a21f555abf2c6beecc2ec 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2634,8 +2634,12 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
return scroll_status;
}
- ScrollState scroll_state(0, 0, viewport_point.x(), viewport_point.y(), 0, 0,
- false, true, false);
+ ScrollStateData scroll_state_data;
+ scroll_state_data.start_position_x = viewport_point.x();
+ scroll_state_data.start_position_y = viewport_point.y();
+ scroll_state_data.is_in_inertial_phase = true;
+ ScrollState scroll_state(scroll_state_data);
+
// ScrollAnimated is used for animated wheel scrolls. We find the first layer
// that can scroll and set up an animation of its scroll offset. Note that
// this does not currently go through the scroll customization and viewport
@@ -3854,7 +3858,8 @@ void LayerTreeHostImpl::LayerTransformIsPotentiallyAnimatingChanged(
void LayerTreeHostImpl::ScrollOffsetAnimationFinished() {
// TODO(majidvp): We should pass in the original starting scroll position here
- ScrollState scroll_state(0, 0, 0, 0, 0, 0, false, false, false);
+ ScrollStateData scroll_state_data;
+ ScrollState scroll_state(scroll_state_data);
ScrollEnd(&scroll_state);
}
« no previous file with comments | « cc/input/scroll_state_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698