diff options
-rw-r--r-- | cc/input/scroll_state.cc | 8 | ||||
-rw-r--r-- | cc/input/scroll_state.h | 10 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/cc/input/scroll_state.cc b/cc/input/scroll_state.cc index f0e7751..5591eae 100644 --- a/cc/input/scroll_state.cc +++ b/cc/input/scroll_state.cc @@ -6,11 +6,13 @@ #include <utility> -#include "cc/trees/layer_tree_impl.h" +#include "cc/layers/layer_impl.h" +#include "cc/layers/layer_list_impl.h" namespace cc { -ScrollState::ScrollState(ScrollStateData data) : data_(data) {} +ScrollState::ScrollState(ScrollStateData data) + : data_(data), layer_list_impl_(nullptr) {} ScrollState::ScrollState(const ScrollState& other) = default; @@ -28,7 +30,7 @@ void ScrollState::DistributeToScrollChainDescendant() { if (!scroll_chain_.empty()) { const ScrollNode* next = scroll_chain_.front(); scroll_chain_.pop_front(); - layer_tree_impl_->list()->LayerById(next->owner_id)->DistributeScroll(this); + layer_list_impl_->LayerById(next->owner_id)->DistributeScroll(this); } } diff --git a/cc/input/scroll_state.h b/cc/input/scroll_state.h index 35a4f97..0e17297 100644 --- a/cc/input/scroll_state.h +++ b/cc/input/scroll_state.h @@ -15,7 +15,7 @@ namespace cc { -class LayerTreeImpl; +class LayerListImpl; // ScrollState is based on the proposal for scroll customization in blink, found // here: https://goo.gl/1ipTpP. @@ -61,10 +61,10 @@ class CC_EXPORT ScrollState { data_.is_direct_manipulation = is_direct_manipulation; } - void set_scroll_chain_and_layer_tree( + void set_scroll_chain_and_layer_list( const std::list<const ScrollNode*>& scroll_chain, - LayerTreeImpl* layer_tree_impl) { - layer_tree_impl_ = layer_tree_impl; + LayerListImpl* layer_list_impl) { + layer_list_impl_ = layer_list_impl; scroll_chain_ = scroll_chain; } @@ -97,7 +97,7 @@ class CC_EXPORT ScrollState { private: ScrollStateData data_; - LayerTreeImpl* layer_tree_impl_; + LayerListImpl* layer_list_impl_; std::list<const ScrollNode*> scroll_chain_; }; diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index ab3e020..8757f14 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -2977,8 +2977,8 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) { current_scroll_chain.push_front(scroll_node); } } - scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain, - active_tree()); + scroll_state->set_scroll_chain_and_layer_list(current_scroll_chain, + active_list()); scroll_state->DistributeToScrollChainDescendant(); } |