Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index 223fc65c0c1b7f3d295d643ee26d871de324e14f..b2a1aa137ca76af0de1024dde1bc0fceab2d78a3 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -64,7 +64,8 @@ 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(SCROLL_BOUNDARY_BEHAVIOR_PROPAGATE) {} |
Layer::Inputs::~Inputs() {} |
@@ -310,6 +311,14 @@ void Layer::SetBounds(const gfx::Size& size) { |
SetNeedsCommit(); |
} |
+void Layer::SetScrollBoundaryBehavior(ScrollBoundaryBehavior behavior) { |
+ if (scrollBoundaryBehavior() == behavior) |
+ return; |
+ inputs_.scroll_boundary_behavior = behavior; |
+ |
+ SetNeedsCommit(); |
+} |
+ |
Layer* Layer::RootLayer() { |
Layer* layer = this; |
while (layer->parent()) |
@@ -1190,6 +1199,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. |