summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp')
-rw-r--r--Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
index b6ac2f5e1..4eaff2c7e 100644
--- a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
+++ b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
@@ -86,6 +86,8 @@ static WebEvent::Type webEventTypeForEvent(const QEvent* event)
return WebEvent::TouchMove;
case QEvent::TouchEnd:
return WebEvent::TouchEnd;
+ case QEvent::TouchCancel:
+ return WebEvent::TouchCancel;
#endif
default:
// assert
@@ -207,6 +209,11 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const QTouchEvent* event, con
break;
}
+ // Qt does not have a Qt::TouchPointCancelled point state, so if we receive a touch cancel event,
+ // simply cancel all touch points here.
+ if (type == WebEvent::TouchCancel)
+ state = WebPlatformTouchPoint::TouchCancelled;
+
m_touchPoints.append(WebPlatformTouchPoint(id, state, touchPoint.screenPos().toPoint(), fromItemTransform.map(touchPoint.pos()).toPoint()));
}