https://bugs.webkit.org/show_bug.cgi?id=83285
Patch by Mariusz Grzegorczyk <mariusz.g@samsung.com> on 2012-04-17
Reviewed by Ryosuke Niwa.
Source/WebCore:
* platform/ContextMenuItem.h: Remove macro around enums - needed by InjectedBundle.
(WebCore):
* platform/Widget.h: Remove namespace WebCore for PlatformPageClient typedef.
Source/WebKit/efl:
Remove WebCore namespace from PageClientEfl.
* WebCoreSupport/PageClientEfl.cpp:
(WebCore):
* WebCoreSupport/PageClientEfl.h:
* ewk/ewk_private.h:
(EWKPrivate):
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(EWKPrivate::corePageClient):
Source/WebKit2:
Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro.
Add dummy functions for public API implementation related to context menu.
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuItemGetTypeID):
(WKContextMenuItemCreateAsAction):
(WKContextMenuItemCreateAsCheckableAction):
(WKContextMenuItemCreateAsSubmenu):
(WKContextMenuItemSeparatorItem):
(WKContextMenuItemGetTag):
(WKContextMenuItemGetType):
(WKContextMenuItemCopyTitle):
(WKContextMenuItemGetEnabled):
(WKContextMenuItemGetChecked):
(WKContextMenuCopySubmenuItems):
(WKContextMenuItemGetUserData):
(WKContextMenuItemSetUserData):
* Shared/WebContextMenuItem.cpp:
* Shared/WebContextMenuItem.h:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebContextMenuItemData.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebPageContextMenuClient.cpp:
* UIProcess/WebPageContextMenuClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit):
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114367
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com>
+
+ [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=83285
+
+ Reviewed by Ryosuke Niwa.
+
+ * platform/ContextMenuItem.h: Remove macro around enums - needed by InjectedBundle.
+ (WebCore):
+ * platform/Widget.h: Remove namespace WebCore for PlatformPageClient typedef.
+
2012-04-17 Kent Tamura <tkent@chromium.org>
Introduce an internal feature for a fixed placeholder
#elif PLATFORM(WX)
class wxMenuItem;
#endif
+#endif // ENABLE(CONTEXT_MENUS)
namespace WebCore {
SubmenuType
};
+#if ENABLE(CONTEXT_MENUS)
#if PLATFORM(MAC)
typedef NSMenuItem* PlatformMenuItemDescription;
#elif PLATFORM(QT)
#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
};
+#endif // ENABLE(CONTEXT_MENUS)
}
-#endif // ENABLE(CONTEXT_MENUS)
#endif // ContextMenuItem_h
#include "PageClientBlackBerry.h"
typedef PageClientBlackBerry* PlatformPageClient;
#elif PLATFORM(EFL)
-namespace WebCore {
class PageClientEfl;
typedef PageClientEfl* PlatformPageClient;
-}
#else
typedef PlatformWidget PlatformPageClient;
#endif
+2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com>
+
+ [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=83285
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove WebCore namespace from PageClientEfl.
+
+ * WebCoreSupport/PageClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/PageClientEfl.h:
+ * ewk/ewk_private.h:
+ (EWKPrivate):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (EWKPrivate::corePageClient):
+
2012-04-13 Thiago Marcos P. Santos <thiago.santos@intel.com>
[EFL] Add API for color chooser
#include "ewk_private.h"
namespace WebCore {
+class IntRect;
+}
PageClientEfl::PageClientEfl(Evas_Object* view)
: m_view(view)
return ewk_view_accelerated_compositing_context_get(m_view);
}
#endif
-
-}
typedef struct _Evas_Object Evas_Object;
namespace WebCore {
-
class GraphicsContext3D;
+} // namespace WebCore
class PageClientEfl {
public:
Evas_Object* m_view;
};
-} // namespace WebCore
-
#endif // PageClientEfl_h
WebCore::Frame *coreFrame(const Evas_Object *ewkFrame);
WebCore::Page *corePage(const Evas_Object *ewkView);
WebCore::HistoryItem *coreHistoryItem(const Ewk_History_Item *ewkHistoryItem);
-WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView);
+PlatformPageClient corePageClient(Evas_Object* ewkView);
Evas_Object* kitFrame(const WebCore::Frame* coreFrame);
WebCore::Frame* mainFrame;
WebCore::ViewportArguments viewportArguments;
Ewk_History* history;
- OwnPtr<WebCore::PageClientEfl> pageClient;
+ OwnPtr<PageClientEfl> pageClient;
#if ENABLE(INPUT_TYPE_COLOR)
WebCore::ColorChooserClient* colorChooserClient;
#endif
priv->soupSession = WebCore::ResourceHandle::defaultSession();
- priv->pageClient = adoptPtr(new WebCore::PageClientEfl(smartData->self));
+ priv->pageClient = adoptPtr(new PageClientEfl(smartData->self));
return priv;
}
return priv->page.get();
}
-WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView)
+PlatformPageClient corePageClient(Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com>
+
+ [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=83285
+
+ Reviewed by Ryosuke Niwa.
+
+ Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro.
+ Add dummy functions for public API implementation related to context menu.
+
+ * Shared/API/c/WKContextMenuItem.cpp:
+ (WKContextMenuItemGetTypeID):
+ (WKContextMenuItemCreateAsAction):
+ (WKContextMenuItemCreateAsCheckableAction):
+ (WKContextMenuItemCreateAsSubmenu):
+ (WKContextMenuItemSeparatorItem):
+ (WKContextMenuItemGetTag):
+ (WKContextMenuItemGetType):
+ (WKContextMenuItemCopyTitle):
+ (WKContextMenuItemGetEnabled):
+ (WKContextMenuItemGetChecked):
+ (WKContextMenuCopySubmenuItems):
+ (WKContextMenuItemGetUserData):
+ (WKContextMenuItemSetUserData):
+ * Shared/WebContextMenuItem.cpp:
+ * Shared/WebContextMenuItem.h:
+ * Shared/WebContextMenuItemData.cpp:
+ * Shared/WebContextMenuItemData.h:
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageContextMenuClient):
+ * UIProcess/WebPageContextMenuClient.cpp:
+ * UIProcess/WebPageContextMenuClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit):
+ * UIProcess/WebPageProxy.h:
+ (WebPageProxy):
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageSetContextMenuClient):
+ * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
+ * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
+ * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
+ * WebProcess/WebCoreSupport/WebContextMenuClient.h:
+ * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
+ * WebProcess/WebPage/WebContextMenu.cpp:
+ * WebProcess/WebPage/WebContextMenu.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit):
+ (WebKit::handleMouseEvent):
+ (WebKit::WebPage::mouseEvent):
+ * WebProcess/WebPage/WebPage.h:
+ (WebPage):
+ * WebProcess/WebPage/WebPage.messages.in:
+
2012-04-16 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Add missing files to build webkit2/Efl.
WKTypeID WKContextMenuItemGetTypeID()
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::APIType);
+#else
+ return toAPI(APIObject::TypeNull);
+#endif
}
WKContextMenuItemRef WKContextMenuItemCreateAsAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::create(WebContextMenuItemData(ActionType, toImpl(tag), toImpl(title)->string(), enabled, false)).leakRef());
+#else
+ return 0;
+#endif
}
WKContextMenuItemRef WKContextMenuItemCreateAsCheckableAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled, bool checked)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::create(WebContextMenuItemData(CheckableActionType, toImpl(tag), toImpl(title)->string(), enabled, checked)).leakRef());
+#else
+ return 0;
+#endif
}
WKContextMenuItemRef WKContextMenuItemCreateAsSubmenu(WKStringRef title, bool enabled, WKArrayRef submenuItems)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::create(toImpl(title)->string(), enabled, toImpl(submenuItems)).leakRef());
+#else
+ return 0;
+#endif
}
WKContextMenuItemRef WKContextMenuItemSeparatorItem()
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::separatorItem());
+#else
+ return 0;
+#endif
}
WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(toImpl(itemRef)->data()->action());
+#else
+ return toAPI(ContextMenuItemTagNoAction);
+#endif
}
WKContextMenuItemType WKContextMenuItemGetType(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(toImpl(itemRef)->data()->type());
+#else
+ return toAPI(ActionType);
+#endif
}
WKStringRef WKContextMenuItemCopyTitle(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toCopiedAPI(toImpl(itemRef)->data()->title().impl());
+#else
+ return 0;
+#endif
}
bool WKContextMenuItemGetEnabled(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toImpl(itemRef)->data()->enabled();
+#else
+ return false;
+#endif
}
bool WKContextMenuItemGetChecked(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toImpl(itemRef)->data()->checked();
+#else
+ return false;
+#endif
}
WKArrayRef WKContextMenuCopySubmenuItems(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(toImpl(itemRef)->submenuItemsAsImmutableArray().leakRef());
+#else
+ return 0;
+#endif
}
WKTypeRef WKContextMenuItemGetUserData(WKContextMenuItemRef itemRef)
{
+#if ENABLE(CONTEXT_MENUS)
return toAPI(toImpl(itemRef)->userData());
+#else
+ return 0;
+#endif
}
void WKContextMenuItemSetUserData(WKContextMenuItemRef itemRef, WKTypeRef userDataRef)
{
+#if ENABLE(CONTEXT_MENUS)
toImpl(itemRef)->setUserData(toImpl(userDataRef));
+#endif
}
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenuItem.h"
#include "ImmutableArray.h"
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef WebContextMenuItem_h
#define WebContextMenuItem_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "APIObject.h"
#include "WebContextMenuItemData.h"
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // WebContextMenuItem_h
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenuItemData.h"
#include "APIObject.h"
}
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef WebContextMenuItemData_h
#define WebContextMenuItemData_h
+#if ENABLE(CONTEXT_MENUS)
+
#include <WebCore/ContextMenuItem.h>
#include <wtf/text/WTFString.h>
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // WebContextMenuItemData_h
void WKPageSetPageContextMenuClient(WKPageRef pageRef, const WKPageContextMenuClient* wkClient)
{
+#if ENABLE(CONTEXT_MENUS)
toImpl(pageRef)->initializeContextMenuClient(wkClient);
+#endif
}
void WKPageSetPageFindClient(WKPageRef pageRef, const WKPageFindClient* wkClient)
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebPageContextMenuClient.h"
#include "Logging.h"
}
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef WebPageContextMenuClient_h
#define WebPageContextMenuClient_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "APIClient.h"
#include "WebHitTestResult.h"
#include "WKPage.h"
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // WebPageContextMenuClient_h
m_findClient.initialize(client);
}
+#if ENABLE(CONTEXT_MENUS)
void WebPageProxy::initializeContextMenuClient(const WKPageContextMenuClient* client)
{
m_contextMenuClient.initialize(client);
}
+#endif
void WebPageProxy::reattachToWebProcess()
{
m_activePopupMenu = 0;
}
+#if ENABLE(CONTEXT_MENUS)
void WebPageProxy::showContextMenu(const IntPoint& menuLocation, const WebHitTestResult::Data& hitTestResultData, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
{
internalShowContextMenu(menuLocation, hitTestResultData, proposedItems, arguments);
process()->send(Messages::WebPage::DidSelectItemFromActiveContextMenu(item), m_pageID);
}
+#endif // ENABLE(CONTEXT_MENUS)
void WebPageProxy::didChooseFilesForOpenPanel(const Vector<String>& fileURLs)
{
WebFullScreenManagerProxy* fullScreenManager();
#endif
+#if ENABLE(CONTEXT_MENUS)
void initializeContextMenuClient(const WKPageContextMenuClient*);
+#endif
void initializeFindClient(const WKPageFindClient*);
void initializeFormClient(const WKPageFormClient*);
void initializeLoaderClient(const WKPageLoaderClient*);
void preferencesDidChange();
+#if ENABLE(CONTEXT_MENUS)
// Called by the WebContextMenuProxy.
void contextMenuItemSelected(const WebContextMenuItemData&);
+#endif
// Called by the WebOpenPanelResultListenerProxy.
void didChooseFilesForOpenPanel(const Vector<String>&);
void setPopupMenuSelectedIndex(int32_t);
#endif
+#if ENABLE(CONTEXT_MENUS)
// Context Menu.
void showContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
+#endif
// Search popup results
void saveRecentSearches(const String&, const Vector<String>&);
WebResourceLoadClient m_resourceLoadClient;
WebUIClient m_uiClient;
WebFindClient m_findClient;
+#if ENABLE(CONTEXT_MENUS)
WebPageContextMenuClient m_contextMenuClient;
+#endif
OwnPtr<DrawingAreaProxy> m_drawingArea;
RefPtr<WebProcessProxy> m_process;
SetPopupMenuSelectedIndex(int32_t selectedIndex)
#endif
+#if ENABLE(CONTEXT_MENUS)
# ContextMenu messages
ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::WebHitTestResult::Data hitTestResultData, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
+#endif
# Authentication messages
CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
void WKBundlePageSetContextMenuClient(WKBundlePageRef pageRef, WKBundlePageContextMenuClient* wkClient)
{
+#if ENABLE(CONTEXT_MENUS)
toImpl(pageRef)->initializeInjectedBundleContextMenuClient(wkClient);
+#endif
}
void WKBundlePageSetEditorClient(WKBundlePageRef pageRef, WKBundlePageEditorClient* wkClient)
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "InjectedBundlePageContextMenuClient.h"
#include "ImmutableArray.h"
}
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef InjectedBundlePageContextMenuClient_h
#define InjectedBundlePageContextMenuClient_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "APIClient.h"
#include "WKBundlePage.h"
#include <wtf/Vector.h>
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // InjectedBundlePageEditorClient_h
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenuClient.h"
#include "WebContextMenu.h"
#endif
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef WebContextMenuClient_h
#define WebContextMenuClient_h
+#if ENABLE(CONTEXT_MENUS)
+
#include <WebCore/ContextMenuClient.h>
namespace WebKit {
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // WebContextMenuClient_h
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenuClient.h"
#include <WebCore/NotImplemented.h>
}
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenu.h"
#include "InjectedBundleHitTestResult.h"
}
} // namespace WebKit
+
+#endif // ENABLE(CONTEXT_MENUS)
#ifndef WebContextMenu_h
#define WebContextMenu_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "WebContextMenuItemData.h"
#include <wtf/PassRefPtr.h>
} // namespace WebKit
+#endif // ENABLE(CONTEXT_MENUS)
#endif // WebPopupMenu_h
, m_canShortCircuitHorizontalWheelEvents(false)
, m_numWheelEventHandlers(0)
, m_cachedPageCount(0)
+#if ENABLE(CONTEXT_MENUS)
, m_isShowingContextMenu(false)
+#endif
, m_willGoToBackForwardItemCallbackEnabled(true)
#if PLATFORM(WIN)
, m_gestureReachedScrollingLimit(false)
Page::PageClients pageClients;
pageClients.chromeClient = new WebChromeClient(this);
+#if ENABLE(CONTEXT_MENUS)
pageClients.contextMenuClient = new WebContextMenuClient(this);
+#endif
pageClients.editorClient = new WebEditorClient(this);
pageClients.dragClient = new WebDragClient(this);
pageClients.backForwardClient = WebBackForwardListProxy::create(this);
return WebProcess::shared().connection();
}
+#if ENABLE(CONTEXT_MENUS)
void WebPage::initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient* client)
{
m_contextMenuClient.initialize(client);
}
+#endif
void WebPage::initializeInjectedBundleEditorClient(WKBundlePageEditorClient* client)
{
}
#endif
+#if ENABLE(CONTEXT_MENUS)
WebContextMenu* WebPage::contextMenu()
{
if (!m_contextMenu)
m_contextMenu = WebContextMenu::create(this);
return m_contextMenu.get();
}
+#endif
// Events
const WebEvent* m_previousCurrentEvent;
};
+#if ENABLE(CONTEXT_MENUS)
static bool isContextClick(const PlatformMouseEvent& event)
{
if (event.button() == WebCore::RightButton)
return handled;
}
+#endif
static bool handleMouseEvent(const WebMouseEvent& mouseEvent, WebPage* page, bool onlyUpdateScrollbars)
{
switch (platformMouseEvent.type()) {
case PlatformEvent::MousePressed: {
+#if ENABLE(CONTEXT_MENUS)
if (isContextClick(platformMouseEvent))
page->corePage()->contextMenuController()->clearContextMenu();
-
+#endif
+
bool handled = frame->eventHandler()->handleMousePressEvent(platformMouseEvent);
+#if ENABLE(CONTEXT_MENUS)
if (isContextClick(platformMouseEvent))
handled = handleContextMenuEvent(platformMouseEvent, page);
+#endif
return handled;
}
void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
{
+#if ENABLE(CONTEXT_MENUS)
// Don't try to handle any pending mouse events if a context menu is showing.
if (m_isShowingContextMenu) {
send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), false));
return;
}
+#endif
bool handled = false;
}
#endif
+#if ENABLE(CONTEXT_MENUS)
void WebPage::didSelectItemFromActiveContextMenu(const WebContextMenuItemData& item)
{
if (!m_contextMenu)
m_contextMenu->itemSelected(item);
m_contextMenu = 0;
}
+#endif
void WebPage::replaceSelectionWithText(Frame* frame, const String& text)
{
#include "GeolocationPermissionRequestManager.h"
#include "ImageOptions.h"
#include "ImmutableArray.h"
+#if ENABLE(CONTEXT_MENUS)
#include "InjectedBundlePageContextMenuClient.h"
+#endif
#include "InjectedBundlePageEditorClient.h"
#include "InjectedBundlePageFormClient.h"
#include "InjectedBundlePageFullScreenClient.h"
void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
// -- InjectedBundle methods
+#if ENABLE(CONTEXT_MENUS)
void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*);
+#endif
void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClient*);
#endif
+#if ENABLE(CONTEXT_MENUS)
InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
+#endif
InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
WebCore::IntSize viewportSize() const { return m_viewportSize; }
#endif
+#if ENABLE(CONTEXT_MENUS)
WebContextMenu* contextMenu();
+#endif
bool hasLocalDataForURL(const WebCore::KURL&);
String cachedResponseMIMETypeForURL(const WebCore::KURL&);
void simulateMouseMotion(WebCore::IntPoint, double time);
String viewportConfigurationAsText(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight);
+#if ENABLE(CONTEXT_MENUS)
void contextMenuShowing() { m_isShowingContextMenu = true; }
+#endif
#if PLATFORM(QT)
void registerApplicationScheme(const String& scheme);
void highlightPotentialActivation(const WebCore::IntPoint&, const WebCore::IntSize& area);
#endif
#endif
+#if ENABLE(CONTEXT_MENUS)
void contextMenuHidden() { m_isShowingContextMenu = false; }
+#endif
static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
static void logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
WebCore::IntSize m_windowResizerSize;
+#if ENABLE(CONTEXT_MENUS)
InjectedBundlePageContextMenuClient m_contextMenuClient;
+#endif
InjectedBundlePageEditorClient m_editorClient;
InjectedBundlePageFormClient m_formClient;
InjectedBundlePageLoaderClient m_loaderClient;
RefPtr<WebFullScreenManager> m_fullScreenManager;
#endif
RefPtr<WebPopupMenu> m_activePopupMenu;
+#if ENABLE(CONTEXT_MENUS)
RefPtr<WebContextMenu> m_contextMenu;
+#endif
RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
unsigned m_cachedPageCount;
+#if ENABLE(CONTEXT_MENUS)
bool m_isShowingContextMenu;
+#endif
bool m_willGoToBackForwardItemCallbackEnabled;
HighlightPotentialActivation(WebCore::IntPoint point, WebCore::IntSize area)
#endif
+#if ENABLE(CONTEXT_MENUS)
ContextMenuHidden()
+#endif
ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
CenterSelectionInVisibleArea()
FailedToShowPopupMenu();
#endif
+#if ENABLE(CONTEXT_MENUS)
# Context menu.
DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
+#endif
# Open panel.
DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)