Skip to content
Permalink
Browse files
Get rid of WebContextMenuClient::customizeMenu, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=150427

Reviewed by Tim Horton.
Source/WebCore:

* loader/EmptyClients.cpp:
(WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
* loader/EmptyClients.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenu):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::customizeMenu): Deleted.
* WebCoreSupport/WebContextMenuClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:

Canonical link: https://commits.webkit.org/168585@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Oct 22, 2015
1 parent 092a31e commit 06b5913a7cdd86d02cbb7c3bb8620f597bb31e18
Showing 10 changed files with 38 additions and 31 deletions.
@@ -1,3 +1,15 @@
2015-10-21 Anders Carlsson <andersca@apple.com>

Get rid of WebContextMenuClient::customizeMenu, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=150427

Reviewed by Tim Horton.
* loader/EmptyClients.cpp:
(WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
* loader/EmptyClients.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenu):

2015-10-21 Anders Carlsson <andersca@apple.com>

Remove dead MHTML code
@@ -232,13 +232,4 @@ void EmptyEditorClient::registerRedoStep(PassRefPtr<UndoStep>)
{
}

#if ENABLE(CONTEXT_MENUS)
#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
std::unique_ptr<ContextMenu> EmptyContextMenuClient::customizeMenu(std::unique_ptr<ContextMenu>)
{
return nullptr;
}
#endif
#endif

}
@@ -549,9 +549,7 @@ class EmptyContextMenuClient : public ContextMenuClient {
virtual ~EmptyContextMenuClient() { }
virtual void contextMenuDestroyed() override { }

#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
virtual std::unique_ptr<ContextMenu> customizeMenu(std::unique_ptr<ContextMenu>) override;
#else
#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*) override { return nullptr; }
#endif
virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) override { }
@@ -181,9 +181,7 @@ void ContextMenuController::showContextMenu(Event* event)
if (m_page.inspectorController().enabled())
addInspectElementItem();

#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
m_contextMenu = m_client.customizeMenu(WTF::move(m_contextMenu));
#else
#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
PlatformMenuDescription customMenu = m_client.getCustomMenuFromDefaultItems(m_contextMenu.get());
m_contextMenu->setPlatformDescription(customMenu);
#endif
@@ -1,3 +1,14 @@
2015-10-21 Anders Carlsson <andersca@apple.com>

Get rid of WebContextMenuClient::customizeMenu, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=150427

Reviewed by Tim Horton.

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::customizeMenu): Deleted.
* WebCoreSupport/WebContextMenuClient.h:

2015-10-21 Anders Carlsson <andersca@apple.com>

Simplify context menu handling on Windows
@@ -52,11 +52,6 @@ void WebContextMenuClient::contextMenuDestroyed()
delete this;
}

std::unique_ptr<ContextMenu> WebContextMenuClient::customizeMenu(std::unique_ptr<ContextMenu> menu)
{
return WTF::move(menu);
}

void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const ContextMenu* parentMenu)
{
ASSERT(item->type() == ActionType || item->type() == CheckableActionType);
@@ -35,7 +35,6 @@ class WebContextMenuClient : public WebCore::ContextMenuClient {

virtual void contextMenuDestroyed();

virtual std::unique_ptr<WebCore::ContextMenu> customizeMenu(std::unique_ptr<WebCore::ContextMenu>);
virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);

virtual void downloadURL(const WebCore::URL&);
@@ -1,3 +1,14 @@
2015-10-21 Anders Carlsson <andersca@apple.com>

Get rid of WebContextMenuClient::customizeMenu, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=150427

Reviewed by Tim Horton.

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:

2015-10-21 Tim Horton <timothy_horton@apple.com>

API-ify the FindMatches client
@@ -49,13 +49,7 @@ void WebContextMenuClient::contextMenuDestroyed()
delete this;
}

#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
std::unique_ptr<ContextMenu> WebContextMenuClient::customizeMenu(std::unique_ptr<ContextMenu> menu)
{
// WebKit2 ignores this client callback and does context menu customization when it is told to show the menu.
return menu;
}
#else
#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
PlatformMenuDescription WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
{
// WebKit2 ignores this client callback and does context menu customization when it is told to show the menu.
@@ -44,9 +44,7 @@ class WebContextMenuClient : public WebCore::ContextMenuClient {
private:
virtual void contextMenuDestroyed() override;

#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
virtual std::unique_ptr<WebCore::ContextMenu> customizeMenu(std::unique_ptr<WebCore::ContextMenu>) override;
#else
#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*) override;
#endif
virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) override;

0 comments on commit 06b5913

Please sign in to comment.