[els_webview]send mouse up event for flash
authorEunmi Lee <eunmi15.lee@samsung.com>
Wed, 29 Sep 2010 07:26:51 +0000 (16:26 +0900)
committerEunmi Lee <eunmi15.lee@samsung.com>
Wed, 29 Sep 2010 07:27:02 +0000 (16:27 +0900)
src/lib/els_webview.c

index 7231522..60cb84b 100644 (file)
@@ -1774,6 +1774,28 @@ _smart_cb_mouse_up(void* data, Evas_Object* webview, void* ev)
 
    Evas_Point* point = (Evas_Point*)ev;
    DBG(" argument : (%d, %d)\n", point->x, point->y);
+
+   // if the target is flash, we send mouse up event to webkit
+   int ewk_x, ewk_y;
+   _coords_evas_to_ewk(webview, point->x, point->y, &ewk_x, &ewk_y);
+   Eina_Bool have_link = EINA_FALSE;
+   Eina_Bool have_image = EINA_FALSE;
+   Eina_Bool have_flash = EINA_FALSE;
+   char *link_url = NULL, *link_text = NULL, *image_url = NULL;
+   if (!sd->ewk_page_check_point)
+     sd->ewk_page_check_point = (Eina_Bool (*)(Evas_Object *, int, int, Evas_Event_Mouse_Down *, Eina_Bool *, Eina_Bool *, Eina_Bool *, char **, char **, char **))dlsym(ewk_handle, "ewk_page_check_point");
+   sd->ewk_page_check_point(webview, ewk_x, ewk_y, &sd->mouse_down_copy,
+        &have_link, &have_image, &have_flash, &link_url, &link_text, &image_url);
+   if (link_url) free(link_url);
+   if (link_text) free(link_text);
+   if (image_url) free(image_url);
+   if (have_flash)
+     {
+       Evas_Event_Mouse_Up mouse_up = sd->mouse_up_copy;
+       mouse_up.canvas.x = point->x;
+       mouse_up.canvas.y = point->y;
+       _parent_sc.mouse_up((Ewk_View_Smart_Data*)sd, &mouse_up);
+     }
 }
 
 static void