| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index 42e2f709eb6639c4dd848fa16a8e42aa43a96d52..1c2431bd3082977cd1d2a93715b0efa34036a151 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -17,6 +17,7 @@
|
| #include "cc/debug/layer_tree_debug_state.h"
|
| #include "cc/debug/micro_benchmark_impl.h"
|
| #include "cc/debug/traced_value.h"
|
| +#include "cc/input/scroll_state.h"
|
| #include "cc/layers/layer_utils.h"
|
| #include "cc/layers/painted_scrollbar_layer_impl.h"
|
| #include "cc/output/copy_output_request.h"
|
| @@ -196,6 +197,30 @@ void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) {
|
| SetNeedsPushProperties();
|
| }
|
|
|
| +void LayerImpl::DistributeScroll(ScrollState* scroll_state) {
|
| + DCHECK(scroll_state);
|
| + if (scroll_state->FullyConsumed())
|
| + return;
|
| +
|
| + scroll_state->DistributeToScrollChainDescendant();
|
| +
|
| + // If the scroll doesn't propagate, and we're currently scrolling
|
| + // a layer other than this one, prevent the scroll from
|
| + // propagating to this layer.
|
| + if (!scroll_state->should_propagate() &&
|
| + scroll_state->delta_consumed_for_scroll_sequence() &&
|
| + scroll_state->current_native_scrolling_layer() != this) {
|
| + return;
|
| + }
|
| +
|
| + ApplyScroll(scroll_state);
|
| +}
|
| +
|
| +void LayerImpl::ApplyScroll(ScrollState* scroll_state) {
|
| + DCHECK(scroll_state);
|
| + layer_tree_impl()->ApplyScroll(this, scroll_state);
|
| +}
|
| +
|
| void LayerImpl::SetNumDescendantsThatDrawContent(int num_descendants) {
|
| if (num_descendants_that_draw_content_ == num_descendants)
|
| return;
|
|
|