Commit 5d43bbcc authored by wibling@chromium.org's avatar wibling@chromium.org

Temporary fix for fast/events/touch/gesture/pad-gesture-fling.html crash.

The test crashes because the createFlingAnimationCurve call hits the int version in Platform.h which is no longer matching the signature in content/test/test_webkit_platform_support.h (and content/child/blink_platform_impl.h). Instead it hits the default one in Platform.h which just returns 0.
Subsequently the WebActiveGestureAnimation calls through the null pointer in WebActiveGestureAnimation::animate.

TBR=rjkroege@chromium.org, jam@chromium.org, ager@chromium.org, erik.corry@gmail.com, haraken@chromium.org, oilpan-reviews@chromium.org, tkent@chromium.org, vegorov@chromium.org, zerny@chromium.org
BUG=

Review URL: https://codereview.chromium.org/310413002

git-svn-id: svn://svn.chromium.org/blink/trunk@175493 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6aeb5e74
...@@ -632,7 +632,8 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) ...@@ -632,7 +632,8 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
m_globalPositionOnFlingStart = WebPoint(event.globalX, event.globalY); m_globalPositionOnFlingStart = WebPoint(event.globalX, event.globalY);
m_flingModifier = event.modifiers; m_flingModifier = event.modifiers;
m_flingSourceDevice = event.sourceDevice; m_flingSourceDevice = event.sourceDevice;
OwnPtr<WebGestureCurve> flingCurve = adoptPtr(Platform::current()->createFlingAnimationCurve(event.sourceDevice, WebFloatPoint(event.data.flingStart.velocityX, event.data.flingStart.velocityY), WebSize())); OwnPtr<WebGestureCurve> flingCurve = adoptPtr(Platform::current()->createFlingAnimationCurve(static_cast<WebGestureDevice>(event.sourceDevice), WebFloatPoint(event.data.flingStart.velocityX, event.data.flingStart.velocityY), WebSize()));
ASSERT(flingCurve);
m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(flingCurve.release(), this); m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(flingCurve.release(), this);
scheduleAnimation(); scheduleAnimation();
eventSwallowed = true; eventSwallowed = true;
...@@ -779,7 +780,8 @@ void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar ...@@ -779,7 +780,8 @@ void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar
m_positionOnFlingStart = parameters.point; m_positionOnFlingStart = parameters.point;
m_globalPositionOnFlingStart = parameters.globalPoint; m_globalPositionOnFlingStart = parameters.globalPoint;
m_flingModifier = parameters.modifiers; m_flingModifier = parameters.modifiers;
OwnPtr<WebGestureCurve> curve = adoptPtr(Platform::current()->createFlingAnimationCurve(parameters.sourceDevice, WebFloatPoint(parameters.delta), parameters.cumulativeScroll)); OwnPtr<WebGestureCurve> curve = adoptPtr(Platform::current()->createFlingAnimationCurve(static_cast<WebGestureDevice>(parameters.sourceDevice), WebFloatPoint(parameters.delta), parameters.cumulativeScroll));
ASSERT(curve);
m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(curve.release(), this, parameters.startTime); m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(curve.release(), this, parameters.startTime);
scheduleAnimation(); scheduleAnimation();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment