[EFL][WK2] MiniBrower comes to crash when combo box is pressed
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 02:20:48 +0000 (02:20 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 02:20:48 +0000 (02:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135378

Reviewed by Gyuyoung Kim.

Source/WebKit2:
Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.

* UIProcess/API/efl/ewk_view.h:

Tools:
"clicked" signal of elm_menu is emitted after EwkView calls popup_menu_hide
and removes Ewk_Popup_Menu instance.

* MiniBrowser/efl/main.c:
(on_popup_menu_show):
(on_popup_menu_discarded): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171906 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/ewk_view.h
Tools/ChangeLog
Tools/MiniBrowser/efl/main.c

index 6c1e05d..e64d88c 100644 (file)
@@ -1,5 +1,16 @@
 2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
 
+        [EFL][WK2] MiniBrower comes to crash when combo box is pressed
+        https://bugs.webkit.org/show_bug.cgi?id=135378
+
+        Reviewed by Gyuyoung Kim.
+
+        Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
+
+        * UIProcess/API/efl/ewk_view.h:
+
+2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
+
         [EFL] remove ewk_defines.h
         https://bugs.webkit.org/show_bug.cgi?id=135456
 
index d56ec63..976133c 100644 (file)
@@ -117,7 +117,25 @@ struct Ewk_View_Smart_Class {
     Eina_Bool (*context_menu_show)(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Ewk_Context_Menu *menu);
     Eina_Bool (*context_menu_hide)(Ewk_View_Smart_Data *sd);
 
+    /**
+     * @brief smart method to notify that <select> tag is pressed.
+     *
+     * Application should implement this method to support select tag.
+     *
+     * @note After @c popup_menu_hide is called, @a menu will not be valid.
+     *
+     * @see ewk_popup_menu_selected_index_get
+     * @see ewk_popup_menu_selected_index_set
+     * @see ewk_popup_menu_close
+     */
     Eina_Bool (*popup_menu_show)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Ewk_Popup_Menu *menu);
+    /**
+     * @brief smart method to notify that current @a menu will be hidden and destroyed.
+     *
+     * @see ewk_popup_menu_selected_index_get
+     * @see ewk_popup_menu_selected_index_set
+     * @see ewk_popup_menu_close
+     */
     Eina_Bool (*popup_menu_hide)(Ewk_View_Smart_Data *sd);
 
     // event handling:
index 3f9722a..8252b03 100644 (file)
@@ -1,3 +1,17 @@
+2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL][WK2] MiniBrower comes to crash when combo box is pressed
+        https://bugs.webkit.org/show_bug.cgi?id=135378
+
+        Reviewed by Gyuyoung Kim.
+
+        "clicked" signal of elm_menu is emitted after EwkView calls popup_menu_hide
+        and removes Ewk_Popup_Menu instance.
+
+        * MiniBrowser/efl/main.c:
+        (on_popup_menu_show):
+        (on_popup_menu_discarded): Deleted.
+
 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Use RC_PROJECTBUILDVERSION as build portion of version
index 397f58d..12deab7 100644 (file)
@@ -1250,15 +1250,6 @@ on_javascript_prompt(Ewk_View_Smart_Data *smartData, const char *message, const
 }
 
 static void
-on_popup_menu_discarded(void *user_data, Evas_Object *obj, void *event_info)
-{
-    // The user clicked outside the menu to discard it.
-    info("Popup menu was discarded.");
-    Browser_Window *window = (Browser_Window *)user_data;
-    ewk_popup_menu_close(window->popup.ewk_menu);
-}
-
-static void
 on_popup_menu_item_clicked(void *user_data, Evas_Object *obj, void *event_info)
 {
     Browser_Window *window = (Browser_Window *)user_data;
@@ -1314,7 +1305,6 @@ on_popup_menu_show(Ewk_View_Smart_Data *smartData, Eina_Rectangle rect, Ewk_Text
 
     window->popup.elm_menu = elm_menu_add(window->elm_window);
     window->popup.ewk_menu = ewk_menu;
-    evas_object_smart_callback_add(window->popup.elm_menu, "clicked", on_popup_menu_discarded, window);
 
     popup_menu_populate(window->popup.elm_menu, ewk_menu, window);