Remove dead context menu code
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Oct 2015 19:01:28 +0000 (19:01 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Oct 2015 19:01:28 +0000 (19:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150567

Reviewed by Tim Horton.

Source/WebCore:

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

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.

Source/WebKit2:

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191591 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ContextMenuClient.h
Source/WebCore/page/ContextMenuController.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h

index 3082c8d..d6d6a28 100644 (file)
@@ -1,3 +1,15 @@
+2015-10-26  Anders Carlsson  <andersca@apple.com>
+
+        Remove dead context menu code
+        https://bugs.webkit.org/show_bug.cgi?id=150567
+
+        Reviewed by Tim Horton.
+
+        * loader/EmptyClients.h:
+        * page/ContextMenuClient.h:
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::showContextMenu): Deleted.
+
 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
 
         Implement 'round' and 'space' values for border-image
index ea01109..72cc8ab 100644 (file)
@@ -549,9 +549,6 @@ public:
     virtual ~EmptyContextMenuClient() {  }
     virtual void contextMenuDestroyed() override { }
 
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-    virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*) override { return nullptr; }
-#endif
     virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) override { }
 
     virtual void downloadURL(const URL&) override { }
index 20a2f0b..667bc58 100644 (file)
@@ -43,10 +43,6 @@ namespace WebCore {
         virtual ~ContextMenuClient() {  }
         virtual void contextMenuDestroyed() = 0;
         
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-        virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*) = 0;
-#endif
-
         virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) = 0;
 
         virtual void downloadURL(const URL& url) = 0;
index 499bcb9..a2c6eff 100644 (file)
@@ -181,10 +181,6 @@ void ContextMenuController::showContextMenu(Event* event)
     if (m_page.inspectorController().enabled())
         addInspectElementItem();
 
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-    PlatformMenuDescription customMenu = m_client.getCustomMenuFromDefaultItems(m_contextMenu.get());
-    m_contextMenu->setPlatformDescription(customMenu);
-#endif
     event->setDefaultHandled();
 }
 
index 319162d..c387da5 100644 (file)
@@ -1,3 +1,14 @@
+2015-10-26  Anders Carlsson  <andersca@apple.com>
+
+        Remove dead context menu code
+        https://bugs.webkit.org/show_bug.cgi?id=150567
+
+        Reviewed by Tim Horton.
+
+        * WebCoreSupport/WebContextMenuClient.h:
+        * WebCoreSupport/WebContextMenuClient.mm:
+        (WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
+
 2015-10-23  Anders Carlsson  <andersca@apple.com>
 
         Invoke the context menu delegate callback right before we return the menu
index 9500abb..56d0518 100644 (file)
@@ -50,7 +50,6 @@ public:
 
     virtual void contextMenuDestroyed() override;
     
-    virtual NSMutableArray* getCustomMenuFromDefaultItems(WebCore::ContextMenu*) override;
     virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) override;
     
     virtual void downloadURL(const WebCore::URL&) override;
index 5e5c3da..7bdaa4e 100644 (file)
@@ -89,11 +89,6 @@ void WebContextMenuClient::contextMenuDestroyed()
     delete this;
 }
 
-NSMutableArray* WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* defaultMenu)
-{
-    return defaultMenu->platformDescription();
-}
-
 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const ContextMenu* parentMenu)
 {
     id delegate = [m_webView UIDelegate];
index a3f882a..cb528c8 100644 (file)
@@ -1,3 +1,14 @@
+2015-10-26  Anders Carlsson  <andersca@apple.com>
+
+        Remove dead context menu code
+        https://bugs.webkit.org/show_bug.cgi?id=150567
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
+        (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
+        * WebProcess/WebCoreSupport/WebContextMenuClient.h:
+
 2015-10-26  Tim Horton  <timothy_horton@apple.com>
 
         Don't expose the whitelist/blacklist in _WKUserStyleSheet
index 35919cf..a90cc3a 100644 (file)
@@ -49,14 +49,6 @@ void WebContextMenuClient::contextMenuDestroyed()
     delete this;
 }
 
-#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.
-    return menu->platformDescription();
-}
-#endif
-
 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
 {
     notImplemented();
index c9c1f25..d4878e2 100644 (file)
@@ -44,9 +44,6 @@ public:
 private:
     virtual void contextMenuDestroyed() override;
 
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-    virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*) override;
-#endif
     virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) override;
     
     virtual void downloadURL(const WebCore::URL&) override;