Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index c306fb956336192ff2b5e90fb37cbd5954ae317e..160bce5b66ed50606010e5f04cdb28fdc4f24861 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -632,7 +632,8 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
m_globalPositionOnFlingStart = WebPoint(event.globalX, event.globalY); |
m_flingModifier = event.modifiers; |
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); |
scheduleAnimation(); |
eventSwallowed = true; |
@@ -779,7 +780,8 @@ void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar |
m_positionOnFlingStart = parameters.point; |
m_globalPositionOnFlingStart = parameters.globalPoint; |
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); |
scheduleAnimation(); |
} |