From: Balazs Kelemen Date: Thu, 25 Sep 2014 18:51:35 +0000 (-0400) Subject: Fix gestures with m39 X-Git-Tag: submit/tizen/20190801.160004~2354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ccb1844e22939e2cf8db6abfe1300e41f80ddf9;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Fix gestures with m39 Chromium doesn't handle or want to see touch-still (i.e. EVAS_TOUCH_POINT_STILL) events. In debug it leads to a NOTREACHED in aura code, in release it confuses the gesture handler so it doesn't function correctly. It seems like we can simply ignore these events. Note that this doesn't solve the bringup of impl level touch features such as selection or overscroll effect. Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=5593 Change-Id: Ia8fe780d2ca507481641ee0ce9feb497783cfc7d Signed-off-by: Balazs Kelemen --- diff --git a/tizen_src/impl/browser/renderer_host/web_event_factory_efl.cc b/tizen_src/impl/browser/renderer_host/web_event_factory_efl.cc index 5b771b2a9db1..de983636a039 100644 --- a/tizen_src/impl/browser/renderer_host/web_event_factory_efl.cc +++ b/tizen_src/impl/browser/renderer_host/web_event_factory_efl.cc @@ -318,14 +318,15 @@ static ui::EventType EvasTouchEventTypeToUI(Evas_Touch_Point_State evas_touch) { return ui::ET_TOUCH_RELEASED; case EVAS_TOUCH_POINT_CANCEL: return ui::ET_TOUCH_CANCELLED; - case EVAS_TOUCH_POINT_STILL: // No equivalent in chromium M35+ + case EVAS_TOUCH_POINT_STILL: + // Not handled by chromium, should not be passed here. default: + NOTREACHED(); return ui::ET_UNKNOWN; } - } -ui::TouchEvent WebEventFactoryEfl::toUITouchEvent(tizen_webview::Touch_Point* p, Evas_Object* web_view, float scale_factor) { +ui::TouchEvent WebEventFactoryEfl::toUITouchEvent(const tizen_webview::Touch_Point* p, Evas_Object* web_view, float scale_factor) { int x = p->x, y = p->y; TranslateEvasCoordToWebKitCoord(web_view, x, y); diff --git a/tizen_src/impl/browser/renderer_host/web_event_factory_efl.h b/tizen_src/impl/browser/renderer_host/web_event_factory_efl.h index f72f44d3d208..082d6c0481d1 100644 --- a/tizen_src/impl/browser/renderer_host/web_event_factory_efl.h +++ b/tizen_src/impl/browser/renderer_host/web_event_factory_efl.h @@ -42,7 +42,7 @@ class WebEventFactoryEfl { static content::NativeWebKeyboardEvent toWebKeyboardEvent(Evas*, const Evas_Event_Key_Down*); static content::NativeWebKeyboardEvent toWebKeyboardEvent(Evas*, const Evas_Event_Key_Up*); - static ui::TouchEvent toUITouchEvent(tizen_webview::Touch_Point*, Evas_Object* evas_object, float scale_factor); + static ui::TouchEvent toUITouchEvent(const tizen_webview::Touch_Point*, Evas_Object* evas_object, float scale_factor); }; } diff --git a/tizen_src/impl/eweb_view.cc b/tizen_src/impl/eweb_view.cc index 51d30e25c11d..911217fa2a21 100644 --- a/tizen_src/impl/eweb_view.cc +++ b/tizen_src/impl/eweb_view.cc @@ -572,7 +572,12 @@ void EWebView::HandleTouchEvents(tizen_webview::Touch_Event_Type type, const Ein const Eina_List* l; void* data; EINA_LIST_FOREACH(points, l, data) { - ui::TouchEvent touch_event = WebEventFactoryEfl::toUITouchEvent(static_cast(data), evas_object(), rwhv()->device_scale_factor()); + const tizen_webview::Touch_Point* point = reinterpret_cast(data); + if (point->state == EVAS_TOUCH_POINT_STILL) { + // Chromium doesn't expect (and doesn't like) these events. + continue; + } + ui::TouchEvent touch_event = WebEventFactoryEfl::toUITouchEvent(point, evas_object(), rwhv()->device_scale_factor()); rwhv()->HandleTouchEvent(&touch_event); } }