| 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 072e8e7efbf2d6ae30186f8514e2d47b790961b8..a568cf46d8d881815a5ac967ff454e484e1c098a 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2252,6 +2252,15 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
|
| applied_delta = ScrollLayerWithLocalDelta(layer_impl, pending_delta);
|
| }
|
|
|
| + if (layer_impl == InnerViewportScrollLayer()) {
|
| + unused_root_delta.Subtract(applied_delta);
|
| + const float kOverscrollEpsilon = 0.01f;
|
| + if (std::abs(unused_root_delta.x()) < kOverscrollEpsilon)
|
| + unused_root_delta.set_x(0.0f);
|
| + if (std::abs(unused_root_delta.y()) < kOverscrollEpsilon)
|
| + unused_root_delta.set_y(0.0f);
|
| + }
|
| +
|
| // If the layer wasn't able to move, try the next one in the hierarchy.
|
| float move_threshold = 0.1f;
|
| bool did_move_layer_x = std::abs(applied_delta.x()) > move_threshold;
|
| @@ -2267,15 +2276,6 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
|
| break;
|
| }
|
|
|
| - if (layer_impl == InnerViewportScrollLayer()) {
|
| - unused_root_delta.Subtract(applied_delta);
|
| - const float kOverscrollEpsilon = 0.01f;
|
| - if (std::abs(unused_root_delta.x()) < kOverscrollEpsilon)
|
| - unused_root_delta.set_x(0.0f);
|
| - if (std::abs(unused_root_delta.y()) < kOverscrollEpsilon)
|
| - unused_root_delta.set_y(0.0f);
|
| - }
|
| -
|
| did_lock_scrolling_layer_ = true;
|
| if (!should_bubble_scrolls_) {
|
| active_tree_->SetCurrentlyScrollingLayer(layer_impl);
|
|
|