| Index: cc/layer_tree_host_impl.cc
|
| diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
|
| index eca5aa203d8de2a25d5f1ddb881dc5e600ccf115..7c00d3189e418986a915228bb256ced88d1ceca1 100644
|
| --- a/cc/layer_tree_host_impl.cc
|
| +++ b/cc/layer_tree_host_impl.cc
|
| @@ -1103,12 +1103,8 @@ static FloatSize scrollLayerWithViewportSpaceDelta(PinchZoomViewport* viewport,
|
| return FloatSize();
|
|
|
| // localStartPoint and localEndPoint are in content space but we want to move them to layer space for scrolling.
|
| - float widthScale = 1;
|
| - float heightScale = 1;
|
| - if (!layerImpl.contentBounds().isEmpty() && !layerImpl.bounds().isEmpty()) {
|
| - widthScale = layerImpl.bounds().width() / static_cast<float>(layerImpl.contentBounds().width());
|
| - heightScale = layerImpl.bounds().height() / static_cast<float>(layerImpl.contentBounds().height());
|
| - }
|
| + float widthScale = 1.0 / layerImpl.contentsScaleX();
|
| + float heightScale = 1.0 / layerImpl.contentsScaleY();
|
| localStartPoint.scale(widthScale, heightScale);
|
| localEndPoint.scale(widthScale, heightScale);
|
|
|
|
|