Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 310413002: Temporary fix for fast/events/touch/gesture/pad-gesture-fling.html crash. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: change to static_cast. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698