summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-09-28 16:39:37 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:01 +0000
commit9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch)
tree322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
parent6882a04fb36642862b11efe514251d32070c3d65 (diff)
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp')
-rw-r--r--Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
index 0240729c0..ebf9d5f43 100644
--- a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
+++ b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
@@ -25,7 +25,8 @@
*/
#include "config.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
+
#include <QKeyEvent>
#include <QLineF>
#include <QTransform>
@@ -186,13 +187,13 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const QTouchEvent* event, con
{
WebEvent::Type type = webEventTypeForEvent(event);
WebPlatformTouchPoint::TouchPointState state = static_cast<WebPlatformTouchPoint::TouchPointState>(0);
- unsigned int id;
+ unsigned id;
WebEvent::Modifiers modifiers = modifiersForEvent(event->modifiers());
double timestamp = currentTimeForEvent(event);
const QList<QTouchEvent::TouchPoint>& points = event->touchPoints();
- Vector<WebPlatformTouchPoint, 6> m_touchPoints;
+ Vector<WebPlatformTouchPoint> touchPoints;
for (int i = 0; i < points.count(); ++i) {
const QTouchEvent::TouchPoint& touchPoint = points.at(i);
id = static_cast<unsigned>(touchPoint.id());
@@ -220,10 +221,10 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const QTouchEvent* event, con
state = WebPlatformTouchPoint::TouchCancelled;
IntSize radius(touchPoint.rect().width()/ 2, touchPoint.rect().height() / 2);
- m_touchPoints.append(WebPlatformTouchPoint(id, state, touchPoint.screenPos().toPoint(), fromItemTransform.map(touchPoint.pos()).toPoint(), radius, 0.0, touchPoint.pressure()));
+ touchPoints.append(WebPlatformTouchPoint(id, state, touchPoint.screenPos().toPoint(), fromItemTransform.map(touchPoint.pos()).toPoint(), radius, 0.0, touchPoint.pressure()));
}
- return WebTouchEvent(type, m_touchPoints, modifiers, timestamp);
+ return WebTouchEvent(type, WTFMove(touchPoints), modifiers, timestamp);
}
#endif