Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 84b164418ec398c37a0d4f6ea83a0ef622224b36..1c66185e9a91a79c6a761c3ee3e4e8ea6bbcd0cd 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -1085,8 +1085,9 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) { |
} else if (layer == inner_viewport_scroll_layer_.get()) { |
inner_viewport_scroll_delta += info->scrolls[i].scroll_delta; |
} else { |
- layer->SetScrollOffsetFromImplSide(layer->scroll_offset() + |
- info->scrolls[i].scroll_delta); |
+ layer->SetScrollOffsetFromImplSide( |
+ gfx::ScrollOffsetWithDelta(layer->scroll_offset(), |
+ info->scrolls[i].scroll_delta)); |
} |
} |
@@ -1103,12 +1104,14 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) { |
// it to the client. If the client comes back and sets it to the same |
// value, then the layer can early out without needing a full commit. |
inner_viewport_scroll_layer_->SetScrollOffsetFromImplSide( |
- inner_viewport_scroll_layer_->scroll_offset() + |
- inner_viewport_scroll_delta); |
+ gfx::ScrollOffsetWithDelta( |
+ inner_viewport_scroll_layer_->scroll_offset(), |
+ inner_viewport_scroll_delta)); |
if (outer_viewport_scroll_layer_.get()) { |
outer_viewport_scroll_layer_->SetScrollOffsetFromImplSide( |
- outer_viewport_scroll_layer_->scroll_offset() + |
- outer_viewport_scroll_delta); |
+ gfx::ScrollOffsetWithDelta( |
+ outer_viewport_scroll_layer_->scroll_offset(), |
+ outer_viewport_scroll_delta)); |
} |
ApplyPageScaleDeltaFromImplSide(info->page_scale_delta); |