Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 0b76c707c300350ea5cf56a1412fe38e4411144f..51e6965fd8dc85ebeae43b1d37c0e80b7fef42e7 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -80,7 +80,8 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) |
| debug_info_(nullptr), |
| has_will_change_transform_hint_(false), |
| needs_push_properties_(false), |
| - scrollbars_hidden_(false) { |
| + scrollbars_hidden_(false), |
| + scroll_boundary_behavior_(SCROLL_BOUNDARY_BEHAVIOR_PROPAGATE) { |
|
bokan
2017/03/23 13:18:26
How does a LayerImpl get scroll_boundary_behavior_
sunyunjia
2017/03/23 20:16:54
Yeah, that's added.
bokan
2017/03/23 21:52:19
Sorry, actually, now that you're storing the bit i
|
| DCHECK_GT(layer_id_, 0); |
| DCHECK(layer_tree_impl_); |
| @@ -348,6 +349,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { |
| layer->SetScrollClipLayer(scroll_clip_layer_id_); |
| layer->SetElementId(element_id_); |
| layer->SetMutableProperties(mutable_properties_); |
| + layer->SetScrollBoundaryBehavior(scroll_boundary_behavior_); |
| // If the main thread commits multiple times before the impl thread actually |
| // draws, then damage tracking will become incorrect if we simply clobber the |
| @@ -834,6 +836,14 @@ gfx::Vector2dF LayerImpl::ClampScrollToMaxScrollOffset() { |
| return delta; |
| } |
| +void LayerImpl::SetScrollBoundaryBehavior(ScrollBoundaryBehavior behavior) { |
| + if (scroll_boundary_behavior_ == behavior) |
| + return; |
| + scroll_boundary_behavior_ = behavior; |
| + layer_tree_impl()->DidUpdateScrollState(id()); |
| + NoteLayerPropertyChanged(); |
| +} |
| + |
| void LayerImpl::SetNeedsPushProperties() { |
| if (layer_tree_impl_ && !needs_push_properties_) { |
| needs_push_properties_ = true; |