summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/WebEvent.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/WebKit2/Shared/WebEvent.cpp
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/WebKit2/Shared/WebEvent.cpp')
-rw-r--r--Source/WebKit2/Shared/WebEvent.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/WebKit2/Shared/WebEvent.cpp b/Source/WebKit2/Shared/WebEvent.cpp
index f67d130ee..a36c48e47 100644
--- a/Source/WebKit2/Shared/WebEvent.cpp
+++ b/Source/WebKit2/Shared/WebEvent.cpp
@@ -46,14 +46,14 @@ WebEvent::WebEvent(Type type, Modifiers modifiers, double timestamp)
{
}
-void WebEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
+void WebEvent::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << m_type;
encoder << m_modifiers;
encoder << m_timestamp;
}
-bool WebEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebEvent& result)
+bool WebEvent::decode(IPC::ArgumentDecoder& decoder, WebEvent& result)
{
if (!decoder.decode(result.m_type))
return false;
@@ -63,5 +63,17 @@ bool WebEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebEvent& result)
return false;
return true;
}
-
+
+#if ENABLE(TOUCH_EVENTS)
+bool WebTouchEvent::allTouchPointsAreReleased() const
+{
+ for (const auto& touchPoint : touchPoints()) {
+ if (touchPoint.state() != WebPlatformTouchPoint::TouchReleased && touchPoint.state() != WebPlatformTouchPoint::TouchCancelled)
+ return false;
+ }
+
+ return true;
+}
+#endif
+
} // namespace WebKit