diff options
Diffstat (limited to 'Source/WebKit2/Shared/WebEvent.cpp')
-rw-r--r-- | Source/WebKit2/Shared/WebEvent.cpp | 18 |
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 |