Title: [127462] trunk
Revision
127462
Author
[email protected]
Date
2012-09-04 06:13:08 -0700 (Tue, 04 Sep 2012)

Log Message

.: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <[email protected]> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* Source/cmake/OptionsEfl.cmake: Turn on CONTEXT_MENUS flag for EFL port

Source/WebCore: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <[email protected]> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* PlatformEfl.cmake: Removed -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1

Source/WebKit: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <[email protected]> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* PlatformEfl.cmake: Added ContextMenuClientEfl.cpp file to sources list.

Source/WebKit/efl: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <[email protected]> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* WebCoreSupport/ContextMenuClientEfl.cpp: Added.
(WebCore):
(WebCore::ContextMenuClientEfl::contextMenuDestroyed):
(WebCore::ContextMenuClientEfl::getCustomMenuFromDefaultItems):
(WebCore::ContextMenuClientEfl::contextMenuItemSelected):
(WebCore::ContextMenuClientEfl::downloadURL):
(WebCore::ContextMenuClientEfl::lookUpInDictionary):
(WebCore::ContextMenuClientEfl::speak):
(WebCore::ContextMenuClientEfl::isSpeaking):
(WebCore::ContextMenuClientEfl::stopSpeaking):
(WebCore::ContextMenuClientEfl::searchWithGoogle):
* WebCoreSupport/ContextMenuClientEfl.h: Added.
(WebCore):
(ContextMenuClientEfl):
* ewk/ewk_contextmenu.cpp: Removed ewk_context_menu_customize implementation.
(ewk_context_menu_destroy): Added freeing context menu.
(ewk_context_menu_new): Added filling ewk_contextmenu list.
(ewk_context_menu_item_append):
* ewk/ewk_contextmenu_private.h: Removed ewk_context_menu_customize and changed ewk_context_menu_new definition.
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(_ewk_view_priv_del):
(ewk_view_context_menu_forward_event):

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (127461 => 127462)


--- trunk/ChangeLog	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/ChangeLog	2012-09-04 13:13:08 UTC (rev 127462)
@@ -1,3 +1,15 @@
+2012-09-04  Michał Pakuła vel Rutka  <[email protected]>
+
+        [EFL] Context menu restore.
+        https://bugs.webkit.org/show_bug.cgi?id=74179
+
+        Reviewed by Gyuyoung Kim.
+
+        Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
+        approach, the same as used in WebKit2.
+
+        * Source/cmake/OptionsEfl.cmake: Turn on CONTEXT_MENUS flag for EFL port
+
 2012-09-04  Allan Sandfeld Jensen  <[email protected]>
 
         Allow child-frame content in hit-tests.

Modified: trunk/Source/WebCore/ChangeLog (127461 => 127462)


--- trunk/Source/WebCore/ChangeLog	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebCore/ChangeLog	2012-09-04 13:13:08 UTC (rev 127462)
@@ -1,3 +1,15 @@
+2012-09-04  Michał Pakuła vel Rutka  <[email protected]>
+
+        [EFL] Context menu restore.
+        https://bugs.webkit.org/show_bug.cgi?id=74179
+
+        Reviewed by Gyuyoung Kim.
+
+        Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
+        approach, the same as used in WebKit2.
+
+        * PlatformEfl.cmake: Removed -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
+
 2012-09-04  Andrey Adaikin  <[email protected]>
 
         Web Inspector: [WebGL] Bugfix: wrong texture binding target in replay for 3D textures

Modified: trunk/Source/WebCore/PlatformEfl.cmake (127461 => 127462)


--- trunk/Source/WebCore/PlatformEfl.cmake	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebCore/PlatformEfl.cmake	2012-09-04 13:13:08 UTC (rev 127462)
@@ -297,8 +297,7 @@
   )
 ENDIF ()
 
-ADD_DEFINITIONS(-DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
-                -DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
+ADD_DEFINITIONS(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
 
 IF (ENABLE_WEB_AUDIO)
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES

Modified: trunk/Source/WebKit/ChangeLog (127461 => 127462)


--- trunk/Source/WebKit/ChangeLog	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/ChangeLog	2012-09-04 13:13:08 UTC (rev 127462)
@@ -1,3 +1,15 @@
+2012-09-04  Michał Pakuła vel Rutka  <[email protected]>
+
+        [EFL] Context menu restore.
+        https://bugs.webkit.org/show_bug.cgi?id=74179
+
+        Reviewed by Gyuyoung Kim.
+
+        Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
+        approach, the same as used in WebKit2.
+
+        * PlatformEfl.cmake: Added ContextMenuClientEfl.cpp file to sources list.
+
 2012-08-29  Ryuan Choi  <[email protected]>
 
         [EFL] Move several files to remove webkit1 dependency from WebCore.

Modified: trunk/Source/WebKit/PlatformEfl.cmake (127461 => 127462)


--- trunk/Source/WebKit/PlatformEfl.cmake	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/PlatformEfl.cmake	2012-09-04 13:13:08 UTC (rev 127462)
@@ -89,6 +89,7 @@
     efl/WebCoreSupport/BatteryClientEfl.cpp
     efl/WebCoreSupport/ChromeClientEfl.cpp
     efl/WebCoreSupport/ColorChooserEfl.cpp
+    efl/WebCoreSupport/ContextMenuClientEfl.cpp
     efl/WebCoreSupport/DeviceOrientationClientEfl.cpp
     efl/WebCoreSupport/DeviceMotionClientEfl.cpp
     efl/WebCoreSupport/DragClientEfl.cpp

Modified: trunk/Source/WebKit/efl/ChangeLog (127461 => 127462)


--- trunk/Source/WebKit/efl/ChangeLog	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-09-04 13:13:08 UTC (rev 127462)
@@ -1,3 +1,38 @@
+2012-09-04  Michał Pakuła vel Rutka  <[email protected]>
+
+        [EFL] Context menu restore. 
+        https://bugs.webkit.org/show_bug.cgi?id=74179
+
+        Reviewed by Gyuyoung Kim.
+
+        Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
+        approach, the same as used in WebKit2.
+
+        * WebCoreSupport/ContextMenuClientEfl.cpp: Added.
+        (WebCore):
+        (WebCore::ContextMenuClientEfl::contextMenuDestroyed):
+        (WebCore::ContextMenuClientEfl::getCustomMenuFromDefaultItems):
+        (WebCore::ContextMenuClientEfl::contextMenuItemSelected):
+        (WebCore::ContextMenuClientEfl::downloadURL):
+        (WebCore::ContextMenuClientEfl::lookUpInDictionary):
+        (WebCore::ContextMenuClientEfl::speak):
+        (WebCore::ContextMenuClientEfl::isSpeaking):
+        (WebCore::ContextMenuClientEfl::stopSpeaking):
+        (WebCore::ContextMenuClientEfl::searchWithGoogle):
+        * WebCoreSupport/ContextMenuClientEfl.h: Added.
+        (WebCore):
+        (ContextMenuClientEfl):
+        * ewk/ewk_contextmenu.cpp: Removed ewk_context_menu_customize implementation.
+        (ewk_context_menu_destroy): Added freeing context menu. 
+        (ewk_context_menu_new): Added filling ewk_contextmenu list.
+        (ewk_context_menu_item_append):
+        * ewk/ewk_contextmenu_private.h: Removed ewk_context_menu_customize and changed ewk_context_menu_new definition.
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (_ewk_view_priv_new):
+        (_ewk_view_priv_del):
+        (ewk_view_context_menu_forward_event):
+
 2012-09-04  Ryuan Choi  <[email protected]>
 
         [EFL] Drop default theme concept

Added: trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp (0 => 127462)


--- trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp	                        (rev 0)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp	2012-09-04 13:13:08 UTC (rev 127462)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2008 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2009 Igalia S.L.
+ * Copyright (C) 2010 ProFUSION embedded systems
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ContextMenuClientEfl.h"
+
+#include "ContextMenu.h"
+#include "HitTestResult.h"
+#include "KURL.h"
+#include "NotImplemented.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+void ContextMenuClientEfl::contextMenuDestroyed()
+{
+    delete this;
+}
+
+PlatformMenuDescription ContextMenuClientEfl::getCustomMenuFromDefaultItems(ContextMenu* menu)
+{
+    // warning: this transfers the ownership to the caller
+    return menu->releasePlatformDescription();
+}
+
+void ContextMenuClientEfl::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
+{
+    notImplemented();
+}
+
+void ContextMenuClientEfl::downloadURL(const KURL&)
+{
+    notImplemented();
+}
+
+void ContextMenuClientEfl::lookUpInDictionary(Frame*)
+{
+    notImplemented();
+}
+
+void ContextMenuClientEfl::speak(const String&)
+{
+    notImplemented();
+}
+
+bool ContextMenuClientEfl::isSpeaking()
+{
+    notImplemented();
+    return false;
+}
+
+void ContextMenuClientEfl::stopSpeaking()
+{
+    notImplemented();
+}
+
+void ContextMenuClientEfl::searchWithGoogle(const Frame*)
+{
+    notImplemented();
+}
+
+}

Added: trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h (0 => 127462)


--- trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h	                        (rev 0)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h	2012-09-04 13:13:08 UTC (rev 127462)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2009 Igalia S.L.
+ * Copyright (C) 2010 ProFUSION embedded systems
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ContextMenuClientEfl_h
+#define ContextMenuClientEfl_h
+
+#include "ContextMenuClient.h"
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+class ContextMenu;
+
+class ContextMenuClientEfl : public ContextMenuClient {
+public:
+    virtual void contextMenuDestroyed();
+
+    virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*);
+    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
+
+    virtual void downloadURL(const KURL&);
+    virtual void lookUpInDictionary(Frame*);
+    virtual void speak(const String&);
+    virtual bool isSpeaking();
+    virtual void stopSpeaking();
+    virtual void searchWithGoogle(const Frame*);
+};
+}
+
+#endif

Modified: trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp (127461 => 127462)


--- trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp	2012-09-04 13:13:08 UTC (rev 127462)
@@ -24,7 +24,7 @@
 #include "ContextMenu.h"
 #include "ContextMenuController.h"
 #include "ContextMenuItem.h"
-#include "ewk_private.h"
+#include "ewk_contextmenu_private.h"
 #include <Eina.h>
 #include <eina_safety_checks.h>
 #include <wtf/text/CString.h>
@@ -84,6 +84,7 @@
     EINA_SAFETY_ON_NULL_RETURN_VAL(menu, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(menu->controller, false);
     menu->controller->clearContextMenu();
+    ewk_context_menu_free(menu);
     return true;
 #else
     return false;
@@ -217,7 +218,7 @@
  *
  * @note emits a signal "contextmenu,new"
  */
-Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller)
+Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller, WebCore::ContextMenu* coreMenu)
 {
     Ewk_Context_Menu* menu;
     EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0);
@@ -231,6 +232,10 @@
     menu->items = 0;
     evas_object_smart_callback_call(menu->view, "contextmenu,new", menu);
 
+    const Vector<WebCore::ContextMenuItem>* itemsList = coreMenu->platformDescription();
+    for (Vector<WebCore::ContextMenuItem>::const_iterator iter = itemsList->begin(); iter != itemsList->end(); ++iter)
+        ewk_context_menu_item_append(menu, *iter);
+
     return menu;
 }
 
@@ -266,7 +271,7 @@
  *
  * @see ewk_context_menu_item_new
  */
-void ewk_context_menu_item_append(Ewk_Context_Menu* menu, WebCore::ContextMenuItem& core)
+void ewk_context_menu_item_append(Ewk_Context_Menu* menu, const WebCore::ContextMenuItem& core)
 {
     Ewk_Context_Menu_Item_Type type = static_cast<Ewk_Context_Menu_Item_Type>(core.type());
     Ewk_Context_Menu_Action action = ""
@@ -283,26 +288,6 @@
 /**
  * @internal
  *
- * Emits a signal with the items of the context menu.
- *
- * @param menu the context menu object
- * @return the same context menu object that was given through parameter
- *
- * @note emits a signal "contextmenu,customize"
- *
- * @see ewk_context_menu_item_list_get
- */
-Ewk_Context_Menu* ewk_context_menu_customize(Ewk_Context_Menu* menu)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0);
-
-    evas_object_smart_callback_call(menu->view, "contextmenu,customize", menu->items);
-    return menu;
-}
-
-/**
- * @internal
- *
  * Emits a signal "contextmenu,show"
  *
  * @param menu the context menu object

Modified: trunk/Source/WebKit/efl/ewk/ewk_contextmenu_private.h (127461 => 127462)


--- trunk/Source/WebKit/efl/ewk/ewk_contextmenu_private.h	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/efl/ewk/ewk_contextmenu_private.h	2012-09-04 13:13:08 UTC (rev 127462)
@@ -21,6 +21,8 @@
 #ifndef ewk_contextmenu_private_h
 #define ewk_contextmenu_private_h
 
+#include "ewk_contextmenu.h"
+
 // forward declarations
 namespace WebCore {
 struct ContextMenu;
@@ -28,11 +30,10 @@
 }
 
 #if ENABLE(CONTEXT_MENUS)
-Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller);
+Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller, WebCore::ContextMenu* coreMenu);
 bool ewk_context_menu_free(Ewk_Context_Menu* menu);
-void ewk_context_menu_item_append(Ewk_Context_Menu* menu, WebCore::ContextMenuItem& core);
-Ewk_Context_Menu* ewk_context_menu_customize(Ewk_Context_Menu* menu);
+void ewk_context_menu_item_append(Ewk_Context_Menu* menu, const WebCore::ContextMenuItem& core);
 void ewk_context_menu_show(Ewk_Context_Menu* menu);
 #endif
 
-#endif // ewk_context_manu_private_h
+#endif // ewk_context_menu_private_h

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (127461 => 127462)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-09-04 13:13:08 UTC (rev 127462)
@@ -27,6 +27,7 @@
 #include "Bridge.h"
 #include "Chrome.h"
 #include "ChromeClientEfl.h"
+#include "ContextMenuClientEfl.h"
 #include "ContextMenuController.h"
 #include "DocumentLoader.h"
 #include "DragClientEfl.h"
@@ -57,6 +58,7 @@
 #include "ResourceHandle.h"
 #include "Settings.h"
 #include "c_instance.h"
+#include "ewk_contextmenu_private.h"
 #include "ewk_frame.h"
 #include "ewk_frame_private.h"
 #include "ewk_history_private.h"
@@ -360,6 +362,7 @@
 #ifdef HAVE_ECORE_X
     bool isUsingEcoreX;
 #endif
+    Ewk_Context_Menu* contextMenu;
 };
 
 #ifndef EWK_TYPE_CHECK
@@ -741,6 +744,7 @@
 
     WebCore::Page::PageClients pageClients;
     pageClients.chromeClient = new WebCore::ChromeClientEfl(smartData->self);
+    pageClients.contextMenuClient = new WebCore::ContextMenuClientEfl;
     pageClients.editorClient = new WebCore::EditorClientEfl(smartData->self);
     pageClients.dragClient = new WebCore::DragClientEfl;
 #if ENABLE(INSPECTOR)
@@ -891,6 +895,8 @@
     priv->isUsingEcoreX = WebCore::isUsingEcoreX(smartData->base.evas);
 #endif
 
+    priv->contextMenu = 0;
+
     return priv;
 }
 
@@ -924,6 +930,9 @@
     if (priv->cursorObject)
         evas_object_del(priv->cursorObject);
 
+    if (priv->contextMenu)
+        ewk_context_menu_free(priv->contextMenu);
+
     delete priv;
 }
 
@@ -1624,6 +1633,9 @@
     Eina_Bool mouse_press_handled = false;
 
     priv->page->contextMenuController()->clearContextMenu();
+    if (priv->contextMenu)
+        ewk_context_menu_free(priv->contextMenu);
+
     WebCore::Frame* mainFrame = priv->page->mainFrame();
     Evas_Coord x, y;
     evas_object_geometry_get(smartData->self, &x, &y, 0, 0);
@@ -1635,7 +1647,7 @@
             mainFrame->eventHandler()->handleMousePressEvent(event);
     }
 
-    if (mainFrame->eventHandler()->sendContextMenuEvent(event))
+    if (!mainFrame->eventHandler()->sendContextMenuEvent(event))
         return false;
 
     WebCore::ContextMenu* coreMenu =
@@ -1646,6 +1658,12 @@
         return mouse_press_handled;
     }
 
+    priv->contextMenu = ewk_context_menu_new(ewkView, priv->page->contextMenuController(), coreMenu);
+    if (!priv->contextMenu)
+        return false;
+
+    ewk_context_menu_show(priv->contextMenu);
+
     return true;
 #else
     return false;

Modified: trunk/Source/cmake/OptionsEfl.cmake (127461 => 127462)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-09-04 12:51:20 UTC (rev 127461)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-09-04 13:13:08 UTC (rev 127462)
@@ -26,7 +26,7 @@
 SET(WTF_USE_SOUP 1)
 ADD_DEFINITIONS(-DWTF_USE_SOUP=1)
 
-ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=0)
+ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=1)
 
 SET(WTF_USE_PTHREADS 1)
 ADD_DEFINITIONS(-DWTF_USE_PTHREADS=1)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to