diff options
| author | Steve Block <steveblock@google.com> | 2011-05-06 11:45:16 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2011-05-12 13:44:10 +0100 |
| commit | cad810f21b803229eb11403f9209855525a25d57 (patch) | |
| tree | 29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /WebKit/efl/ewk/ewk_frame.cpp | |
| parent | 121b0cf4517156d0ac5111caf9830c51b69bae8f (diff) | |
| download | external_webkit-cad810f21b803229eb11403f9209855525a25d57.zip external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2 | |
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'WebKit/efl/ewk/ewk_frame.cpp')
| -rw-r--r-- | WebKit/efl/ewk/ewk_frame.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp index 5076be5..1cadc77 100644 --- a/WebKit/efl/ewk/ewk_frame.cpp +++ b/WebKit/efl/ewk/ewk_frame.cpp @@ -24,6 +24,7 @@ #include "config.h" #include "ewk_frame.h" +#include "DocumentMarkerController.h" #include "EWebKit.h" #include "EventHandler.h" #include "FocusController.h" @@ -36,6 +37,7 @@ #include "KURL.h" #include "PlatformKeyboardEvent.h" #include "PlatformMouseEvent.h" +#include "PlatformTouchEvent.h" #include "PlatformWheelEvent.h" #include "ProgressTracker.h" #include "RefPtr.h" @@ -191,6 +193,7 @@ static void _ewk_frame_smart_add(Evas_Object* o) sd->self = o; _parent_sc.add(o); + evas_object_static_clip_set(sd->base.clipper, EINA_FALSE); evas_object_move(sd->base.clipper, 0, 0); evas_object_resize(sd->base.clipper, 0, 0); @@ -1474,6 +1477,42 @@ Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move* return sd->frame->eventHandler()->mouseMoved(event); } +Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState) +{ + Eina_Bool ret = EINA_FALSE; + +#if ENABLE(TOUCH_EVENTS) + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(points, EINA_FALSE); + + Evas_Coord x, y; + evas_object_geometry_get(sd->view, &x, &y, 0, 0); + + WebCore::TouchEventType type = WebCore::TouchStart; + switch (action) { + case EWK_TOUCH_START: + type = WebCore::TouchStart; + break; + case EWK_TOUCH_END: + type = WebCore::TouchEnd; + break; + case EWK_TOUCH_MOVE: + type = WebCore::TouchMove; + break; + case EWK_TOUCH_CANCEL: + type = WebCore::TouchCancel; + break; + default: + return EINA_FALSE; + } + + WebCore::PlatformTouchEvent te(points, WebCore::IntPoint(x, y), type, metaState); + ret = sd->frame->eventHandler()->handleTouchEvent(te); +#endif + return ret; +} + static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent &event) { WebCore::ScrollDirection direction; |
