From: Arnaud Renevier Date: Mon, 23 Feb 2015 20:06:34 +0000 (-0800) Subject: Use asynchronous hit test in efl_webview_app X-Git-Tag: submit/tizen/20201118.160233~1176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=191e11d427fd3d7c7cece31a6fc4b9434b28b408;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Use asynchronous hit test in efl_webview_app efl_webview_app still uses deprecated (synchronous) hit test api. This patch fixes it. Reviewed by: Antonio Gomes, SeungSeop Park Change-Id: Ibe774ad8a8c798cf7a9449744a54d04d7bf17a7c Signed-off-by: Arnaud Renevier --- diff --git a/tizen_src/ewk/efl_webview_app/app.c b/tizen_src/ewk/efl_webview_app/app.c index 4d98bd8..28c2036 100644 --- a/tizen_src/ewk/efl_webview_app/app.c +++ b/tizen_src/ewk/efl_webview_app/app.c @@ -116,6 +116,7 @@ static void __scroll_down_cb(void* data, Evas_Object* obj, void* event_info); static void __scroll_up_cb(void* data, Evas_Object* obj, void* event_info); static void __scroll_left_cb(void* data, Evas_Object* obj, void* event_info); static void __scroll_right_cb(void* data, Evas_Object* obj, void* event_info); +static void __hit_test_request_cb(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_Hit_Test*, void* user_data); static void __webprocess_crashed_cb(void* data, Evas_Object* obj, void* event_info); static void on_evas_resize(Ecore_Evas*); @@ -1368,13 +1369,8 @@ void __scroll_right_cb(void* data, Evas_Object* obj, void* event_info) printf("Scroll Right Notification\n"); } -void on_mouse_up(void* data, Evas* canvas, Evas_Object* obj, void* event_info) +void __hit_test_request_cb(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_Hit_Test* ht, void* user_data) { - Evas_Event_Mouse_Up* event = (Evas_Event_Mouse_Up*)event_info; - if (!evas_key_modifier_is_set(event->modifiers, "Shift")) - return; - - Ewk_Hit_Test* ht = ewk_view_hit_test_new(obj, event->canvas.x, event->canvas.y, EWK_HIT_TEST_MODE_ALL); printf("HitTest: context %d\n", ewk_hit_test_result_context_get(ht)); printf("HitTest: link uri %s\n", ewk_hit_test_link_uri_get(ht)); printf("HitTest: link title %s\n", ewk_hit_test_link_title_get(ht)); @@ -1410,6 +1406,16 @@ void on_mouse_up(void* data, Evas* canvas, Evas_Object* obj, void* event_info) if (attr_hash) { eina_hash_foreach(attr_hash, _util_print_hit_test_result_hash_fn, NULL); } + +} + +void on_mouse_up(void* data, Evas* canvas, Evas_Object* obj, void* event_info) +{ + Evas_Event_Mouse_Up* event = (Evas_Event_Mouse_Up*)event_info; + if (!evas_key_modifier_is_set(event->modifiers, "Shift")) + return; + + ewk_view_hit_test_request(obj, event->canvas.x, event->canvas.y, EWK_HIT_TEST_MODE_ALL, __hit_test_request_cb, NULL); } void __undo_size_cb(void* data, Evas_Object* obj, void* event_info)