Move ChromeClient::showContextMenu() to ContextMenuClient

https://bugs.webkit.org/show_bug.cgi?id=79427

Patch by Hajime Morrita <morrita@chromium.org> on 2012-02-26
Reviewed by Adam Barth.

Source/JavaScriptCore:

Added ACCESSIBILITY_CONTEXT_MENUS.

* wtf/Platform.h:

Source/WebCore:

- Removed ChromeClient::showContextMenu(), Chrome::showContextMenu()
- Added ContextMenuController::showContextMenuAt(), ContextMenuClient::showContextMenu()
- Hided showContextMenu() behind ACCESSIBILITY_CONTEXT_MENUS

This change localizes context menu related code and will make it easy to
modularize CONTEXT_MENUS code.

Refactoring. No new tests.

* WebCore.exp.in:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* loader/EmptyClients.h:
(EmptyContextMenuClient):
(WebCore::EmptyContextMenuClient::showContextMenu):
* page/ContextMenuClient.h:
(ContextMenuClient):
* page/ContextMenuController.cpp:
(WebCore):
(WebCore::ContextMenuController::showContextMenuAt):
* page/ContextMenuController.h:
(ContextMenuController):
* page/Chrome.cpp:
* page/Chrome.h:
(Chrome):
* page/ChromeClient.h:
(ChromeClient):

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Source/WebKit/chromium:

* src/ChromeClientImpl.h:
(ChromeClientImpl):

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.h:
(ChromeClient):

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient):
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::showContextMenu): Moved from WebChromeClient
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.h:
(ChromeClientQt):

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.h:
(WebChromeClient):

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.h:
(ChromeClientWinCE):

Source/WebKit/wx:

* WebKitSupport/ChromeClientWx.h:
(ChromeClientWx):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit):
(WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 933f312e
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
Added ACCESSIBILITY_CONTEXT_MENUS.
* wtf/Platform.h:
2012-02-26 Filip Pizlo <fpizlo@apple.com>
LayoutTests/fast/xpath/xpath-functional-test.html is crashing in the DFG
......@@ -1098,6 +1098,10 @@
#define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1
#endif
#if PLATFORM(MAC) && HAVE(ACCESSIBILITY)
#define WTF_USE_ACCESSIBILITY_CONTEXT_MENUS 1
#endif
/* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location.
Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy.
pre-emptive permission policy is enabled by default for all client-based implementations. */
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
- Removed ChromeClient::showContextMenu(), Chrome::showContextMenu()
- Added ContextMenuController::showContextMenuAt(), ContextMenuClient::showContextMenu()
- Hided showContextMenu() behind ACCESSIBILITY_CONTEXT_MENUS
This change localizes context menu related code and will make it easy to
modularize CONTEXT_MENUS code.
Refactoring. No new tests.
* WebCore.exp.in:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* loader/EmptyClients.h:
(EmptyContextMenuClient):
(WebCore::EmptyContextMenuClient::showContextMenu):
* page/ContextMenuClient.h:
(ContextMenuClient):
* page/ContextMenuController.cpp:
(WebCore):
(WebCore::ContextMenuController::showContextMenuAt):
* page/ContextMenuController.h:
(ContextMenuController):
* page/Chrome.cpp:
* page/Chrome.h:
(Chrome):
* page/ChromeClient.h:
(ChromeClient):
2012-02-26 Benjamin Poulain <bpoulain@apple.com>
[Mac] Release localized Strings instead of AutoRelease
......@@ -1669,7 +1669,6 @@ __ZNK7WebCore21ContextMenuController21checkOrEnableIfNeededERNS_15ContextMenuIte
__ZN7WebCore21ContextMenuController23contextMenuItemSelectedEPNS_15ContextMenuItemE
__ZN7WebCore21contextMenuItemVectorEP14NSMutableArray
__ZN7WebCore23platformMenuDescriptionERN3WTF6VectorINS_15ContextMenuItemELm0EEE
__ZN7WebCore6Chrome15showContextMenuEv
__ZNK7WebCore11ContextMenu19platformDescriptionEv
__ZNK7WebCore15ContextMenuItem15platformSubMenuEv
__ZNK7WebCore15ContextMenuItem4typeEv
......
......@@ -44,6 +44,7 @@
#import "AccessibilityTableRow.h"
#import "Chrome.h"
#import "ColorMac.h"
#import "ContextMenuController.h"
#import "Frame.h"
#import "FrameLoaderClient.h"
#import "FrameSelection.h"
......@@ -2614,14 +2615,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
Page* page = frame->page();
if (!page)
return;
// Simulate a click in the middle of the object.
IntPoint clickPoint = m_object->clickPoint();
PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime());
bool handled = frame->eventHandler()->sendContextMenuEvent(mouseEvent);
if (handled)
page->chrome()->showContextMenu();
page->contextMenuController()->showContextMenuAt(frame, m_object->clickPoint());
}
- (void)accessibilityPerformAction:(NSString*)action
......
......@@ -152,10 +152,6 @@ public:
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const { return adoptRef(new EmptyPopupMenu()); }
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const { return adoptRef(new EmptySearchPopupMenu()); }
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
#if ENABLE(REGISTER_PROTOCOL_HANDLER)
virtual void registerProtocolHandler(const String&, const String&, const String&, const String&) { }
#endif
......@@ -566,6 +562,10 @@ public:
#if PLATFORM(MAC)
virtual void searchWithSpotlight() { }
#endif
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
};
#endif // ENABLE(CONTEXT_MENUS)
......
......@@ -555,13 +555,6 @@ PassRefPtr<SearchPopupMenu> Chrome::createSearchPopupMenu(PopupMenuClient* clien
return m_client->createSearchPopupMenu(client);
}
#if ENABLE(CONTEXT_MENUS)
void Chrome::showContextMenu()
{
m_client->showContextMenu();
}
#endif
bool Chrome::requiresFullscreenForVideoPlayback()
{
return m_client->requiresFullscreenForVideoPlayback();
......
......@@ -173,10 +173,6 @@ namespace WebCore {
PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
#if ENABLE(CONTEXT_MENUS)
void showContextMenu();
#endif
private:
Chrome(Page*, ChromeClient*);
......
......@@ -307,10 +307,6 @@ namespace WebCore {
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0;
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const = 0;
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() = 0;
#endif
virtual void postAccessibilityNotification(AccessibilityObject*, AXObjectCache::AXNotification) { }
virtual void notifyScrollerThumbIsVisibleInRect(const IntRect&) { }
......
......@@ -60,6 +60,10 @@ namespace WebCore {
#if PLATFORM(MAC)
virtual void searchWithSpotlight() = 0;
#endif
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
virtual void showContextMenu() = 0;
#endif
};
}
......
......@@ -58,6 +58,7 @@
#include "NavigationAction.h"
#include "Node.h"
#include "Page.h"
#include "PlatformEvent.h"
#include "RenderLayer.h"
#include "RenderObject.h"
#include "ReplaceSelectionCommand.h"
......@@ -1270,6 +1271,17 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
item.setEnabled(shouldEnable);
}
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
void ContextMenuController::showContextMenuAt(Frame* frame, const IntPoint& clickPoint)
{
// Simulate a click in the middle of the accessibility object.
PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime());
bool handled = frame->eventHandler()->sendContextMenuEvent(mouseEvent);
if (handled && client())
client()->showContextMenu();
}
#endif
} // namespace WebCore
#endif // ENABLE(CONTEXT_MENUS)
......@@ -65,6 +65,10 @@ namespace WebCore {
void setHitTestResult(const HitTestResult& result) { m_hitTestResult = result; }
const HitTestResult& hitTestResult() { return m_hitTestResult; }
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
void showContextMenuAt(Frame*, const IntPoint& clickPoint);
#endif
private:
ContextMenuController(Page*, ContextMenuClient*);
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):
2012-02-24 Mike Fenton <mifenton@rim.com>
[BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
......
......@@ -139,7 +139,6 @@ public:
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
virtual void showContextMenu() { }
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* src/ChromeClientImpl.h:
(ChromeClientImpl):
2012-02-26 James Robinson <jamesr@chromium.org>
Take 2 build fix.
......@@ -196,10 +196,6 @@ public:
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, WebCore::FrameLoader::PageDismissalType) const;
virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const;
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):
2012-02-24 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL][DRT] Implement setValueForUser and setAutofilled.
......
......@@ -121,10 +121,6 @@ public:
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
#if ENABLE(TOUCH_EVENTS)
virtual void needTouchEvents(bool);
#endif
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/ChromeClientGtk.h:
(ChromeClient):
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
......
......@@ -125,9 +125,6 @@ namespace WebKit {
#endif
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void loadIconForFiles(const Vector<WTF::String>&, FileIconLoader*);
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient):
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::showContextMenu): Moved from WebChromeClient
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
2012-02-25 Sam Weinig <sam@webkit.org>
QuickLook events don't make it to WebKit plugins.
......
......@@ -184,10 +184,6 @@ public:
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const OVERRIDE;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const OVERRIDE;
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() OVERRIDE;
#endif
virtual void numWheelEventHandlersChanged(unsigned) OVERRIDE { }
virtual void numTouchEventHandlersChanged(unsigned) OVERRIDE { }
virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const OVERRIDE { return false; }
......
......@@ -857,35 +857,6 @@ PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebC
return adoptRef(new SearchPopupMenuMac(client));
}
#if ENABLE(CONTEXT_MENUS)
void WebChromeClient::showContextMenu()
{
Page* page = [m_webView page];
if (!page)
return;
ContextMenuController* controller = page->contextMenuController();
Node* node = controller->hitTestResult().innerNonSharedNode();
if (!node)
return;
Frame* frame = node->document()->frame();
if (!frame)
return;
FrameView* frameView = frame->view();
if (!frameView)
return;
NSView* view = frameView->documentView();
IntPoint point = frameView->contentsToWindow(controller->hitTestResult().point());
NSPoint nsScreenPoint = [view convertPoint:point toView:nil];
// Show the contextual menu for this event.
NSEvent* event = [NSEvent mouseEventWithType:NSRightMouseDown location:nsScreenPoint modifierFlags:0 timestamp:0 windowNumber:[[view window] windowNumber] context:0 eventNumber:0 clickCount:1 pressure:1];
NSMenu* nsMenu = [view menuForEvent:event];
if (nsMenu)
[NSMenu popUpContextMenu:nsMenu withEvent:event forView:view];
}
#endif
#if USE(ACCELERATED_COMPOSITING)
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
......
......@@ -46,6 +46,7 @@ public:
virtual void speak(const WTF::String&) OVERRIDE;
virtual void stopSpeaking() OVERRIDE;
virtual void searchWithSpotlight() OVERRIDE;
virtual void showContextMenu() OVERRIDE;
WebView *webView() { return m_webView; }
......
......@@ -42,9 +42,12 @@
#import "WebViewInternal.h"
#import <WebCore/ContextMenu.h>
#import <WebCore/ContextMenuController.h>
#import <WebCore/Document.h>
#import <WebCore/KURL.h>
#import <WebCore/LocalizedStrings.h>
#import <WebCore/Page.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebKit/DOMPrivate.h>
......@@ -346,3 +349,29 @@ void WebContextMenuClient::stopSpeaking()
{
[NSApp stopSpeaking:nil];
}
void WebContextMenuClient::showContextMenu()
{
Page* page = [m_webView page];
if (!page)
return;
ContextMenuController* controller = page->contextMenuController();
Node* node = controller->hitTestResult().innerNonSharedNode();
if (!node)
return;
Frame* frame = node->document()->frame();
if (!frame)
return;
FrameView* frameView = frame->view();
if (!frameView)
return;
IntPoint point = frameView->contentsToWindow(controller->hitTestResult().point());
NSView* view = frameView->documentView();
NSPoint nsScreenPoint = [view convertPoint:point toView:nil];
// Show the contextual menu for this event.
NSEvent* event = [NSEvent mouseEventWithType:NSRightMouseDown location:nsScreenPoint modifierFlags:0 timestamp:0 windowNumber:[[view window] windowNumber] context:0 eventNumber:0 clickCount:1 pressure:1];
NSMenu* nsMenu = [view menuForEvent:event];
if (nsMenu)
[NSMenu popUpContextMenu:nsMenu withEvent:event forView:view];
}
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/ChromeClientQt.h:
(ChromeClientQt):
2012-02-24 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] API: Unify the loading properties and signals.
......
......@@ -138,9 +138,6 @@ public:
#endif
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
#if USE(ACCELERATED_COMPOSITING)
// This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
......
......@@ -120,10 +120,6 @@ public:
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
virtual void populateVisitedLinks();
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebCoreSupport/ChromeClientWinCE.h:
(ChromeClientWinCE):
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
......
......@@ -131,10 +131,6 @@ public:
// for this origin.
virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
#if ENABLE(NOTIFICATIONS)
virtual WebCore::NotificationPresenter* notificationPresenter() const;
#endif
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebKitSupport/ChromeClientWx.h:
(ChromeClientWx):
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
......
......@@ -126,11 +126,6 @@ public:
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
......
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit):
(WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
2012-02-26 Huang Dongsung <luxtella@company100.net>
Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy
......@@ -30,7 +30,6 @@
#include "DrawingArea.h"
#include "InjectedBundleNavigationAction.h"
#include "InjectedBundleUserMessageCoders.h"
#include "WebContextMenu.h"
#include "WebCoreArgumentCoders.h"
#include "WebFrame.h"
#include "WebFrameLoaderClient.h"
......@@ -670,13 +669,6 @@ PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebC
return WebSearchPopupMenu::create(m_page, client);
}
#if ENABLE(CONTEXT_MENUS)
void WebChromeClient::showContextMenu()
{
m_page->contextMenu()->show();
}
#endif
#if USE(ACCELERATED_COMPOSITING)
void WebChromeClient::attachRootGraphicsLayer(Frame*, GraphicsLayer* layer)
{
......
......@@ -174,10 +174,6 @@ private:
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const OVERRIDE;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const OVERRIDE;
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() OVERRIDE;
#endif
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) OVERRIDE;
virtual void setNeedsOneShotDrawingSynchronization() OVERRIDE;
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include "WebContextMenuClient.h"
#include "WebContextMenu.h"
#include "WebContextMenuItemData.h"
#include "WebPage.h"
#include <WebCore/ContextMenu.h>
......@@ -87,4 +88,11 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
}
}
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
void WebContextMenuClient::showContextMenu()
{
m_page->contextMenu()->show();
}
#endif
} // namespace WebKit
......@@ -59,7 +59,11 @@ private:
#if PLATFORM(MAC)
virtual void searchWithSpotlight() OVERRIDE;
#endif
#if USE(ACCESSIBILITY_CONTEXT_MENUS)
void showContextMenu() OVERRIDE;
#endif
WebPage* m_page;
};
......
......@@ -1220,25 +1220,25 @@ static bool isContextClick(const PlatformMouseEvent& event)