| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index e40b5701e13286410170cac28dcf0f89a8237d62..0b7dc41d62289140e961f67d9867cb20a55db7a2 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -81,7 +81,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_);
|
| @@ -353,6 +355,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
|
| @@ -770,6 +773,15 @@ gfx::Vector2dF LayerImpl::ClampScrollToMaxScrollOffset() {
|
| return delta;
|
| }
|
|
|
| +void LayerImpl::SetScrollBoundaryBehavior(
|
| + const 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;
|
|
|