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 <b.kelemen@samsung.com>
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);
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);
};
}
const Eina_List* l;
void* data;
EINA_LIST_FOREACH(points, l, data) {
- ui::TouchEvent touch_event = WebEventFactoryEfl::toUITouchEvent(static_cast<tizen_webview::Touch_Point*>(data), evas_object(), rwhv()->device_scale_factor());
+ const tizen_webview::Touch_Point* point = reinterpret_cast<tizen_webview::Touch_Point*>(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);
}
}