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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2472943003: Revert "Touchpad scroll latching enabled for Mac behind flag." (Closed)
Patch Set: Better merge. Created 4 years, 1 month 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/trees/layer_tree_host_impl.h ('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 d1f8ff5df6ee9c8f7b443c24c097c7953beaf92c..dbd9e0fb2142e7e9daa3b5a32cf2e0934af5ecc5 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2652,11 +2652,6 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
MainThreadScrollingReason::kNotScrollingOnMain;
TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBegin");
- // On Mac a scroll begin with |inertial_phase| = true happens to handle a
- // fling.
- if (scroll_state->is_in_inertial_phase())
- return FlingScrollBegin();
-
ClearCurrentlyScrollingLayer();
gfx::Point viewport_point(scroll_state->position_x(),
@@ -2824,6 +2819,7 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
ScrollStateData scroll_state_data;
scroll_state_data.position_x = viewport_point.x();
scroll_state_data.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
@@ -2862,12 +2858,7 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
}
}
scroll_state.set_is_ending(true);
- // TODO(Sahel): Once the touchpad scroll latching for Non-mac devices is
- // implemented, the current scrolling layer should not get cleared after
- // each animation (crbug.com/526463).
ScrollEnd(&scroll_state);
- ClearCurrentlyScrollingLayer();
-
return scroll_status;
}
@@ -3185,12 +3176,7 @@ void LayerTreeHostImpl::ScrollEnd(ScrollState* scroll_state) {
DistributeScrollDelta(scroll_state);
top_controls_manager_->ScrollEnd();
-
- if (scroll_state->is_in_inertial_phase()) {
- // Only clear the currently scrolling layer if we know the scroll is done.
- // A non-inertial scroll end could be followed by an inertial scroll.
- ClearCurrentlyScrollingLayer();
- }
+ ClearCurrentlyScrollingLayer();
}
InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() {
@@ -4030,11 +4016,7 @@ void LayerTreeHostImpl::ScrollOffsetAnimationFinished() {
// TODO(majidvp): We should pass in the original starting scroll position here
ScrollStateData scroll_state_data;
ScrollState scroll_state(scroll_state_data);
- // TODO(Sahel): Once the touchpad scroll latching for Non-mac devices is
- // implemented, the current scrolling layer should not get cleared after
- // each animation (crbug.com/526463).
ScrollEnd(&scroll_state);
- ClearCurrentlyScrollingLayer();
}
gfx::ScrollOffset LayerTreeHostImpl::GetScrollOffsetForAnimation(
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698