| Index: cc/layer_impl.cc
|
| diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
|
| index 1f6e21ab0d8cac82a8968a47df25c73286acb364..cd6b24f22c5d8dce9bb2677ef9955d47775f5140 100644
|
| --- a/cc/layer_impl.cc
|
| +++ b/cc/layer_impl.cc
|
| @@ -263,7 +263,13 @@ InputHandlerClient::ScrollStatus LayerImpl::tryScroll(const gfx::PointF& screenS
|
|
|
| if (!nonFastScrollableRegion().IsEmpty()) {
|
| bool clipped = false;
|
| - gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(MathUtil::inverse(screenSpaceTransform()), screenSpacePoint, clipped);
|
| + // TODO: We shouldn't be applying a projection if screen space transform is uninvertible here.
|
| + // Perhaps we should be returning ScrollOnMainThread if GetInverse returns false?
|
| + gfx::Transform inverseScreenSpaceTransform(gfx::Transform::kSkipInitialization);
|
| + if (!screenSpaceTransform().GetInverse(&inverseScreenSpaceTransform))
|
| + inverseScreenSpaceTransform.MakeIdentity();
|
| +
|
| + gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(inverseScreenSpaceTransform, screenSpacePoint, clipped);
|
| gfx::PointF hitTestPointInLayerSpace = gfx::ScalePoint(hitTestPointInContentSpace, 1 / contentsScaleX(), 1 / contentsScaleY());
|
| if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(hitTestPointInLayerSpace))) {
|
| TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRegion");
|
|
|