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 54dc7bbd336bc73f606cdad27254392eed83b148..f27e38a6f83d236116f3aa90d30313c21b552939 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -3237,6 +3237,14 @@ void LayerTreeHostImpl::ApplyScroll(ScrollNode* scroll_node, |
scroll_node, delta, viewport_point, |
scroll_state->is_direct_manipulation(), |
&scroll_state->layer_tree_impl()->property_trees()->scroll_tree); |
+ if (scroll_node->scroll_boundary_behavior.x != |
bokan
2017/05/19 19:35:57
I believe you'll also need similar logic in LTHI::
sunyunjia
2017/05/25 20:07:10
Done.
|
+ ScrollBoundaryBehavior::kScrollBoundaryBehaviorTypeAuto && |
+ std::abs(delta.x()) > std::abs(delta.y())) |
+ applied_delta.set_x(delta.x()); |
+ if (scroll_node->scroll_boundary_behavior.y != |
+ ScrollBoundaryBehavior::kScrollBoundaryBehaviorTypeAuto && |
+ std::abs(delta.y()) > std::abs(delta.x())) |
+ applied_delta.set_y(delta.y()); |
bokan
2017/05/19 19:35:57
I think we should do this in DistributeScrollDelta
sunyunjia
2017/05/25 20:07:10
Done.
|
} |
// If the layer wasn't able to move, try the next one in the hierarchy. |
@@ -3298,10 +3306,8 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) { |
break; |
} |
- if (!scroll_node->scrollable) |
- continue; |
- |
- current_scroll_chain.push_front(scroll_node); |
+ if (scroll_node->scrollable) |
+ current_scroll_chain.push_front(scroll_node); |
} |
} |
scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain, |