Diff
Modified: trunk/Source/WebCore/ChangeLog (113146 => 113147)
--- trunk/Source/WebCore/ChangeLog 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/ChangeLog 2012-04-04 07:30:54 UTC (rev 113147)
@@ -1,3 +1,28 @@
+2012-04-04 Mariusz Grzegorczyk <[email protected]>
+
+ Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=82342
+
+ Reviewed by Andreas Kling.
+
+ Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
+
+ * page/ContextMenuClient.h:
+ * page/ContextMenuController.h:
+ * page/Page.cpp:
+ (WebCore::Page::PageClients::PageClients):
+ * page/Page.h:
+ (WebCore):
+ (PageClients):
+ * platform/ContextMenu.cpp:
+ * platform/ContextMenu.h:
+ * platform/ContextMenuItem.cpp:
+ * platform/ContextMenuItem.h:
+ * platform/efl/ContextMenuEfl.cpp:
+ * platform/efl/ContextMenuItemEfl.cpp:
+ * platform/gtk/ContextMenuGtk.cpp:
+ * platform/gtk/ContextMenuItemGtk.cpp:
+
2012-04-03 Adam Barth <[email protected]>
Implement <iframe srcdoc>
Modified: trunk/Source/WebCore/page/ContextMenuClient.h (113146 => 113147)
--- trunk/Source/WebCore/page/ContextMenuClient.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/page/ContextMenuClient.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -26,6 +26,8 @@
#ifndef ContextMenuClient_h
#define ContextMenuClient_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenu.h"
#include "PlatformMenuDescription.h"
#include <wtf/Forward.h>
@@ -67,4 +69,5 @@
};
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif
Modified: trunk/Source/WebCore/page/ContextMenuController.h (113146 => 113147)
--- trunk/Source/WebCore/page/ContextMenuController.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/page/ContextMenuController.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -26,6 +26,8 @@
#ifndef ContextMenuController_h
#define ContextMenuController_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "HitTestResult.h"
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
@@ -98,4 +100,5 @@
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif
Modified: trunk/Source/WebCore/page/Page.cpp (113146 => 113147)
--- trunk/Source/WebCore/page/Page.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/page/Page.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -1112,7 +1112,9 @@
Page::PageClients::PageClients()
: chromeClient(0)
+#if ENABLE(CONTEXT_MENUS)
, contextMenuClient(0)
+#endif
, editorClient(0)
, dragClient(0)
, inspectorClient(0)
Modified: trunk/Source/WebCore/page/Page.h (113146 => 113147)
--- trunk/Source/WebCore/page/Page.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/page/Page.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -53,8 +53,10 @@
class BackForwardList;
class Chrome;
class ChromeClient;
+#if ENABLE(CONTEXT_MENUS)
class ContextMenuClient;
class ContextMenuController;
+#endif
class Document;
class DragCaretController;
class DragClient;
@@ -102,7 +104,9 @@
~PageClients();
ChromeClient* chromeClient;
+#if ENABLE(CONTEXT_MENUS)
ContextMenuClient* contextMenuClient;
+#endif
EditorClient* editorClient;
DragClient* dragClient;
InspectorClient* inspectorClient;
Modified: trunk/Source/WebCore/platform/ContextMenu.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/ContextMenu.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/ContextMenu.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -26,7 +26,7 @@
#include "config.h"
#include "ContextMenu.h"
-#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
namespace WebCore {
@@ -58,4 +58,4 @@
} // namespace WebCore
-#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
Modified: trunk/Source/WebCore/platform/ContextMenu.h (113146 => 113147)
--- trunk/Source/WebCore/platform/ContextMenu.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/ContextMenu.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -26,6 +26,8 @@
#ifndef ContextMenu_h
#define ContextMenu_h
+#if ENABLE(CONTEXT_MENUS)
+
#include <wtf/Noncopyable.h>
#include "ContextMenuItem.h"
@@ -118,4 +120,5 @@
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif // ContextMenu_h
Modified: trunk/Source/WebCore/platform/ContextMenuItem.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/ContextMenuItem.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/ContextMenuItem.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -28,7 +28,7 @@
#include "ContextMenu.h"
-#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
namespace WebCore {
@@ -119,4 +119,4 @@
} // namespace WebCore
-#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
+#endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
Modified: trunk/Source/WebCore/platform/ContextMenuItem.h (113146 => 113147)
--- trunk/Source/WebCore/platform/ContextMenuItem.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/ContextMenuItem.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -27,6 +27,8 @@
#ifndef ContextMenuItem_h
#define ContextMenuItem_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "PlatformMenuDescription.h"
#include "PlatformString.h"
#include <wtf/OwnPtr.h>
@@ -303,4 +305,5 @@
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif // ContextMenuItem_h
Modified: trunk/Source/WebCore/platform/efl/ContextMenuEfl.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/efl/ContextMenuEfl.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/efl/ContextMenuEfl.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -20,6 +20,9 @@
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenu.h"
#include "NotImplemented.h"
@@ -101,3 +104,4 @@
#endif
}
+#endif // ENABLE(CONTEXT_MENUS)
Modified: trunk/Source/WebCore/platform/efl/ContextMenuItemEfl.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/efl/ContextMenuItemEfl.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/efl/ContextMenuItemEfl.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -28,6 +28,9 @@
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuItem.h"
#include "NotImplemented.h"
@@ -129,3 +132,4 @@
}
#endif
}
+#endif // ENABLE(CONTEXT_MENUS)
Modified: trunk/Source/WebCore/platform/gtk/ContextMenuGtk.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/gtk/ContextMenuGtk.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/gtk/ContextMenuGtk.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -18,6 +18,9 @@
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenu.h"
#include <wtf/gobject/GOwnPtr.h>
@@ -113,3 +116,5 @@
}
}
+
+#endif // ENABLE(CONTEXT_MENUS)
Modified: trunk/Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp (113146 => 113147)
--- trunk/Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -20,6 +20,8 @@
#include "config.h"
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuItem.h"
#include "ContextMenu.h"
@@ -271,3 +273,5 @@
}
}
+
+#endif // ENABLE(CONTEXT_MENUS)
Modified: trunk/Source/WebKit/gtk/ChangeLog (113146 => 113147)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-04-04 07:30:54 UTC (rev 113147)
@@ -1,3 +1,21 @@
+2012-04-04 Mariusz Grzegorczyk <[email protected]>
+
+ Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=82342
+
+ Reviewed by Andreas Kling.
+
+ Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
+
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ * WebCoreSupport/ContextMenuClientGtk.h:
+ * webkit/webkitglobals.cpp:
+ (webkit_context_menu_item_get_action):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+ (webkit_web_view_class_init):
+ (webkit_web_view_init):
+
2012-04-03 Simon Pena <[email protected]>
[GTK] DRT missing didRunInsecureContent notification
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp (113146 => 113147)
--- trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -18,6 +18,9 @@
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuClientGtk.h"
#include "ContextMenu.h"
@@ -161,3 +164,5 @@
}
+#endif // ENABLE(CONTEXT_MENUS)
+
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h (113146 => 113147)
--- trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h 2012-04-04 07:30:54 UTC (rev 113147)
@@ -26,6 +26,8 @@
#ifndef ContextMenuClientGtk_h
#define ContextMenuClientGtk_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuClient.h"
typedef struct _WebKitWebView WebKitWebView;
@@ -59,4 +61,5 @@
};
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif
Modified: trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp (113146 => 113147)
--- trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -402,6 +402,7 @@
*/
WebKitContextMenuAction webkit_context_menu_item_get_action(GtkMenuItem* item)
{
+#if ENABLE(CONTEXT_MENUS)
g_return_val_if_fail(GTK_IS_MENU_ITEM(item), WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
ContextMenuItem menuItem(item);
@@ -485,6 +486,9 @@
default:
g_assert_not_reached();
}
+#else
+ return WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION;
+#endif
}
void webkitInit()
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (113146 => 113147)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-04-04 07:17:47 UTC (rev 113146)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-04-04 07:30:54 UTC (rev 113147)
@@ -275,6 +275,7 @@
static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*);
+#if ENABLE(CONTEXT_MENUS)
static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pushIn, gpointer userData)
{
WebKitWebView* view = WEBKIT_WEB_VIEW(userData);
@@ -298,6 +299,7 @@
*pushIn = FALSE;
}
+#endif
static Node* getFocusedNode(Frame* frame)
{
@@ -306,6 +308,7 @@
return 0;
}
+#if ENABLE(CONTEXT_MENUS)
static void contextMenuItemActivated(GtkMenuItem* item, ContextMenuController* controller)
{
ContextMenuItem contextItem(item);
@@ -462,6 +465,7 @@
PlatformMouseEvent event(location, globalPoint, RightButton, PlatformEvent::MousePressed, 0, false, false, false, false, gtk_get_current_event_time());
return webkit_web_view_forward_context_menu_event(WEBKIT_WEB_VIEW(widget), event, true);
}
+#endif // ENABLE(CONTEXT_MENUS)
static void setHorizontalAdjustment(WebKitWebView* webView, GtkAdjustment* adjustment)
{
@@ -760,8 +764,10 @@
int count = priv->clickCounter.clickCountForGdkButtonEvent(widget, event);
platformEvent.setClickCount(count);
+#if ENABLE(CONTEXT_MENUS)
if (event->button == 3)
return webkit_web_view_forward_context_menu_event(webView, PlatformMouseEvent(event), false);
+#endif
Frame* frame = core(webView)->mainFrame();
if (!frame->view())
@@ -2933,7 +2939,11 @@
widgetClass->get_preferred_width = webkit_web_view_get_preferred_width;
widgetClass->get_preferred_height = webkit_web_view_get_preferred_height;
#endif
+#if ENABLE(CONTEXT_MENUS)
widgetClass->popup_menu = webkit_web_view_popup_menu_handler;
+#else
+ widgetClass->popup_menu = NULL;
+#endif
widgetClass->grab_focus = webkit_web_view_grab_focus;
widgetClass->focus_in_event = webkit_web_view_focus_in_event;
widgetClass->focus_out_event = webkit_web_view_focus_out_event;
@@ -3564,7 +3574,9 @@
Page::PageClients pageClients;
pageClients.chromeClient = new WebKit::ChromeClient(webView);
+#if ENABLE(CONTEXT_MENUS)
pageClients.contextMenuClient = new WebKit::ContextMenuClient(webView);
+#endif
pageClients.editorClient = new WebKit::EditorClient(webView);
pageClients.dragClient = new WebKit::DragClient(webView);
pageClients.inspectorClient = new WebKit::InspectorClient(webView);