| 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 07c420ba54ea408d88b6f2c24bdeec0c5f18c925..a4ac0be344d0a996f0fa8d2a13d9539ea6b7d29f 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2689,11 +2689,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(),
|
| @@ -2856,7 +2851,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
|
| @@ -2894,12 +2889,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;
|
| }
|
|
|
| @@ -3253,12 +3243,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() {
|
| @@ -4130,11 +4115,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(
|
|
|