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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2360963003: Revert "Touchpad scroll latching enabled for Mac behind flag." (Closed)
Patch Set: Created 4 years, 3 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/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 a519a1b83c385191c2ae856eb11e4abb061d69a4..8ee41c2275e6ecaf1d5555b2704c7bf8d5656ca6 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2701,11 +2701,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(),
@@ -2868,7 +2863,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 = false;
+ 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
@@ -2906,12 +2901,7 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
}
}
scroll_state.set_is_ending(true);
- // TODO(Sahel): Once the touchpad scroll latching for Non-mac devices is
- // impelemented, the current scrolling layer should not get cleared after
- // each animation (crbug.com/526463).
ScrollEnd(&scroll_state);
- ClearCurrentlyScrollingLayer();
-
return scroll_status;
}
@@ -3265,12 +3255,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() {
@@ -4142,11 +4127,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
- // impelemented, 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