[EFL] Fix build when CONTEXT_MENUS flag is turned off
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2013 13:20:38 +0000 (13:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2013 13:20:38 +0000 (13:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109924

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2013-02-18
Reviewed by Gyuyoung Kim.

* WebCoreSupport/ContextMenuClientEfl.cpp:
* WebCoreSupport/ContextMenuClientEfl.h:
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(_ewk_view_priv_del):
(ewk_view_context_menu_get):

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

Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h
Source/WebKit/efl/ewk/ewk_view.cpp

index 611f56a9f05cb3d817d0d174174fe64524b46ffb..e55eb8df54d4f0b35ed85c8d7bf378ae3dd312cd 100644 (file)
@@ -1,3 +1,18 @@
+2013-02-18  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
+
+        [EFL] Fix build when CONTEXT_MENUS flag is turned off
+        https://bugs.webkit.org/show_bug.cgi?id=109924
+
+        Reviewed by Gyuyoung Kim.
+
+        * WebCoreSupport/ContextMenuClientEfl.cpp:
+        * WebCoreSupport/ContextMenuClientEfl.h:
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (_ewk_view_priv_new):
+        (_ewk_view_priv_del):
+        (ewk_view_context_menu_get):
+
 2013-02-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
 
         [WK2][EFL] Unified text checker implementation
index 5f56e318afa6621f6c02654009959c9276b80841..978bd2115eeab8d9dad09295c1ad9ca87e5c926b 100644 (file)
@@ -29,6 +29,8 @@
 #include "config.h"
 #include "ContextMenuClientEfl.h"
 
+#if ENABLE(CONTEXT_MENUS)
+
 #include "ContextMenu.h"
 #include "HitTestResult.h"
 #include "KURL.h"
@@ -85,3 +87,5 @@ void ContextMenuClientEfl::searchWithGoogle(const Frame*)
 }
 
 }
+
+#endif // ENABLE(CONTEXT_MENUS)
index 39a881d608a767cd12bd98baa21c3e203c5aaf71..c1371e495a41cae70ebf956ec862dc50c1147a0f 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef ContextMenuClientEfl_h
 #define ContextMenuClientEfl_h
 
+#if ENABLE(CONTEXT_MENUS)
+
 #include "ContextMenuClient.h"
 
 #include <wtf/RefCounted.h>
@@ -52,4 +54,5 @@ public:
 };
 }
 
+#endif // ENABLE(CONTEXT_MENUS)
 #endif
index 556be579aec6a882155f3ae58625c0059b4cb978..5b6ca7518083e761a0168708bc5d3dbc96a40dc7 100644 (file)
@@ -379,7 +379,9 @@ struct _Ewk_View_Private_Data {
 #ifdef HAVE_ECORE_X
     bool isUsingEcoreX;
 #endif
+#if ENABLE(CONTEXT_MENUS)
     Ewk_Context_Menu* contextMenu;
+#endif
 };
 
 #ifndef EWK_TYPE_CHECK
@@ -761,7 +763,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
 
     WebCore::Page::PageClients pageClients;
     pageClients.chromeClient = new WebCore::ChromeClientEfl(smartData->self);
+#if ENABLE(CONTEXT_MENUS)
     pageClients.contextMenuClient = new WebCore::ContextMenuClientEfl;
+#endif
     pageClients.editorClient = new WebCore::EditorClientEfl(smartData->self);
     pageClients.dragClient = new WebCore::DragClientEfl;
 #if ENABLE(INSPECTOR)
@@ -935,7 +939,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
     priv->isUsingEcoreX = WebCore::isUsingEcoreX(smartData->base.evas);
 #endif
 
+#if ENABLE(CONTEXT_MENUS)
     priv->contextMenu = 0;
+#endif
 
 #if USE(ACCELERATED_COMPOSITING)
     priv->isCompositingActive = false;
@@ -974,8 +980,10 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv)
     if (priv->cursorObject)
         evas_object_del(priv->cursorObject);
 
+#if ENABLE(CONTEXT_MENUS)
     if (priv->contextMenu)
         ewk_context_menu_free(priv->contextMenu);
+#endif
 
 #if USE(ACCELERATED_COMPOSITING)
     priv->acceleratedCompositingContext = nullptr;
@@ -4781,10 +4789,15 @@ void ewk_view_fullscreen_exit(const Evas_Object* ewkView)
 
 Ewk_Context_Menu* ewk_view_context_menu_get(const Evas_Object* ewkView)
 {
+#if ENABLE(CONTEXT_MENUS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
     return priv->contextMenu;
+#else
+    UNUSED_PARAM(ewkView);
+    return 0;
+#endif
 }
 
 Eina_Bool ewk_view_setting_tiled_backing_store_enabled_set(Evas_Object* ewkView, Eina_Bool enable)