| 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 566fb577d2ff5f489ac82846e6d20ba075f924a7..fc3ffdb95b5898ec66958f64879851cd95d8734c 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2681,10 +2681,16 @@ InputHandlerScrollResult LayerTreeHostImpl::ScrollBy(
|
| }
|
|
|
| did_lock_scrolling_layer_ = true;
|
| - if (!allow_bubbling_for_current_layer) {
|
| +
|
| + // When scrolls are allowed to bubble, it's important that the original
|
| + // scrolling layer be preserved. This ensures that, after a scroll bubbles,
|
| + // the user can reverse scroll directions and immediately resume scrolling
|
| + // the original layer that scrolled.
|
| + if (!should_bubble_scrolls_)
|
| active_tree_->SetCurrentlyScrollingLayer(layer_impl);
|
| +
|
| + if (!allow_bubbling_for_current_layer)
|
| break;
|
| - }
|
|
|
| if (allow_unrestricted_bubbling_for_current_layer) {
|
| pending_delta -= applied_delta;
|
|
|