Index: cc/layers/layer_impl.cc |
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
index 16bab888a6577fb5c57e8b95c6042647b69c4801..76ec509dbb7f67ff909a1185a4315d4a8f0b4af9 100644 |
--- a/cc/layers/layer_impl.cc |
+++ b/cc/layers/layer_impl.cc |
@@ -82,7 +82,9 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) |
needs_push_properties_(false), |
scrollbars_hidden_(false), |
needs_show_scrollbars_(false), |
- raster_even_if_not_in_rsll_(false) { |
+ raster_even_if_not_in_rsll_(false), |
+ scroll_boundary_behavior_( |
+ ScrollBoundaryBehavior::kScrollBoundaryBehaviorTypeAuto) { |
DCHECK_GT(layer_id_, 0); |
DCHECK(layer_tree_impl_); |
@@ -354,6 +356,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { |
layer->SetBounds(bounds_); |
layer->SetScrollClipLayer(scroll_clip_layer_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 |
@@ -771,6 +774,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; |