| Index: cc/layer_impl.cc
|
| diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
|
| index 98dc5599467fee9942b73a6314e6fdc2f28f938a..6010052e61fc5ce092a1fbde2aeaf32143afd2aa 100644
|
| --- a/cc/layer_impl.cc
|
| +++ b/cc/layer_impl.cc
|
| @@ -245,7 +245,14 @@ InputHandlerClient::ScrollStatus LayerImpl::tryScroll(const gfx::PointF& screenS
|
|
|
| if (!nonFastScrollableRegion().IsEmpty()) {
|
| bool clipped = false;
|
| - gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(MathUtil::inverse(screenSpaceTransform()), screenSpacePoint, clipped);
|
| + gfx::Transform inverseScreenSpaceTransform(gfx::Transform::kSkipInitialization);
|
| + if (!screenSpaceTransform().GetInverse(&inverseScreenSpaceTransform)) {
|
| + // TODO(shawnsingh): We shouldn't be applying a projection if screen space
|
| + // transform is uninvertible here. Perhaps we should be returning
|
| + // ScrollOnMainThread in this case?
|
| + }
|
| +
|
| + 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");
|
|
|