| Index: cc/trees/transform_node.cc
|
| diff --git a/cc/trees/transform_node.cc b/cc/trees/transform_node.cc
|
| index 0060c3a06e05e5b66bdedc4d25df13360caea597..103ae86ca23c3677b9b618f8aca3e4c65b4b5ff3 100644
|
| --- a/cc/trees/transform_node.cc
|
| +++ b/cc/trees/transform_node.cc
|
| @@ -30,6 +30,7 @@ TransformNode::TransformNode()
|
| node_and_ancestors_are_flat(true),
|
| node_and_ancestors_have_only_integer_translation(true),
|
| scrolls(false),
|
| + should_be_snapped(false),
|
| needs_surface_contents_scale(false),
|
| affected_by_inner_viewport_bounds_delta_x(false),
|
| affected_by_inner_viewport_bounds_delta_y(false),
|
| @@ -64,6 +65,7 @@ bool TransformNode::operator==(const TransformNode& other) const {
|
| node_and_ancestors_have_only_integer_translation ==
|
| other.node_and_ancestors_have_only_integer_translation &&
|
| scrolls == other.scrolls &&
|
| + should_be_snapped == other.should_be_snapped &&
|
| needs_surface_contents_scale == other.needs_surface_contents_scale &&
|
| affected_by_inner_viewport_bounds_delta_x ==
|
| other.affected_by_inner_viewport_bounds_delta_x &&
|
| @@ -79,7 +81,7 @@ bool TransformNode::operator==(const TransformNode& other) const {
|
| post_local_scale_factor == other.post_local_scale_factor &&
|
| surface_contents_scale == other.surface_contents_scale &&
|
| scroll_offset == other.scroll_offset &&
|
| - scroll_snap == other.scroll_snap &&
|
| + snap_amount == other.snap_amount &&
|
| source_offset == other.source_offset &&
|
| source_to_parent == other.source_to_parent;
|
| }
|
| @@ -139,6 +141,7 @@ void TransformNode::ToProtobuf(proto::TreeNode* proto) const {
|
| data->set_node_and_ancestors_have_only_integer_translation(
|
| node_and_ancestors_have_only_integer_translation);
|
| data->set_scrolls(scrolls);
|
| + data->set_should_be_snapped(should_be_snapped);
|
| data->set_needs_surface_contents_scale(needs_surface_contents_scale);
|
|
|
| data->set_affected_by_inner_viewport_bounds_delta_x(
|
| @@ -157,7 +160,7 @@ void TransformNode::ToProtobuf(proto::TreeNode* proto) const {
|
| Vector2dFToProto(surface_contents_scale,
|
| data->mutable_surface_contents_scale());
|
| ScrollOffsetToProto(scroll_offset, data->mutable_scroll_offset());
|
| - Vector2dFToProto(scroll_snap, data->mutable_scroll_snap());
|
| + Vector2dFToProto(snap_amount, data->mutable_snap_amount());
|
| Vector2dFToProto(source_offset, data->mutable_source_offset());
|
| Vector2dFToProto(source_to_parent, data->mutable_source_to_parent());
|
| }
|
| @@ -198,6 +201,7 @@ void TransformNode::FromProtobuf(const proto::TreeNode& proto) {
|
| node_and_ancestors_have_only_integer_translation =
|
| data.node_and_ancestors_have_only_integer_translation();
|
| scrolls = data.scrolls();
|
| + should_be_snapped = data.should_be_snapped();
|
| needs_surface_contents_scale = data.needs_surface_contents_scale();
|
|
|
| affected_by_inner_viewport_bounds_delta_x =
|
| @@ -215,7 +219,7 @@ void TransformNode::FromProtobuf(const proto::TreeNode& proto) {
|
|
|
| surface_contents_scale = ProtoToVector2dF(data.surface_contents_scale());
|
| scroll_offset = ProtoToScrollOffset(data.scroll_offset());
|
| - scroll_snap = ProtoToVector2dF(data.scroll_snap());
|
| + snap_amount = ProtoToVector2dF(data.snap_amount());
|
| source_offset = ProtoToVector2dF(data.source_offset());
|
| source_to_parent = ProtoToVector2dF(data.source_to_parent());
|
| }
|
| @@ -233,7 +237,7 @@ void TransformNode::AsValueInto(base::trace_event::TracedValue* value) const {
|
| value->SetInteger("source_node_id", source_node_id);
|
| value->SetInteger("sorting_context_id", sorting_context_id);
|
| MathUtil::AddToTracedValue("scroll_offset", scroll_offset, value);
|
| - MathUtil::AddToTracedValue("scroll_snap", scroll_snap, value);
|
| + MathUtil::AddToTracedValue("snap_amount", snap_amount, value);
|
| }
|
|
|
| TransformCachedNodeData::TransformCachedNodeData()
|
|
|