WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-106864-20130729163454.patch (text/plain), 21.50 KB, created by
Eunmi Lee
on 2013-07-29 00:34:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eunmi Lee
Created:
2013-07-29 00:34:57 PDT
Size:
21.50 KB
patch
obsolete
>Subversion Revision: 153413 >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index b29afa6eb2c361f0e3fe67b9e93105dd478c4c41..26ea7afb2131d11195580ea171f7cf2a332fc641 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,52 @@ >+2013-07-29 Eunmi Lee <eunmi15.lee@samsung.com> >+ >+ [EFL][WK2] Process single tap using WebEvent::GestureSingleTap. >+ https://bugs.webkit.org/show_bug.cgi?id=106864 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Send WebEvent::GestureSingleTap event to the web process to perform >+ the clicking when single tap gesture is recognized. >+ >+ Additionally, add WKViewSendGestureEvent() to avoid using WK2 internals >+ in the EFL API implementation and Add EwkGestureEvent which inherits >+ an APIObject to convert to WKGestureEventRef. >+ >+ * PlatformEfl.cmake: >+ * Shared/API/c/efl/WKBaseEfl.h: >+ * Shared/APIObject.h: >+ * Shared/efl/WebEventFactory.cpp: >+ * UIProcess/API/C/efl/WKAPICastEfl.h: >+ (WebKit::toWebEventType): >+ (WebKit::toWebEventModifiers): >+ * UIProcess/API/C/efl/WKEventEfl.cpp: >+ (WKGestureEventCreate): >+ * UIProcess/API/C/efl/WKEventEfl.h: >+ * UIProcess/API/C/efl/WKViewEfl.cpp: >+ (WKViewSendGestureEvent): >+ * UIProcess/API/C/efl/WKViewEfl.h: >+ * UIProcess/API/efl/EwkView.cpp: >+ (EwkView::handleSingleTap): >+ * UIProcess/CoordinatedGraphics/WebView.cpp: >+ (WebKit::WebView::doneWithGestureEvent): >+ * UIProcess/CoordinatedGraphics/WebView.h: >+ * UIProcess/efl/EwkGestureEvent.cpp: Added. >+ (WebKit::EwkGestureEvent::EwkGestureEvent): >+ * UIProcess/efl/EwkGestureEvent.h: Added. >+ (WebKit::EwkGestureEvent::create): >+ (WebKit::EwkGestureEvent::eventType): >+ (WebKit::EwkGestureEvent::modifiers): >+ (WebKit::EwkGestureEvent::timestamp): >+ (WebKit::EwkGestureEvent::position): >+ (WebKit::EwkGestureEvent::screenPosition): >+ (WebKit::EwkGestureEvent::area): >+ (WebKit::EwkGestureEvent::deltaX): >+ (WebKit::EwkGestureEvent::deltaY): >+ (WebKit::EwkGestureEvent::type): >+ * UIProcess/efl/WebViewEfl.cpp: >+ (WebKit::WebViewEfl::sendGestureEvent): >+ * UIProcess/efl/WebViewEfl.h: >+ > 2013-07-28 Eunmi Lee <eunmi15.lee@samsung.com> > > [EFL][WK2] Implement pan and flick gesture. >diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake >index b004ba6e135c95ee834dfc83e04dd220c1ea1604..043b3ffc3bfb63197387eb6bcfa991585b382443 100644 >--- a/Source/WebKit2/PlatformEfl.cmake >+++ b/Source/WebKit2/PlatformEfl.cmake >@@ -107,6 +107,7 @@ list(APPEND WebKit2_SOURCES > UIProcess/efl/ContextHistoryClientEfl.cpp > UIProcess/efl/ContextMenuClientEfl.cpp > UIProcess/efl/DownloadManagerEfl.cpp >+ UIProcess/efl/EwkGestureEvent.cpp > UIProcess/efl/EwkTouchEvent.cpp > UIProcess/efl/EwkTouchPoint.cpp > UIProcess/efl/FindClientEfl.cpp >diff --git a/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h b/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h >index 9c07f8e0c8c862d8144fa5b9b3a0b9b3e8a978b0..e7dc56f15b81880562730838cbf717fdabea1af5 100644 >--- a/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h >+++ b/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h >@@ -29,5 +29,6 @@ typedef const struct OpaqueWKPopupItem* WKPopupItemRef; > typedef const struct OpaqueWKPopupMenuListener* WKPopupMenuListenerRef; > typedef const struct OpaqueWKTouchPoint* WKTouchPointRef; > typedef const struct OpaqueWKTouchEvent* WKTouchEventRef; >+typedef const struct OpaqueWKGestureEvent* WKGestureEventRef; > > #endif /* WKBaseEfl_h */ >diff --git a/Source/WebKit2/Shared/APIObject.h b/Source/WebKit2/Shared/APIObject.h >index 441e05e987f673c2c74a6cc7a70e4a7c4e4732f8..4259bcea260279b005265763c0659c7125c0ef6e 100644 >--- a/Source/WebKit2/Shared/APIObject.h >+++ b/Source/WebKit2/Shared/APIObject.h >@@ -141,6 +141,9 @@ public: > TypeTouchPoint, > TypeTouchEvent, > #endif >+#if ENABLE(GESTURE_EVENTS) >+ TypeGestureEvent, >+#endif > #endif > }; > >diff --git a/Source/WebKit2/Shared/efl/WebEventFactory.cpp b/Source/WebKit2/Shared/efl/WebEventFactory.cpp >index 7f5b3eeaad6204485379199e0081419d5eb304fb..097eed7dded7787ced5776874b0b045f763545fd 100644 >--- a/Source/WebKit2/Shared/efl/WebEventFactory.cpp >+++ b/Source/WebKit2/Shared/efl/WebEventFactory.cpp >@@ -229,39 +229,6 @@ static inline WebPlatformTouchPoint::TouchPointState toWebPlatformTouchPointStat > } > } > >-static inline WebEvent::Type toWebEventType(WKEventType type) >-{ >- switch (type) { >- case kWKEventTypeTouchStart: >- return WebEvent::TouchStart; >- case kWKEventTypeTouchMove: >- return WebEvent::TouchMove; >- case kWKEventTypeTouchEnd: >- return WebEvent::TouchEnd; >- case kWKEventTypeTouchCancel: >- return WebEvent::TouchCancel; >- default: >- return WebEvent::NoType; >- } >- >-} >- >-static inline WebEvent::Modifiers toWebEventModifiers(unsigned modifiers) >-{ >- unsigned result = 0; >- >- if (modifiers & kWKEventModifiersShiftKey) >- result |= WebEvent::ShiftKey; >- if (modifiers & kWKEventModifiersControlKey) >- result |= WebEvent::ControlKey; >- if (modifiers & kWKEventModifiersAltKey) >- result |= WebEvent::AltKey; >- if (modifiers & kWKEventModifiersMetaKey) >- result |= WebEvent::MetaKey; >- >- return static_cast<WebEvent::Modifiers>(result); >-} >- > WebTouchEvent WebEventFactory::createWebTouchEvent(const EwkTouchEvent* event, const AffineTransform& toWebContent) > { > ImmutableArray* touchPointsArray = toImpl(event->touchPoints()); >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h b/Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h >index 87c5f5efbd6be562d79bec3fd70915cd079cd2d3..6851cf1133121041fcf4076159ef30d72581e550 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h >@@ -50,6 +50,12 @@ WK_ADD_API_MAPPING(WKTouchEventRef, EwkTouchEvent) > WK_ADD_API_MAPPING(WKTouchPointRef, EwkTouchPoint) > #endif > >+#if ENABLE(GESTURE_EVENTS) >+class EwkGestureEvent; >+ >+WK_ADD_API_MAPPING(WKGestureEventRef, EwkGestureEvent) >+#endif >+ > // Enum conversions. > inline WKPopupItemTextDirection toAPI(WebCore::TextDirection direction) > { >@@ -104,6 +110,44 @@ inline WKTouchPointState toAPI(WebPlatformTouchPoint::TouchPointState state) > } > #endif > >+inline WebEvent::Type toWebEventType(WKEventType type) >+{ >+ switch (type) { >+#if ENABLE(TOUCH_EVENTS) >+ case kWKEventTypeTouchStart: >+ return WebEvent::TouchStart; >+ case kWKEventTypeTouchMove: >+ return WebEvent::TouchMove; >+ case kWKEventTypeTouchEnd: >+ return WebEvent::TouchEnd; >+ case kWKEventTypeTouchCancel: >+ return WebEvent::TouchCancel; >+#endif >+#if ENABLE(GESTURE_EVENTS) >+ case kWKEventTypeGestureSingleTap: >+ return WebEvent::GestureSingleTap; >+#endif >+ default: >+ return WebEvent::NoType; >+ } >+} >+ >+inline WebEvent::Modifiers toWebEventModifiers(unsigned modifiers) >+{ >+ unsigned result = 0; >+ >+ if (modifiers & kWKEventModifiersShiftKey) >+ result |= WebEvent::ShiftKey; >+ if (modifiers & kWKEventModifiersControlKey) >+ result |= WebEvent::ControlKey; >+ if (modifiers & kWKEventModifiersAltKey) >+ result |= WebEvent::AltKey; >+ if (modifiers & kWKEventModifiersMetaKey) >+ result |= WebEvent::MetaKey; >+ >+ return static_cast<WebEvent::Modifiers>(result); >+} >+ > } > > #endif // WKAPICastEfl_h >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.cpp b/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.cpp >index 843aeb0dd3326d4eadd7cf95b2f9e5589782a110..e97029c511672dc6692ad77b20857ade0c2bcd1e 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.cpp >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.cpp >@@ -32,6 +32,10 @@ > #include "WKAPICast.h" > #include "WebEvent.h" > >+#if ENABLE(GESTURE_EVENTS) >+#include "EwkGestureEvent.h" >+#endif >+ > using namespace WebKit; > > WKTouchPointRef WKTouchPointCreate(int id, WKPoint position, WKPoint screenPosition, WKTouchPointState state, WKSize radius, float rotationAngle, float forceFactor) >@@ -172,3 +176,20 @@ float WKTouchPointGetForceFactor(WKTouchPointRef point) > return 0; > #endif > } >+ >+WKGestureEventRef WKGestureEventCreate(WKEventType type, WKPoint position, WKPoint screenPosition, WKEventModifiers modifiers, double timestamp, WKSize area, float deltaX, float deltaY) >+{ >+#if ENABLE(GESTURE_EVENTS) >+ return toAPI(EwkGestureEvent::create(type, position, screenPosition, modifiers, timestamp, area, deltaX, deltaY).leakRef()); >+#else >+ UNUSED_PARAM(type); >+ UNUSED_PARAM(position); >+ UNUSED_PARAM(screenPosition); >+ UNUSED_PARAM(modifiers); >+ UNUSED_PARAM(timestamp); >+ UNUSED_PARAM(area); >+ UNUSED_PARAM(deltaX); >+ UNUSED_PARAM(deltaY); >+ return 0; >+#endif >+} >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.h b/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.h >index b5439219e8ad1b8b54035e9b0926ca1a49dc0277..9e75311e8f3120a27a5e9fae4d12e8f49879cc41 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.h >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.h >@@ -39,7 +39,8 @@ enum WKEventType { > kWKEventTypeTouchStart, > kWKEventTypeTouchMove, > kWKEventTypeTouchEnd, >- kWKEventTypeTouchCancel >+ kWKEventTypeTouchCancel, >+ kWKEventTypeGestureSingleTap > }; > typedef enum WKEventType WKEventType; > >@@ -68,6 +69,8 @@ WK_EXPORT WKSize WKTouchPointGetRadius(WKTouchPointRef); > WK_EXPORT float WKTouchPointGetRotationAngle(WKTouchPointRef); > WK_EXPORT float WKTouchPointGetForceFactor(WKTouchPointRef); > >+WK_EXPORT WKGestureEventRef WKGestureEventCreate(WKEventType, WKPoint position, WKPoint screenPosition, WKEventModifiers, double timestamp, WKSize area, float deltaX, float deltaY); >+ > #ifdef __cplusplus > } > #endif >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.cpp b/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.cpp >index cefa2d358701c72de955e014031be38c8b494431..ce86dc1c68c12503645c5b6fa0a2b878f35d5e83 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.cpp >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.cpp >@@ -58,3 +58,13 @@ void WKViewSendTouchEvent(WKViewRef viewRef, WKTouchEventRef touchEventRef) > UNUSED_PARAM(touchEventRef); > #endif > } >+ >+void WKViewSendGestureEvent(WKViewRef viewRef, WKGestureEventRef gestureEventRef) >+{ >+#if ENABLE(GESTURE_EVENTS) >+ static_cast<WebViewEfl*>(toImpl(viewRef))->sendGestureEvent(toImpl(gestureEventRef)); >+#else >+ UNUSED_PARAM(viewRef); >+ UNUSED_PARAM(gestureEventRef); >+#endif >+} >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.h b/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.h >index d8afdc4328ab19f648eafbea1598c03a183a26ae..6f7282fd5c1ded265aec34a871f9d61fcb78c465 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.h >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.h >@@ -42,6 +42,8 @@ WK_EXPORT void WKViewSetThemePath(WKViewRef, WKStringRef); > > WK_EXPORT void WKViewSendTouchEvent(WKViewRef, WKTouchEventRef); > >+WK_EXPORT void WKViewSendGestureEvent(WKViewRef, WKGestureEventRef); >+ > #ifdef __cplusplus > } > #endif >diff --git a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >index 6302322aa5c93bc46603f716530790e831558cd1..b7fa81773cb5ab09400d6802562971d476439b00 100644 >--- a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >+++ b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >@@ -1401,9 +1401,13 @@ void EwkView::didFindZoomableArea(const WKPoint& point, const WKRect& area) > > #if ENABLE(TOUCH_EVENTS) > // GestureRecognizerClient functions. >-void EwkView::handleSingleTap(const IntPoint&) >+void EwkView::handleSingleTap(const IntPoint& position) > { >- notImplemented(); >+#if ENABLE(GESTURE_EVENTS) >+ WKViewSendGestureEvent(wkView(), adoptWK(WKGestureEventCreate(kWKEventTypeGestureSingleTap, toAPI(position), toAPI(transformToScreen().mapPoint(position)), 0, ecore_time_get(), WKSizeMake(0, 0), 0, 0)).get()); >+#else >+ UNUSED_PARAM(position); >+#endif > } > > void EwkView::handleDoubleTap(const IntPoint&) >diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp b/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp >index 5e21ce77bbc6959babda5b90d200f9bd344221e3..ea9840d018a41c6f1a02ff86d78b636a3aaeb2fe 100644 >--- a/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp >+++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp >@@ -402,6 +402,13 @@ void WebView::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool) > notImplemented(); > } > >+#if ENABLE(GESTURE_EVENTS) >+void WebView::doneWithGestureEvent(const WebGestureEvent&, bool) >+{ >+ notImplemented(); >+} >+#endif >+ > #if ENABLE(TOUCH_EVENTS) > void WebView::doneWithTouchEvent(const NativeWebTouchEvent& event, bool wasEventHandled) > { >diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h b/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h >index eb1bf4c3e04292a0f9bd2ce8d0e55b6d7c9a533d..8b500d707ab576cf9eaa0b178bc84ff37f5fd01c 100644 >--- a/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h >+++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h >@@ -170,6 +170,9 @@ protected: > #if ENABLE(TOUCH_EVENTS) > virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) OVERRIDE; > #endif >+#if ENABLE(GESTURE_EVENTS) >+ void doneWithGestureEvent(const WebGestureEvent&, bool) OVERRIDE; >+#endif > > virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) OVERRIDE; > virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) OVERRIDE; >diff --git a/Source/WebKit2/UIProcess/efl/EwkGestureEvent.cpp b/Source/WebKit2/UIProcess/efl/EwkGestureEvent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..24e2b96e088e946badda8ee0200d3707efca2a4d >--- /dev/null >+++ b/Source/WebKit2/UIProcess/efl/EwkGestureEvent.cpp >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2013 Samsung Electronics. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "EwkGestureEvent.h" >+ >+#if ENABLE(GESTURE_EVENTS) >+ >+namespace WebKit { >+ >+EwkGestureEvent::EwkGestureEvent(WKEventType type, WKPoint position, WKPoint screenPosition, WKEventModifiers modifiers, double timestamp, WKSize area, float deltaX, float deltaY) >+ : m_eventType(type) >+ , m_modifiers(modifiers) >+ , m_timestamp(timestamp) >+ , m_position(position) >+ , m_screenPosition(screenPosition) >+ , m_area(area) >+ , m_deltaX(deltaX) >+ , m_deltaY(deltaY) >+{ >+} >+ >+} // namespace WebKit >+ >+#endif // ENABLE(GESTURE_EVENTS) >diff --git a/Source/WebKit2/UIProcess/efl/EwkGestureEvent.h b/Source/WebKit2/UIProcess/efl/EwkGestureEvent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..40bd8c5a524b9591f3255f192e9986d302784149 >--- /dev/null >+++ b/Source/WebKit2/UIProcess/efl/EwkGestureEvent.h >@@ -0,0 +1,74 @@ >+/* >+ * Copyright (C) 2013 Samsung Electronics. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef EwkGestureEvent_h >+#define EwkGestureEvent_h >+ >+#if ENABLE(GESTURE_EVENTS) >+ >+#include "APIObject.h" >+#include "WKEventEfl.h" >+#include <wtf/PassRefPtr.h> >+ >+namespace WebKit { >+ >+class EwkGestureEvent : public APIObject { >+public: >+ static const APIObject::Type APIType = TypeGestureEvent; >+ >+ static PassRefPtr<EwkGestureEvent> create(WKEventType type, WKPoint position, WKPoint screenPosition, WKEventModifiers modifiers, double timestamp, WKSize area, float deltaX, float deltaY) >+ { >+ return adoptRef(new EwkGestureEvent(type, position, screenPosition, modifiers, timestamp, area, deltaX, deltaY)); >+ } >+ >+ WKEventType eventType() const { return m_eventType; } >+ WKEventModifiers modifiers() const { return m_modifiers; } >+ double timestamp() const { return m_timestamp; } >+ WKPoint position() const { return m_position; } >+ WKPoint screenPosition() const { return m_screenPosition; } >+ WKSize area() const { return m_area; } >+ float deltaX() const { return m_deltaX; } >+ float deltaY() const { return m_deltaY; } >+ >+private: >+ EwkGestureEvent(WKEventType, WKPoint position, WKPoint screenPosition, WKEventModifiers, double timestamp, WKSize area, float deltaX, float deltaY); >+ >+ virtual APIObject::Type type() const { return APIType; } >+ >+ WKEventType m_eventType; >+ WKEventModifiers m_modifiers; >+ double m_timestamp; >+ WKPoint m_position; >+ WKPoint m_screenPosition; >+ WKSize m_area; >+ float m_deltaX; >+ float m_deltaY; >+}; >+ >+} // namespace WebKit >+ >+#endif // ENABLE(GESTURE_EVENTS) >+ >+#endif /* EwkGestureEvent_h */ >diff --git a/Source/WebKit2/UIProcess/efl/WebViewEfl.cpp b/Source/WebKit2/UIProcess/efl/WebViewEfl.cpp >index 5660be111c42d0d25c61a88706a176b7ba8e9c5b..e3509111ef3b0d7e75f23c2e157bbcf5e1537e30 100644 >--- a/Source/WebKit2/UIProcess/efl/WebViewEfl.cpp >+++ b/Source/WebKit2/UIProcess/efl/WebViewEfl.cpp >@@ -43,6 +43,10 @@ > #include "EwkTouchEvent.h" > #endif > >+#if ENABLE(GESTURE_EVENTS) >+#include "EwkGestureEvent.h" >+#endif >+ > using namespace EwkViewCallbacks; > using namespace WebCore; > >@@ -124,4 +128,13 @@ void WebViewEfl::sendTouchEvent(EwkTouchEvent* touchEvent) > } > #endif > >+#if ENABLE(GESTURE_EVENTS) >+void WebViewEfl::sendGestureEvent(const EwkGestureEvent* event) >+{ >+ ASSERT(event); >+ WebGestureEvent gesture(toWebEventType(event->eventType()), transformFromScene().mapPoint(toIntPoint(event->position())), toIntPoint(event->screenPosition()), toWebEventModifiers(event->modifiers()), event->timestamp(), toIntSize(event->area()), FloatPoint(event->deltaX(), event->deltaY())); >+ m_page->handleGestureEvent(gesture); >+} >+#endif >+ > } // namespace WebKit >diff --git a/Source/WebKit2/UIProcess/efl/WebViewEfl.h b/Source/WebKit2/UIProcess/efl/WebViewEfl.h >index d717234c6b78d7fade10e8a5b65a1645acb625dd..e63b3623d6ddbbcc43cfc0e3f45d0f04380683d2 100644 >--- a/Source/WebKit2/UIProcess/efl/WebViewEfl.h >+++ b/Source/WebKit2/UIProcess/efl/WebViewEfl.h >@@ -48,6 +48,10 @@ public: > void sendTouchEvent(EwkTouchEvent*); > #endif > >+#if ENABLE(GESTURE_EVENTS) >+ void sendGestureEvent(const EwkGestureEvent*); >+#endif >+ > private: > WebViewEfl(WebContext*, WebPageGroup*); > >diff --git a/Source/cmake/OptionsEfl.cmake b/Source/cmake/OptionsEfl.cmake >index 7f9cab1b3014d0995532db0a063239ba7796a683..1ef2b21974f7bee7413d3191788611d87f92bfc0 100644 >--- a/Source/cmake/OptionsEfl.cmake >+++ b/Source/cmake/OptionsEfl.cmake >@@ -273,3 +273,7 @@ if (ENABLE_INDEXED_DATABASE) > set(WTF_USE_LEVELDB 1) > add_definitions(-DWTF_USE_LEVELDB=1) > endif () >+ >+if (ENABLE_WEBKIT2 AND WTF_USE_TILED_BACKING_STORE) >+ add_definitions(-DENABLE_GESTURE_EVENTS=1) >+endif () >diff --git a/ChangeLog b/ChangeLog >index 5ffb9ff6daa6d967bae768cad16d17fad05ef234..86b51a04a3c2104d67298b349e9a3babc401e66a 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,15 @@ >+2013-07-29 Eunmi Lee <eunmi15.lee@samsung.com> >+ >+ [EFL][WK2] Process single tap using WebEvent::GestureSingleTap. >+ https://bugs.webkit.org/show_bug.cgi?id=106864 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Enable GESTURE_EVENTS to use WebEvent::GestureSingleTap when WEBKIT2 >+ and TILED_BACKING_STORE are enabled. >+ >+ * Source/cmake/OptionsEfl.cmake: >+ > 2013-07-27 Ryuan Choi <ryuan.choi@samsung.com> > > [EFL] Bump required version of EFL to 1.7
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 106864
:
182692
|
182724
|
191411
|
191646
|
193495
|
193775
|
206055
|
207625
|
208250
|
214552