Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index d3100f3daa802322ca072e5be186709b65020bce..9ea93667bc91d4a6219c8ed8d2cbbf99d8aabac3 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -64,7 +64,9 @@ Layer::Inputs::Inputs(int layer_id) |
clip_parent(nullptr), |
has_will_change_transform_hint(false), |
hide_layer_and_subtree(false), |
- client(nullptr) {} |
+ client(nullptr), |
+ scroll_boundary_behavior( |
+ ScrollBoundaryBehavior::kScrollBoundaryBehaviorTypeAuto) {} |
Layer::Inputs::~Inputs() {} |
@@ -310,6 +312,14 @@ void Layer::SetBounds(const gfx::Size& size) { |
SetNeedsCommit(); |
} |
+void Layer::SetScrollBoundaryBehavior(ScrollBoundaryBehavior behavior) { |
+ if (scroll_boundary_behavior() == behavior) |
+ return; |
+ inputs_.scroll_boundary_behavior = behavior; |
+ |
+ SetNeedsCommit(); |
+} |
+ |
Layer* Layer::RootLayer() { |
Layer* layer = this; |
while (layer->parent()) |
@@ -1199,6 +1209,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { |
layer->SetUpdateRect(inputs_.update_rect); |
layer->SetHasWillChangeTransformHint(has_will_change_transform_hint()); |
+ layer->SetScrollBoundaryBehavior(inputs_.scroll_boundary_behavior); |
layer->SetNeedsPushProperties(); |
// Reset any state that should be cleared for the next update. |