| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index f4ff01d5022577a6792c8fc3d353a3ad1d7b1bb8..9971493c7edf31c9d56184547857047d70ea7d08 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -310,6 +310,15 @@ void Layer::SetBounds(const gfx::Size& size) {
|
| SetNeedsCommit();
|
| }
|
|
|
| +void Layer::SetScrollSnapOffsets(const SnapPointList& offsets) {
|
| + DCHECK(IsPropertyChangeAllowed());
|
| + if (inputs_.snap_offsets == offsets)
|
| + return;
|
| + inputs_.snap_offsets = offsets;
|
| + SetPropertyTreesNeedRebuild();
|
| + SetNeedsCommit();
|
| +}
|
| +
|
| Layer* Layer::RootLayer() {
|
| Layer* layer = this;
|
| while (layer->parent())
|
| @@ -1197,6 +1206,11 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
|
| layer->SetUpdateRect(inputs_.update_rect);
|
|
|
| layer->SetHasWillChangeTransformHint(has_will_change_transform_hint());
|
| + layer->SetScrollSnapOffsets(inputs_.snap_offsets);
|
| + /*for (SnapPoint point : inputs_.snap_offsets.horizontal) {
|
| + LOG(ERROR) << point.offset << " " << point.must_snap << " "
|
| + << point.is_start << " " << point.is_end;
|
| + }*/
|
| layer->SetNeedsPushProperties();
|
|
|
| // Reset any state that should be cleared for the next update.
|
|
|