summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/UIProcess/WebPageProxy.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2017-03-26 13:55:39 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-03-26 18:56:55 +0000
commiteaaf1391d58f17bde794d6c8634e092209898941 (patch)
treeff3702a6509dc9333ffd7515cf078cf69478fcc3 /Source/WebKit2/UIProcess/WebPageProxy.cpp
parentfdcba363c7e7e01790ba4b946e4f53f8600d8a20 (diff)
Import WebKit commit 17e8bfb1ff30314a838b9bf641c112f63a11dba4
Change-Id: Ib6549e44a04300c7b7b07ddc9094b823b37f3183 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/UIProcess/WebPageProxy.cpp')
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index 3e221a920..9b2033f32 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1929,6 +1929,19 @@ void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons
#endif // ENABLE(NETSCAPE_PLUGIN_API)
+#if ENABLE(QT_GESTURE_EVENTS)
+void WebPageProxy::handleGestureEvent(const WebGestureEvent& event)
+{
+ if (!isValid())
+ return;
+
+ m_gestureEventQueue.append(event);
+
+ m_process->responsivenessTimer().start();
+ m_process->send(Messages::EventDispatcher::GestureEvent(m_pageID, event), 0);
+}
+#endif
+
#if ENABLE(TOUCH_EVENTS)
bool WebPageProxy::shouldStartTrackingTouchEvents(const WebTouchEvent& touchStartEvent) const
@@ -4588,6 +4601,9 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
case WebEvent::KeyUp:
case WebEvent::RawKeyDown:
case WebEvent::Char:
+#if ENABLE(QT_GESTURE_EVENTS)
+ case WebEvent::GestureSingleTap:
+#endif
#if ENABLE(TOUCH_EVENTS)
case WebEvent::TouchStart:
case WebEvent::TouchMove:
@@ -4613,6 +4629,16 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
break;
case WebEvent::MouseDown:
break;
+#if ENABLE(QT_GESTURE_EVENTS)
+ case WebEvent::GestureSingleTap: {
+ WebGestureEvent event = m_gestureEventQueue.first();
+ MESSAGE_CHECK(type == event.type());
+
+ m_gestureEventQueue.removeFirst();
+ m_pageClient.doneWithGestureEvent(event, handled);
+ break;
+ }
+#endif
case WebEvent::MouseUp:
m_currentlyProcessedMouseDownEvent = nullptr;
break;
@@ -5147,6 +5173,9 @@ void WebPageProxy::resetStateAfterProcessExited()
m_pendingLearnOrIgnoreWordMessageCount = 0;
// Can't expect DidReceiveEvent notifications from a crashed web process.
+#if ENABLE(QT_GESTURE_EVENTS)
+ m_gestureEventQueue.clear();
+#endif
m_keyEventQueue.clear();
m_wheelEventQueue.clear();
m_currentlyProcessedWheelEvents.clear();