⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 113147 in webkit


Ignore:
Timestamp:
Apr 4, 2012, 12:30:54 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

Fix build break when CONTEXT_MENUS is disabled.
https://bugs.webkit.org/show_bug.cgi?id=82342

Patch by Mariusz Grzegorczyk <mariusz.g@samsung.com> on 2012-04-04
Reviewed by Andreas Kling.

Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.

Source/WebCore:

  • 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:

Source/WebKit/gtk:

  • 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):

Location:
trunk/Source
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113143 r113147  
     12012-04-04  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
     2
     3        Fix build break when CONTEXT_MENUS is disabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=82342
     5
     6        Reviewed by Andreas Kling.
     7
     8        Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
     9
     10        * page/ContextMenuClient.h:
     11        * page/ContextMenuController.h:
     12        * page/Page.cpp:
     13        (WebCore::Page::PageClients::PageClients):
     14        * page/Page.h:
     15        (WebCore):
     16        (PageClients):
     17        * platform/ContextMenu.cpp:
     18        * platform/ContextMenu.h:
     19        * platform/ContextMenuItem.cpp:
     20        * platform/ContextMenuItem.h:
     21        * platform/efl/ContextMenuEfl.cpp:
     22        * platform/efl/ContextMenuItemEfl.cpp:
     23        * platform/gtk/ContextMenuGtk.cpp:
     24        * platform/gtk/ContextMenuItemGtk.cpp:
     25
    1262012-04-03  Adam Barth  <abarth@webkit.org>
    227
  • trunk/Source/WebCore/page/ContextMenuClient.h

    r108957 r113147  
    2626#ifndef ContextMenuClient_h
    2727#define ContextMenuClient_h
     28
     29#if ENABLE(CONTEXT_MENUS)
    2830
    2931#include "ContextMenu.h"
     
    6870}
    6971
     72#endif // ENABLE(CONTEXT_MENUS)
    7073#endif
  • trunk/Source/WebCore/page/ContextMenuController.h

    r110865 r113147  
    2626#ifndef ContextMenuController_h
    2727#define ContextMenuController_h
     28
     29#if ENABLE(CONTEXT_MENUS)
    2830
    2931#include "HitTestResult.h"
     
    99101}
    100102
     103#endif // ENABLE(CONTEXT_MENUS)
    101104#endif
  • trunk/Source/WebCore/page/Page.cpp

    r112720 r113147  
    11131113Page::PageClients::PageClients()
    11141114    : chromeClient(0)
     1115#if ENABLE(CONTEXT_MENUS)
    11151116    , contextMenuClient(0)
     1117#endif
    11161118    , editorClient(0)
    11171119    , dragClient(0)
  • trunk/Source/WebCore/page/Page.h

    r112720 r113147  
    5454    class Chrome;
    5555    class ChromeClient;
     56#if ENABLE(CONTEXT_MENUS)
    5657    class ContextMenuClient;
    5758    class ContextMenuController;
     59#endif
    5860    class Document;
    5961    class DragCaretController;
     
    103105
    104106            ChromeClient* chromeClient;
     107#if ENABLE(CONTEXT_MENUS)
    105108            ContextMenuClient* contextMenuClient;
     109#endif
    106110            EditorClient* editorClient;
    107111            DragClient* dragClient;
  • trunk/Source/WebCore/platform/ContextMenu.cpp

    r109544 r113147  
    2727#include "ContextMenu.h"
    2828
    29 #if USE(CROSS_PLATFORM_CONTEXT_MENUS)
     29#if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
    3030
    3131namespace WebCore {
     
    5959} // namespace WebCore
    6060
    61 #endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
     61#endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
  • trunk/Source/WebCore/platform/ContextMenu.h

    r107811 r113147  
    2626#ifndef ContextMenu_h
    2727#define ContextMenu_h
     28
     29#if ENABLE(CONTEXT_MENUS)
    2830
    2931#include <wtf/Noncopyable.h>
     
    119121}
    120122
     123#endif // ENABLE(CONTEXT_MENUS)
    121124#endif // ContextMenu_h
  • trunk/Source/WebCore/platform/ContextMenuItem.cpp

    r95901 r113147  
    2929#include "ContextMenu.h"
    3030
    31 #if USE(CROSS_PLATFORM_CONTEXT_MENUS)
     31#if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
    3232
    3333namespace WebCore {
     
    120120} // namespace WebCore
    121121
    122 #endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
     122#endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS)
  • trunk/Source/WebCore/platform/ContextMenuItem.h

    r110865 r113147  
    2727#ifndef ContextMenuItem_h
    2828#define ContextMenuItem_h
     29
     30#if ENABLE(CONTEXT_MENUS)
    2931
    3032#include "PlatformMenuDescription.h"
     
    304306}
    305307
     308#endif // ENABLE(CONTEXT_MENUS)
    306309#endif // ContextMenuItem_h
  • trunk/Source/WebCore/platform/efl/ContextMenuEfl.cpp

    r103702 r113147  
    2121
    2222#include "config.h"
     23
     24#if ENABLE(CONTEXT_MENUS)
     25
    2326#include "ContextMenu.h"
    2427
     
    102105
    103106}
     107#endif // ENABLE(CONTEXT_MENUS)
  • trunk/Source/WebCore/platform/efl/ContextMenuItemEfl.cpp

    r103702 r113147  
    2929
    3030#include "config.h"
     31
     32#if ENABLE(CONTEXT_MENUS)
     33
    3134#include "ContextMenuItem.h"
    3235
     
    130133#endif
    131134}
     135#endif // ENABLE(CONTEXT_MENUS)
  • trunk/Source/WebCore/platform/gtk/ContextMenuGtk.cpp

    r111354 r113147  
    1919
    2020#include "config.h"
     21
     22#if ENABLE(CONTEXT_MENUS)
     23
    2124#include "ContextMenu.h"
    2225
     
    114117
    115118}
     119
     120#endif // ENABLE(CONTEXT_MENUS)
  • trunk/Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp

    r111354 r113147  
    2020
    2121#include "config.h"
     22
     23#if ENABLE(CONTEXT_MENUS)
    2224
    2325#include "ContextMenuItem.h"
     
    272274
    273275}
     276
     277#endif // ENABLE(CONTEXT_MENUS)
  • trunk/Source/WebKit/gtk/ChangeLog

    r113001 r113147  
     12012-04-04  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
     2
     3        Fix build break when CONTEXT_MENUS is disabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=82342
     5
     6        Reviewed by Andreas Kling.
     7
     8        Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
     9
     10        * WebCoreSupport/ContextMenuClientGtk.cpp:
     11        * WebCoreSupport/ContextMenuClientGtk.h:
     12        * webkit/webkitglobals.cpp:
     13        (webkit_context_menu_item_get_action):
     14        * webkit/webkitwebview.cpp:
     15        (webkit_web_view_button_press_event):
     16        (webkit_web_view_class_init):
     17        (webkit_web_view_init):
     18
    1192012-04-03  Simon Pena  <spena@igalia.com>
    220
  • trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp

    r111847 r113147  
    1919
    2020#include "config.h"
     21
     22#if ENABLE(CONTEXT_MENUS)
     23
    2124#include "ContextMenuClientGtk.h"
    2225
     
    162165}
    163166
     167#endif // ENABLE(CONTEXT_MENUS)
     168
  • trunk/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h

    r65021 r113147  
    2626#ifndef ContextMenuClientGtk_h
    2727#define ContextMenuClientGtk_h
     28
     29#if ENABLE(CONTEXT_MENUS)
    2830
    2931#include "ContextMenuClient.h"
     
    6062}
    6163
     64#endif // ENABLE(CONTEXT_MENUS)
    6265#endif
  • trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp

    r112401 r113147  
    403403WebKitContextMenuAction webkit_context_menu_item_get_action(GtkMenuItem* item)
    404404{
     405#if ENABLE(CONTEXT_MENUS)
    405406    g_return_val_if_fail(GTK_IS_MENU_ITEM(item), WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
    406407
     
    486487        g_assert_not_reached();
    487488    }
     489#else
     490    return WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION;
     491#endif
    488492}
    489493
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r112720 r113147  
    276276static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*);
    277277
     278#if ENABLE(CONTEXT_MENUS)
    278279static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pushIn, gpointer userData)
    279280{
     
    299300    *pushIn = FALSE;
    300301}
     302#endif
    301303
    302304static Node* getFocusedNode(Frame* frame)
     
    307309}
    308310
     311#if ENABLE(CONTEXT_MENUS)
    309312static void contextMenuItemActivated(GtkMenuItem* item, ContextMenuController* controller)
    310313{
     
    463466    return webkit_web_view_forward_context_menu_event(WEBKIT_WEB_VIEW(widget), event, true);
    464467}
     468#endif // ENABLE(CONTEXT_MENUS)
    465469
    466470static void setHorizontalAdjustment(WebKitWebView* webView, GtkAdjustment* adjustment)
     
    761765    platformEvent.setClickCount(count);
    762766
     767#if ENABLE(CONTEXT_MENUS)
    763768    if (event->button == 3)
    764769        return webkit_web_view_forward_context_menu_event(webView, PlatformMouseEvent(event), false);
     770#endif
    765771
    766772    Frame* frame = core(webView)->mainFrame();
     
    29342940    widgetClass->get_preferred_height = webkit_web_view_get_preferred_height;
    29352941#endif
     2942#if ENABLE(CONTEXT_MENUS)
    29362943    widgetClass->popup_menu = webkit_web_view_popup_menu_handler;
     2944#else
     2945    widgetClass->popup_menu = NULL;
     2946#endif
    29372947    widgetClass->grab_focus = webkit_web_view_grab_focus;
    29382948    widgetClass->focus_in_event = webkit_web_view_focus_in_event;
     
    35653575    Page::PageClients pageClients;
    35663576    pageClients.chromeClient = new WebKit::ChromeClient(webView);
     3577#if ENABLE(CONTEXT_MENUS)
    35673578    pageClients.contextMenuClient = new WebKit::ContextMenuClient(webView);
     3579#endif
    35683580    pageClients.editorClient = new WebKit::EditorClient(webView);
    35693581    pageClients.dragClient = new WebKit::DragClient(webView);
Note: See TracChangeset for help on using the changeset viewer.