Source/WebKit2/ChangeLog

112013-03-08 Eunmi Lee <eunmi15.lee@samsung.com>
22
 3 [EFL][WK2] Add WK2 C API to handle touch events.
 4 https://bugs.webkit.org/show_bug.cgi?id=108915
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Touch events for our target platforms differ (XInput2, Wayland, Tizen) so
 9 for the EFL port we want to be able to feed events manually.
 10
 11 To keep our current API for desktop EFL/Enlightenment working, we convert
 12 our currently limited EFL events to the new EFL specific C WKTouchEvent type.
 13
 14 The WKViewSendTouchEvent can be used for any use-case (platform/product)
 15 not involving the EFL events.
 16
 17 At the same time we make sure to avoid using WK2 internals in our EFL API
 18 implementation.
 19
 20 Additionally, WebTouchEvent starts to inherit an APIObject in order to
 21 convert WebTouchEvent* to WKTouchEventRef.
 22
 23 WebEvent::type() is changed to WebEvent::eventType() to prevent to be
 24 mixed up with APIObject::type() because WebTouchEvent inherits both
 25 WebEvent and APIObject.
 26
 27 * PlatformEfl.cmake:
 28 * Shared/API/c/efl/WKBaseEfl.h:
 29 * Shared/APIObject.h:
 30 * Shared/NativeWebTouchEvent.h:
 31 (NativeWebTouchEvent):
 32 * Shared/WebEvent.h:
 33 (WebTouchEvent):
 34 (WebKit::WebTouchEvent::create):
 35 (WebKit::WebTouchEvent::type):
 36 * Shared/WebPlatformTouchPoint.cpp:
 37 (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
 38 (WebKit):
 39 * Shared/WebPlatformTouchPoint.h: Added.
 40 (CoreIPC):
 41 (WebKit):
 42 (WebPlatformTouchPoint):
 43 (WebKit::WebPlatformTouchPoint::create):
 44 (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
 45 (WebKit::WebPlatformTouchPoint::id):
 46 (WebKit::WebPlatformTouchPoint::state):
 47 (WebKit::WebPlatformTouchPoint::screenPosition):
 48 (WebKit::WebPlatformTouchPoint::position):
 49 (WebKit::WebPlatformTouchPoint::radius):
 50 (WebKit::WebPlatformTouchPoint::rotationAngle):
 51 (WebKit::WebPlatformTouchPoint::force):
 52 (WebKit::WebPlatformTouchPoint::setState):
 53 (WebKit::WebPlatformTouchPoint::type):
 54 * Shared/WebTouchEvent.cpp:
 55 (WebKit::WebTouchEvent::WebTouchEvent):
 56 (WebKit):
 57 (WebKit::WebTouchEvent::isTouchEventType):
 58 * Shared/efl/NativeWebTouchEventEfl.cpp:
 59 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
 60 * Shared/efl/WebEventFactory.cpp:
 61 * Shared/efl/WebEventFactory.h:
 62 (WebEventFactory):
 63 * UIProcess/API/C/efl/WKAPICastEfl.h:
 64 (WebKit):
 65 * UIProcess/API/C/efl/WKEventEfl.cpp: Added.
 66 (toWebEventType):
 67 (toWebEventModifiers):
 68 (WKTouchEventCreate):
 69 * UIProcess/API/C/efl/WKEventEfl.h: Added.
 70 * UIProcess/API/C/efl/WKView.cpp:
 71 (WKViewSendTouchEvent):
 72 (toWebPlatformTouchPointState):
 73 (WKViewCreateTouchPoint):
 74 * UIProcess/API/C/efl/WKView.h:
 75 * UIProcess/API/efl/EwkView.cpp:
 76 (toWKTouchPointState):
 77 (toWKEventModifiers):
 78 (EwkView::feedTouchEvent):
 79 * UIProcess/API/efl/EwkView.h:
 80 (WebCore):
 81 * UIProcess/API/efl/ewk_touch.cpp: Added.
 82 (createWKTouchEvent):
 83 * UIProcess/API/efl/ewk_touch_private.h: Added.
 84 (WebCore):
 85 * UIProcess/efl/WebView.cpp:
 86 (WebKit):
 87 (WebKit::WebView::sendTouchEvent):
 88 * UIProcess/efl/WebView.h:
 89 (WebView):
 90
 912013-03-08 Eunmi Lee <eunmi15.lee@samsung.com>
 92
393 [WK2] Rename WebEvent::type() to WebEvent::eventType().
494 https://bugs.webkit.org/show_bug.cgi?id=111834
595

Source/WebKit2/PlatformEfl.cmake

@@list(APPEND WebKit2_SOURCES
3737
3838 UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
3939
 40 UIProcess/API/C/efl/WKEventEfl.cpp
4041 UIProcess/API/C/efl/WKPageEfl.cpp
4142 UIProcess/API/C/efl/WKPopupItem.cpp
4243 UIProcess/API/C/efl/WKPopupMenuListener.cpp

@@list(APPEND WebKit2_SOURCES
7677 UIProcess/API/efl/ewk_settings.cpp
7778 UIProcess/API/efl/ewk_storage_manager.cpp
7879 UIProcess/API/efl/ewk_text_checker.cpp
 80 UIProcess/API/efl/ewk_touch.cpp
7981 UIProcess/API/efl/ewk_url_request.cpp
8082 UIProcess/API/efl/ewk_url_response.cpp
8183 UIProcess/API/efl/ewk_url_scheme_request.cpp

Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h

2727typedef const struct OpaqueWKView* WKViewRef;
2828typedef const struct OpaqueWKPopupItem* WKPopupItemRef;
2929typedef const struct OpaqueWKPopupMenuListener* WKPopupMenuListenerRef;
 30typedef const struct OpaqueWKTouchPoint* WKTouchPointRef;
 31typedef const struct OpaqueWKTouchEvent* WKTouchEventRef;
3032
3133#endif /* WKBaseEfl_h */

Source/WebKit2/Shared/APIObject.h

@@public:
136136#if PLATFORM(EFL)
137137 TypePopupMenuItem,
138138#endif
 139#if ENABLE(TOUCH_EVENTS)
 140 TypeTouchPoint,
 141 TypeTouchEvent,
 142#endif
139143 };
140144
141145 virtual ~APIObject()

Source/WebKit2/Shared/NativeWebTouchEvent.h

3030
3131#if PLATFORM(QT)
3232#include <QTouchEvent>
33 #elif PLATFORM(EFL)
34 #include "ewk_touch.h"
35 #include <Evas.h>
36 #include <WebCore/AffineTransform.h>
3733#endif
3834
3935namespace WebKit {

@@public:
4339#if PLATFORM(QT)
4440 explicit NativeWebTouchEvent(const QTouchEvent*, const QTransform& fromItemTransform);
4541#elif PLATFORM(EFL)
46  NativeWebTouchEvent(Ewk_Touch_Event_Type, const Eina_List*, const Evas_Modifier*, const WebCore::AffineTransform& toWebContent, const WebCore::AffineTransform& toDeviceScreen, double timestamp);
 42 explicit NativeWebTouchEvent(const WebTouchEvent&);
4743#endif
4844
4945#if PLATFORM(QT)

Source/WebKit2/Shared/WebEvent.h

3030// FIXME: We should probably move to makeing the WebCore/PlatformFooEvents trivial classes so that
3131// we can use them as the event type.
3232
 33#include "WebPlatformTouchPoint.h"
3334#include <WebCore/FloatPoint.h>
3435#include <WebCore/FloatSize.h>
3536#include <WebCore/IntPoint.h>
3637#include <WebCore/IntSize.h>
3738#include <wtf/text/WTFString.h>
3839
 40#if ENABLE(TOUCH_EVENTS)
 41#include "APIObject.h"
 42#include <wtf/PassRefPtr.h>
 43#endif
 44
3945namespace CoreIPC {
4046 class ArgumentDecoder;
4147 class ArgumentEncoder;

@@private:
275281
276282#if ENABLE(TOUCH_EVENTS)
277283// FIXME: Move this class to its own header file.
278 // FIXME: Having "Platform" in the name makes it sound like this event is platform-specific or low-
279 // level in some way. That doesn't seem to be the case.
280 class WebPlatformTouchPoint {
 284class WebTouchEvent : public WebEvent, public APIObject {
281285public:
282  enum TouchPointState {
283  TouchReleased,
284  TouchPressed,
285  TouchMoved,
286  TouchStationary,
287  TouchCancelled
288  };
289 
290  WebPlatformTouchPoint() : m_rotationAngle(0.0), m_force(0.0) { }
 286 static const APIObject::Type APIType = TypeTouchEvent;
291287
292  WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position);
 288 static PassRefPtr<WebTouchEvent> create(WebEvent::Type type, const Vector<WebPlatformTouchPoint>& touchPoints, Modifiers modifiers, double timestamp)
 289 {
 290 return adoptRef(new WebTouchEvent(type, touchPoints, modifiers, timestamp));
 291 }
293292
294  WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0);
295 
296  uint32_t id() const { return m_id; }
297  TouchPointState state() const { return static_cast<TouchPointState>(m_state); }
298 
299  const WebCore::IntPoint& screenPosition() const { return m_screenPosition; }
300  const WebCore::IntPoint& position() const { return m_position; }
301  const WebCore::IntSize& radius() const { return m_radius; }
302  float rotationAngle() const { return m_rotationAngle; }
303  float force() const { return m_force; }
304 
305  void setState(TouchPointState state) { m_state = state; }
306 
307  void encode(CoreIPC::ArgumentEncoder&) const;
308  static bool decode(CoreIPC::ArgumentDecoder&, WebPlatformTouchPoint&);
309 
310 private:
311  uint32_t m_id;
312  uint32_t m_state;
313  WebCore::IntPoint m_screenPosition;
314  WebCore::IntPoint m_position;
315  WebCore::IntSize m_radius;
316  float m_rotationAngle;
317  float m_force;
318 };
319 
320 // FIXME: Move this class to its own header file.
321 class WebTouchEvent : public WebEvent {
322 public:
323293 WebTouchEvent() { }
324294
325  // FIXME: It would be nice not to have to copy the Vector here.
326  WebTouchEvent(Type, Vector<WebPlatformTouchPoint>, Modifiers, double timestamp);
 295 WebTouchEvent(WebEvent::Type, const Vector<WebPlatformTouchPoint>&, Modifiers, double timestamp);
 296
 297 WebTouchEvent(const WebTouchEvent&);
327298
328299 const Vector<WebPlatformTouchPoint>& touchPoints() const { return m_touchPoints; }
329300

@@public:
331302 static bool decode(CoreIPC::ArgumentDecoder&, WebTouchEvent&);
332303
333304private:
334  static bool isTouchEventType(Type);
 305 virtual APIObject::Type type() const { return APIType; }
 306
 307 static bool isTouchEventType(WebEvent::Type);
335308
336309 Vector<WebPlatformTouchPoint> m_touchPoints;
337310};

Source/WebKit2/Shared/WebPlatformTouchPoint.cpp

2525 */
2626
2727#include "config.h"
28 #include "WebEvent.h"
 28#include "WebPlatformTouchPoint.h"
2929
3030#if ENABLE(TOUCH_EVENTS)
3131

@@WebPlatformTouchPoint::WebPlatformTouchPoint(unsigned id, TouchPointState state,
5757{
5858}
5959
 60WebPlatformTouchPoint::WebPlatformTouchPoint(const WebPlatformTouchPoint& point)
 61 : m_id(point.id())
 62 , m_state(point.state())
 63 , m_screenPosition(point.screenPosition())
 64 , m_position(point.position())
 65 , m_radius(point.radius())
 66 , m_rotationAngle(point.rotationAngle())
 67 , m_force(point.force())
 68{
 69}
 70
6071void WebPlatformTouchPoint::encode(CoreIPC::ArgumentEncoder& encoder) const
6172{
6273 encoder << m_id;

Source/WebKit2/Shared/WebPlatformTouchPoint.h

 1/*
 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#ifndef WebPlatformTouchPoint_h
 28#define WebPlatformTouchPoint_h
 29
 30#if ENABLE(TOUCH_EVENTS)
 31
 32#include "APIObject.h"
 33#include <WebCore/IntPoint.h>
 34#include <WebCore/IntSize.h>
 35#include <wtf/PassRefPtr.h>
 36
 37namespace CoreIPC {
 38class ArgumentDecoder;
 39class ArgumentEncoder;
 40}
 41
 42namespace WebKit {
 43
 44// FIXME: Having "Platform" in the name makes it sound like this event is platform-specific or low-
 45// level in some way. That doesn't seem to be the case.
 46class WebPlatformTouchPoint : public APIObject {
 47public:
 48 enum TouchPointState {
 49 TouchReleased,
 50 TouchPressed,
 51 TouchMoved,
 52 TouchStationary,
 53 TouchCancelled
 54 };
 55
 56 static const APIObject::Type APIType = TypeTouchPoint;
 57
 58 static PassRefPtr<WebPlatformTouchPoint> create(uint32_t id, TouchPointState state, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0)
 59 {
 60 return adoptRef(new WebPlatformTouchPoint(id, state, screenPosition, position, radius, rotationAngle, force));
 61 }
 62
 63 WebPlatformTouchPoint() : m_rotationAngle(0.0), m_force(0.0) { }
 64
 65 WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position);
 66
 67 WebPlatformTouchPoint(uint32_t id, TouchPointState, const WebCore::IntPoint& screenPosition, const WebCore::IntPoint& position, const WebCore::IntSize& radius, float rotationAngle = 0.0, float force = 0.0);
 68
 69 WebPlatformTouchPoint(const WebPlatformTouchPoint&);
 70
 71 uint32_t id() const { return m_id; }
 72 TouchPointState state() const { return static_cast<TouchPointState>(m_state); }
 73
 74 const WebCore::IntPoint& screenPosition() const { return m_screenPosition; }
 75 const WebCore::IntPoint& position() const { return m_position; }
 76 const WebCore::IntSize& radius() const { return m_radius; }
 77 float rotationAngle() const { return m_rotationAngle; }
 78 float force() const { return m_force; }
 79
 80 void setState(TouchPointState state) { m_state = state; }
 81
 82 void encode(CoreIPC::ArgumentEncoder&) const;
 83 static bool decode(CoreIPC::ArgumentDecoder&, WebPlatformTouchPoint&);
 84
 85private:
 86 virtual APIObject::Type type() const { return APIType; }
 87
 88 uint32_t m_id;
 89 uint32_t m_state;
 90 WebCore::IntPoint m_screenPosition;
 91 WebCore::IntPoint m_position;
 92 WebCore::IntSize m_radius;
 93 float m_rotationAngle;
 94 float m_force;
 95};
 96
 97} // namespace WebKit
 98
 99#endif // ENABLE(TOUCH_EVENTS)
 100
 101#endif // WebEvent_h

Source/WebKit2/Shared/WebTouchEvent.cpp

3333
3434namespace WebKit {
3535
36 WebTouchEvent::WebTouchEvent(WebEvent::Type type, Vector<WebPlatformTouchPoint> touchPoints, Modifiers modifiers, double timestamp)
 36WebTouchEvent::WebTouchEvent(WebEvent::Type type, const Vector<WebPlatformTouchPoint>& touchPoints, Modifiers modifiers, double timestamp)
3737 : WebEvent(type, modifiers, timestamp)
3838 , m_touchPoints(touchPoints)
3939{
4040 ASSERT(isTouchEventType(type));
4141}
4242
 43WebTouchEvent::WebTouchEvent(const WebTouchEvent& touchEvent)
 44 : WebEvent(touchEvent.eventType(), touchEvent.modifiers(), touchEvent.timestamp())
 45 , m_touchPoints(touchEvent.touchPoints())
 46{
 47 ASSERT(isTouchEventType(type));
 48}
 49
4350void WebTouchEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
4451{
4552 WebEvent::encode(encoder);

@@bool WebTouchEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebTouchEvent& res
5865 return true;
5966}
6067
61 bool WebTouchEvent::isTouchEventType(Type type)
 68bool WebTouchEvent::isTouchEventType(WebEvent::Type type)
6269{
6370 return type == TouchStart || type == TouchMove || type == TouchEnd || type == TouchCancel;
6471}

Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp

2828#if ENABLE(TOUCH_EVENTS)
2929#include "NativeWebTouchEvent.h"
3030
31 #include "WebEventFactory.h"
32 
3331namespace WebKit {
3432
35 NativeWebTouchEvent::NativeWebTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers, const WebCore::AffineTransform& toWebContent, const WebCore::AffineTransform& toDeviceScreen, double timestamp)
36  : WebTouchEvent(WebEventFactory::createWebTouchEvent(type, points, modifiers, toWebContent, toDeviceScreen, timestamp))
 33NativeWebTouchEvent::NativeWebTouchEvent(const WebTouchEvent& webTouchEvent)
 34 : WebTouchEvent(webTouchEvent)
3735{
3836}
3937

Source/WebKit2/Shared/efl/WebEventFactory.cpp

@@WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const Evas_Event_Key_Up
204204 convertMillisecondToSecond(event->timestamp));
205205}
206206
207 #if ENABLE(TOUCH_EVENTS)
208 static inline WebEvent::Type typeForTouchEvent(Ewk_Touch_Event_Type type)
209 {
210  if (type == EWK_TOUCH_START)
211  return WebEvent::TouchStart;
212  if (type == EWK_TOUCH_MOVE)
213  return WebEvent::TouchMove;
214  if (type == EWK_TOUCH_END)
215  return WebEvent::TouchEnd;
216  if (type == EWK_TOUCH_CANCEL)
217  return WebEvent::TouchCancel;
218 
219  return WebEvent::NoType;
220 }
221 
222 WebTouchEvent WebEventFactory::createWebTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers, const AffineTransform& toWebContent, const AffineTransform& toDeviceScreen, double timestamp)
223 {
224  Vector<WebPlatformTouchPoint> touchPoints;
225  touchPoints.reserveInitialCapacity(eina_list_count(points));
226 
227  const Eina_List* list;
228  void* item;
229  EINA_LIST_FOREACH(points, list, item) {
230  Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(item);
231 
232  WebPlatformTouchPoint::TouchPointState state;
233  switch (point->state) {
234  case EVAS_TOUCH_POINT_UP:
235  state = WebPlatformTouchPoint::TouchReleased;
236  break;
237  case EVAS_TOUCH_POINT_MOVE:
238  state = WebPlatformTouchPoint::TouchMoved;
239  break;
240  case EVAS_TOUCH_POINT_DOWN:
241  state = WebPlatformTouchPoint::TouchPressed;
242  break;
243  case EVAS_TOUCH_POINT_STILL:
244  state = WebPlatformTouchPoint::TouchStationary;
245  break;
246  case EVAS_TOUCH_POINT_CANCEL:
247  state = WebPlatformTouchPoint::TouchCancelled;
248  break;
249  default:
250  ASSERT_NOT_REACHED();
251  continue;
252  }
253 
254  IntPoint pos(point->x, point->y);
255  touchPoints.uncheckedAppend(WebPlatformTouchPoint(point->id, state, toDeviceScreen.mapPoint(pos), toWebContent.mapPoint(pos)));
256  }
257 
258  return WebTouchEvent(typeForTouchEvent(type), touchPoints, modifiersForEvent(modifiers), timestamp);
259 }
260 #endif
261 
262207} // namespace WebKit

Source/WebKit2/Shared/efl/WebEventFactory.h

2727#define WebEventFactory_h
2828
2929#include "WebEvent.h"
30 #include "ewk_touch.h"
3130#include <Evas.h>
3231#include <WebCore/AffineTransform.h>
3332

@@public:
4140 static WebWheelEvent createWebWheelEvent(const Evas_Event_Mouse_Wheel*, const WebCore::AffineTransform&, const WebCore::AffineTransform&);
4241 static WebKeyboardEvent createWebKeyboardEvent(const Evas_Event_Key_Down*);
4342 static WebKeyboardEvent createWebKeyboardEvent(const Evas_Event_Key_Up*);
44 #if ENABLE(TOUCH_EVENTS)
45  static WebTouchEvent createWebTouchEvent(Ewk_Touch_Event_Type, const Eina_List*, const Evas_Modifier*, const WebCore::AffineTransform&, const WebCore::AffineTransform&, double timestamp);
46 #endif
4743};
4844
4945} // namespace WebKit

Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h

@@WK_ADD_API_MAPPING(WKViewRef, WebView)
3737WK_ADD_API_MAPPING(WKPopupItemRef, WebPopupItemEfl)
3838WK_ADD_API_MAPPING(WKPopupMenuListenerRef, WebPopupMenuListenerEfl)
3939
 40#if ENABLE(TOUCH_EVENTS)
 41WK_ADD_API_MAPPING(WKTouchPointRef, WebPlatformTouchPoint)
 42WK_ADD_API_MAPPING(WKTouchEventRef, WebTouchEvent)
 43#endif
 44
4045// Enum conversions.
4146inline WKPopupItemTextDirection toAPI(WebCore::TextDirection direction)
4247{

Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.cpp

 1/*
 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WKEventEfl.h"
 28
 29#include "ImmutableArray.h"
 30#include "WKAPICast.h"
 31#include "WebEvent.h"
 32
 33using namespace WebKit;
 34
 35static inline WebEvent::Type toWebEventType(WKEventType type)
 36{
 37 switch (type) {
 38#if ENABLE(TOUCH_EVENTS)
 39 case kWKEventTypeTouchStart:
 40 return WebEvent::TouchStart;
 41 case kWKEventTypeTouchMove:
 42 return WebEvent::TouchMove;
 43 case kWKEventTypeTouchEnd:
 44 return WebEvent::TouchEnd;
 45 case kWKEventTypeTouchCancel:
 46 return WebEvent::TouchCancel;
 47#endif
 48 default:
 49 return WebEvent::NoType;
 50 }
 51
 52}
 53
 54static inline WebEvent::Modifiers toWebEventModifiers(unsigned modifiers)
 55{
 56 unsigned result = 0;
 57
 58 if (modifiers & kWKEventModifiersShiftKey)
 59 result |= WebEvent::ShiftKey;
 60 if (modifiers & kWKEventModifiersControlKey)
 61 result |= WebEvent::ControlKey;
 62 if (modifiers & kWKEventModifiersAltKey)
 63 result |= WebEvent::AltKey;
 64 if (modifiers & kWKEventModifiersMetaKey)
 65 result |= WebEvent::MetaKey;
 66
 67 return static_cast<WebEvent::Modifiers>(result);
 68}
 69
 70WKTouchEventRef WKTouchEventCreate(WKEventType type, WKArrayRef wkTouchPoints, WKEventModifiers modifiers, double timestamp)
 71{
 72#if ENABLE(TOUCH_EVENTS)
 73 ImmutableArray* touchPointsArray = toImpl(wkTouchPoints);
 74 size_t size = touchPointsArray->size();
 75
 76 Vector<WebPlatformTouchPoint> touchPoints;
 77 touchPoints.reserveInitialCapacity(size);
 78
 79 for (size_t i = 0; i < size; ++i) {
 80 WebPlatformTouchPoint* webTouchPoint = touchPointsArray->at<WebPlatformTouchPoint>(i);
 81 if (webTouchPoint)
 82 touchPoints.uncheckedAppend(*webTouchPoint);
 83 }
 84
 85 return toAPI(WebTouchEvent::create(toWebEventType(type), touchPoints, toWebEventModifiers(modifiers), timestamp).leakRef());
 86#else
 87 UNUSED_PARAM(event);
 88 return 0;
 89#endif
 90}

Source/WebKit2/UIProcess/API/C/efl/WKEventEfl.h

 1/*
 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
 3 * Copyright (C) 2012-2013 Nokia Corporation and/or its subsidiary(-ies).
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#ifndef WKEventEfl_h
 28#define WKEventEfl_h
 29
 30#include <WebKit2/WKEvent.h>
 31#include <WebKit2/WKGeometry.h>
 32
 33#ifdef __cplusplus
 34extern "C" {
 35#endif
 36
 37enum WKEventType {
 38 kWKEventTypeNoType = -1,
 39 kWKEventTypeTouchStart,
 40 kWKEventTypeTouchMove,
 41 kWKEventTypeTouchEnd,
 42 kWKEventTypeTouchCancel
 43};
 44typedef enum WKEventType WKEventType;
 45
 46enum WKTouchPointState {
 47 kWKTouchPointStateTouchReleased,
 48 kWKTouchPointStateTouchPressed,
 49 kWKTouchPointStateTouchMoved,
 50 kWKTouchPointStateTouchStationary,
 51 kWKTouchPointStateTouchCancelled
 52};
 53typedef enum WKTouchPointState WKTouchPointState;
 54
 55struct WKTouchPoint {
 56 unsigned id;
 57 WKTouchPointState state;
 58 WKPoint position;
 59 WKPoint screenPosition;
 60 WKSize radius;
 61 float rotationAngle;
 62 float force;
 63};
 64typedef struct WKTouchPoint WKTouchPoint;
 65
 66enum { kWKMaximumTouchPointsPerTouchEvent = 5 };
 67
 68struct WKTouchEvent {
 69 WKEventType type;
 70 WKEventModifiers modifiers;
 71 double timestamp;
 72 unsigned numTouchPoints;
 73 WKTouchPoint touchPoints[kWKMaximumTouchPointsPerTouchEvent];
 74};
 75typedef struct WKTouchEvent WKTouchEvent;
 76
 77WK_EXPORT WKTouchEventRef WKTouchEventCreate(WKEventType, WKArrayRef, WKEventModifiers, double timestamp);
 78
 79#ifdef __cplusplus
 80}
 81#endif
 82
 83#endif /* WKEventEfl_h */

Source/WebKit2/UIProcess/API/C/efl/WKView.cpp

2323
2424#include "EwkView.h"
2525#include "WKAPICast.h"
 26#include "WebEvent.h"
 27#include "WebPlatformTouchPoint.h"
2628#include "ewk_context_private.h"
 29#include <WebCore/AffineTransform.h>
2730#include <WebKit2/WKImageCairo.h>
 31#include <wtf/Vector.h>
2832
 33using namespace WebCore;
2934using namespace WebKit;
3035
3136static inline WKViewRef createWKView(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pageGroupRef, EwkView::ViewBehavior behavior)

@@WKImageRef WKViewCreateSnapshot(WKViewRef viewRef)
148153 EwkView* ewkView = toEwkView(toImpl(viewRef)->evasObject());
149154 return WKImageCreateFromCairoSurface(ewkView->takeSnapshot().get(), 0 /* options */);
150155}
 156
 157void WKViewSendTouchEvent(WKViewRef viewRef, WKTouchEventRef touchEventRef)
 158{
 159#if ENABLE(TOUCH_EVENTS)
 160 toImpl(viewRef)->sendTouchEvent(toImpl(touchEventRef));
 161#else
 162 UNUSED_PARAM(viewRef);
 163 UNUSED_PARAM(touchEventRef);
 164#endif
 165}
 166
 167#if ENABLE(TOUCH_EVENTS)
 168static inline WebPlatformTouchPoint::TouchPointState toWebPlatformTouchPointState(WKTouchPointState state)
 169{
 170 switch (state) {
 171 case kWKTouchPointStateTouchReleased:
 172 return WebPlatformTouchPoint::TouchReleased;
 173 case kWKTouchPointStateTouchMoved:
 174 return WebPlatformTouchPoint::TouchMoved;
 175 case kWKTouchPointStateTouchPressed:
 176 return WebPlatformTouchPoint::TouchPressed;
 177 case kWKTouchPointStateTouchStationary:
 178 return WebPlatformTouchPoint::TouchStationary;
 179 case kWKTouchPointStateTouchCancelled:
 180 default:
 181 return WebPlatformTouchPoint::TouchCancelled;
 182 }
 183}
 184#endif
 185
 186WKTouchPointRef WKViewCreateTouchPoint(WKViewRef viewRef, int id, WKPoint position, WKPoint screenPosition, WKTouchPointState state, WKSize radius, float rotationAngle, float force)
 187{
 188#if ENABLE(TOUCH_EVENTS)
 189 AffineTransform toWebContent = toImpl(viewRef)->transformFromScene();
 190
 191 return toAPI(WebPlatformTouchPoint::create(id, toWebPlatformTouchPointState(state), toIntPoint(screenPosition), toWebContent.mapPoint(toIntPoint(position)), toIntSize(radius), rotationAngle, force).leakRef());
 192#else
 193 UNUSED_PARAM(id);
 194 UNUSED_PARAM(x);
 195 UNUSED_PARAM(y);
 196 UNUSED_PARAM(state);
 197 return 0;
 198#endif
 199}

Source/WebKit2/UIProcess/API/C/efl/WKView.h

2222#define WKView_h
2323
2424#include <WebKit2/WKBase.h>
 25#include <WebKit2/WKEventEfl.h>
2526#include <WebKit2/WKGeometry.h>
2627
2728#if USE(EO)

@@WK_EXPORT Evas_Object* WKViewGetEvasObject(WKViewRef);
9394
9495WK_EXPORT WKImageRef WKViewCreateSnapshot(WKViewRef);
9596
 97WK_EXPORT void WKViewSendTouchEvent(WKViewRef, WKTouchEventRef);
 98WK_EXPORT WKTouchPointRef WKViewCreateTouchPoint(WKViewRef, int id, WKPoint position, WKPoint screenPosition, WKTouchPointState, WKSize radius, float rotationAngle, float force);
 99
96100#ifdef __cplusplus
97101}
98102#endif

Source/WebKit2/UIProcess/API/efl/EwkView.cpp

3636#include "PageViewportControllerClientEfl.h"
3737#include "SnapshotImageGL.h"
3838#include "ViewClientEfl.h"
 39#include "WKArray.h"
3940#include "WKDictionary.h"
 41#include "WKEventEfl.h"
4042#include "WKGeometry.h"
4143#include "WKNumber.h"
4244#include "WKPageGroup.h"

5860#include "ewk_private.h"
5961#include "ewk_security_origin_private.h"
6062#include "ewk_settings_private.h"
 63#include "ewk_touch_private.h"
6164#include "ewk_view.h"
6265#include "ewk_window_features_private.h"
6366#include <Ecore_Evas.h>

@@void EwkView::setMouseEventsEnabled(bool enabled)
710713}
711714
712715#if ENABLE(TOUCH_EVENTS)
 716static WKTouchPointState toWKTouchPointState(Evas_Touch_Point_State state)
 717{
 718 switch (state) {
 719 case EVAS_TOUCH_POINT_UP:
 720 return kWKTouchPointStateTouchReleased;
 721 case EVAS_TOUCH_POINT_MOVE:
 722 return kWKTouchPointStateTouchMoved;
 723 case EVAS_TOUCH_POINT_DOWN:
 724 return kWKTouchPointStateTouchPressed;
 725 case EVAS_TOUCH_POINT_STILL:
 726 return kWKTouchPointStateTouchStationary;
 727 case EVAS_TOUCH_POINT_CANCEL:
 728 default:
 729 return kWKTouchPointStateTouchCancelled;
 730 }
 731}
 732
 733static WKEventModifiers toWKEventModifiers(const Evas_Modifier* modifiers)
 734{
 735 WKEventModifiers wkModifiers = 0;
 736 if (evas_key_modifier_is_set(modifiers, "Shift"))
 737 wkModifiers |= kWKEventModifiersShiftKey;
 738 if (evas_key_modifier_is_set(modifiers, "Control"))
 739 wkModifiers |= kWKEventModifiersControlKey;
 740 if (evas_key_modifier_is_set(modifiers, "Alt"))
 741 wkModifiers |= kWKEventModifiersAltKey;
 742 if (evas_key_modifier_is_set(modifiers, "Meta"))
 743 wkModifiers |= kWKEventModifiersMetaKey;
 744
 745 return wkModifiers;
 746}
 747
713748void EwkView::feedTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers)
714749{
715  page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, webView()->transformFromScene(), transformToScreen(), ecore_time_get()));
 750 const unsigned count = eina_list_count(points);
 751 OwnArrayPtr<WKTypeRef> touchPoints = adoptArrayPtr(new WKTypeRef[count]);
 752 for (unsigned i = 0; i < count; ++i) {
 753 Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_nth(points, i));
 754 EINA_SAFETY_ON_NULL_RETURN(point);
 755 IntPoint position(point->x, point->y);
 756 touchPoints[i] = WKViewCreateTouchPoint(wkView(), point->id, toAPI(IntPoint(position)), toAPI(transformToScreen().mapPoint(position)), toWKTouchPointState(point->state), WKSizeMake(0, 0), 0, 0);
 757 }
 758 WKRetainPtr<WKArrayRef> wkTouchPoints(AdoptWK, WKArrayCreateAdoptingValues(touchPoints.get(), count));
 759
 760 WKViewSendTouchEvent(wkView(), adoptWK(WKTouchEventCreate(static_cast<WKEventType>(type), wkTouchPoints.get(), toWKEventModifiers(modifiers), ecore_time_get())).get());
716761}
717762
718763void EwkView::setTouchEventsEnabled(bool enabled)

Source/WebKit2/UIProcess/API/efl/EwkView.h

3737#include <WebCore/RefPtrCairo.h>
3838#include <WebCore/TextDirection.h>
3939#include <WebCore/Timer.h>
 40#include <WebCore/TransformationMatrix.h>
4041#include <WebKit2/WKBase.h>
4142#include <wtf/HashMap.h>
4243#include <wtf/OwnPtr.h>

@@class Color;
8081class CoordinatedGraphicsScene;
8182class Cursor;
8283class IntSize;
83 class TransformationMatrix;
8484}
8585
8686class EwkContext;

Source/WebKit2/UIProcess/API/efl/ewk_touch.cpp

 1/*
 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "ewk_touch.h"
 28
 29#include "ewk_touch_private.h"
 30#include <Ecore.h>
 31#include <WebCore/AffineTransform.h>
 32
 33using namespace WebCore;
 34
 35WKTouchEvent* createWKTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers, const AffineTransform& toDeviceScreen)
 36{
 37 EINA_SAFETY_ON_NULL_RETURN_VAL(points, 0);
 38
 39 WKTouchEvent* touchEvent = new WKTouchEvent;
 40 touchEvent->type = static_cast<WKEventType>(type);
 41 touchEvent->timestamp = ecore_time_get();
 42 touchEvent->numTouchPoints = eina_list_count(points);
 43 if (touchEvent->numTouchPoints > kWKMaximumTouchPointsPerTouchEvent)
 44 touchEvent->numTouchPoints = eina_list_count(points);
 45
 46 touchEvent->modifiers = 0;
 47 if (evas_key_modifier_is_set(modifiers, "Shift"))
 48 touchEvent->modifiers |= kWKEventModifiersShiftKey;
 49 if (evas_key_modifier_is_set(modifiers, "Control"))
 50 touchEvent->modifiers |= kWKEventModifiersControlKey;
 51 if (evas_key_modifier_is_set(modifiers, "Alt"))
 52 touchEvent->modifiers |= kWKEventModifiersAltKey;
 53 if (evas_key_modifier_is_set(modifiers, "Meta"))
 54 touchEvent->modifiers |= kWKEventModifiersMetaKey;
 55
 56 const Eina_List* list;
 57 unsigned index;
 58 for (list = points, index = 0; list && index < touchEvent->numTouchPoints; list = eina_list_next(list), ++index) {
 59 double x;
 60 double y;
 61 Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(list));
 62 WKTouchPoint& wkTouchPoint = touchEvent->touchPoints[index];
 63
 64 wkTouchPoint.id = point->id;
 65 wkTouchPoint.position = WKPointMake(point->x, point->y);
 66 toDeviceScreen.map(point->x, point->y, x, y);
 67 wkTouchPoint.screenPosition = WKPointMake(x, y);
 68 wkTouchPoint.radius = WKSizeMake(0, 0);
 69 wkTouchPoint.rotationAngle = 0;
 70 wkTouchPoint.force = 0;
 71
 72 switch (point->state) {
 73 case EVAS_TOUCH_POINT_UP:
 74 wkTouchPoint.state = kWKTouchPointStateTouchReleased;
 75 break;
 76 case EVAS_TOUCH_POINT_MOVE:
 77 wkTouchPoint.state = kWKTouchPointStateTouchMoved;
 78 break;
 79 case EVAS_TOUCH_POINT_DOWN:
 80 wkTouchPoint.state = kWKTouchPointStateTouchPressed;
 81 break;
 82 case EVAS_TOUCH_POINT_STILL:
 83 wkTouchPoint.state = kWKTouchPointStateTouchStationary;
 84 break;
 85 case EVAS_TOUCH_POINT_CANCEL:
 86 default:
 87 wkTouchPoint.state = kWKTouchPointStateTouchCancelled;
 88 break;
 89 }
 90 }
 91
 92 return touchEvent;
 93}

Source/WebKit2/UIProcess/API/efl/ewk_touch_private.h

 1/*
 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef ewk_touch_private_h
 27#define ewk_touch_private_h
 28
 29#include "WKEventEfl.h"
 30#include "ewk_touch.h"
 31#include <Eina.h>
 32#include <Evas.h>
 33
 34namespace WebCore {
 35class AffineTransform;
 36}
 37
 38WKTouchEvent* createWKTouchEvent(Ewk_Touch_Event_Type, const Eina_List* points, const Evas_Modifier*, const WebCore::AffineTransform& toDeviceScreen);
 39
 40#endif // ewk_touch_private_h

Source/WebKit2/UIProcess/efl/WebView.cpp

@@void WebView::pageTransitionViewportReady()
519519 m_ewkView->scheduleUpdateDisplay();
520520}
521521
 522#if ENABLE(TOUCH_EVENTS)
 523void WebView::sendTouchEvent(const WebTouchEvent* touchEvent)
 524{
 525 ASSERT(touchEvent);
 526 m_page->handleTouchEvent(NativeWebTouchEvent(*touchEvent));
 527}
 528#endif
 529
522530} // namespace WebKit

Source/WebKit2/UIProcess/efl/WebView.h

@@public:
8080 void exitFullScreen();
8181#endif
8282
 83#if ENABLE(TOUCH_EVENTS)
 84 void sendTouchEvent(const WebTouchEvent*);
 85#endif
 86
8387 // View client.
8488 void initializeClient(const WKViewClient*);
8589