Remove ContextMenuClient::shouldIncludeInspectElementItem
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2007 21:17:14 +0000 (21:17 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2007 21:17:14 +0000 (21:17 +0000)
WebCore:

        Remove ContextMenuClient::shouldIncludeInspectElementItem

        Reviewed by Tim.

        No regression test possible.

        * page/ContextMenuClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Use Settings
        to determine whether to include the Inspect Element item.
        * page/gdk/ContextMenuClientGdk.cpp:
        * page/gdk/ContextMenuClientGdk.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:

WebKit:

        Remove WebContextMenuClient::shouldIncludeInspectElementItem

        Reviewed by Tim.

        * WebCoreSupport/WebContextMenuClient.h:
        * WebCoreSupport/WebContextMenuClient.mm:

WebKit/win:

        Remove WebContextMenuClient::shouldIncludeInspectElementItem

        Reviewed by Tim.

        * WebContextMenuClient.cpp:
        * WebContextMenuClient.h:

WebKitQt:

        Remove ContextMenuClientQt::shouldIncludeInspectElementItem

        Reviewed by Tim.

        * WebCoreSupport/ContextMenuClientQt.cpp:
        * WebCoreSupport/ContextMenuClientQt.h:

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

15 files changed:
WebCore/ChangeLog
WebCore/page/ContextMenuClient.h
WebCore/page/ContextMenuController.cpp
WebCore/page/gdk/ContextMenuClientGdk.cpp
WebCore/page/gdk/ContextMenuClientGdk.h
WebCore/platform/graphics/svg/SVGImageEmptyClients.h
WebKit/ChangeLog
WebKit/WebCoreSupport/WebContextMenuClient.h
WebKit/WebCoreSupport/WebContextMenuClient.mm
WebKit/win/ChangeLog
WebKit/win/WebContextMenuClient.cpp
WebKit/win/WebContextMenuClient.h
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/ContextMenuClientQt.cpp
WebKitQt/WebCoreSupport/ContextMenuClientQt.h

index 7309ea982b19810eebefbce2f340b01998a609f1..acf865c8f115a2be702156b315d860594fa66be2 100644 (file)
@@ -1,3 +1,19 @@
+2007-07-17  Adam Roben  <aroben@apple.com>
+
+        Remove ContextMenuClient::shouldIncludeInspectElementItem
+
+        Reviewed by Tim.
+
+        No regression test possible.
+
+        * page/ContextMenuClient.h:
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::handleContextMenuEvent): Use Settings
+        to determine whether to include the Inspect Element item.
+        * page/gdk/ContextMenuClientGdk.cpp:
+        * page/gdk/ContextMenuClientGdk.h:
+        * platform/graphics/svg/SVGImageEmptyClients.h:
+
 2007-07-17  Adam Roben  <aroben@apple.com>
 
         Initialize ContextMenuController::m_page
index b905d62d078ebc0aa71b18fef3a7b7476283db9d..775adc50300473adda6d2e73877f2f0444f8ae3e 100644 (file)
@@ -49,7 +49,6 @@ namespace WebCore {
         virtual void lookUpInDictionary(Frame*) = 0;
         virtual void speak(const String&) = 0;
         virtual void stopSpeaking() = 0;
-        virtual bool shouldIncludeInspectElementItem() = 0;
 
 #if PLATFORM(MAC)
         virtual void searchWithSpotlight() = 0;
index c494f440c65a9131572f071732275b9a6c939114..49ea31e3d4d4862d0a98a6d9b5c6e4fa6e7a895c 100644 (file)
@@ -52,6 +52,7 @@
 #include "ReplaceSelectionCommand.h"
 #include "ResourceRequest.h"
 #include "SelectionController.h"
+#include "Settings.h"
 #include "markup.h"
 
 namespace WebCore {
@@ -97,9 +98,7 @@ void ContextMenuController::handleContextMenuEvent(Event* event)
     PlatformMenuDescription customMenu = m_client->getCustomMenuFromDefaultItems(m_contextMenu.get());
     m_contextMenu->setPlatformDescription(customMenu);
 
-    // FIXME: We should be asking Settings whether to include the Inspect
-    // Element item, rather than our client.
-    if (m_client->shouldIncludeInspectElementItem())
+    if (m_page->settings()->developerExtrasEnabled())
         m_contextMenu->addInspectElementItem();
     event->setDefaultHandled();
 }
index 6e6cea6ab82d10d8d105405ea99acf13026cb4db..2689a1bdce4121eed7b3989d55ef7b00bd3bffec 100644 (file)
@@ -80,11 +80,5 @@ void ContextMenuClientGdk::stopSpeaking()
     notImplemented();
 }
 
-bool ContextMenuClientGdk::shouldIncludeInspectElementItem()
-{
-    notImplemented();
-    return false;
-}
-
 }
 
index aa85960027aeb3d8c3bfa55e5502c4c19949877e..6b2e5e797d705e2f0cabbb67eaef49e36a087d27 100644 (file)
@@ -45,7 +45,6 @@ namespace WebCore {
         virtual void lookUpInDictionary(Frame*);
         virtual void speak(const String&);
         virtual void stopSpeaking();
-        virtual bool shouldIncludeInspectElementItem();
     };
 }
 
index fb3416813cbeaa1176e90d4cac6f6cf458277078..e09f0cd59d941f3b2dfb57e5eaf0c254e4ed16d9 100644 (file)
@@ -374,7 +374,6 @@ public:
     virtual void lookUpInDictionary(Frame*) { }
     virtual void speak(const String&) { }
     virtual void stopSpeaking() { }
-    virtual bool shouldIncludeInspectElementItem() { return false; }
 
 #if PLATFORM(MAC)
     virtual void searchWithSpotlight() { }
index a2fdf3251d1029201d687569d6082fd97765415a..23d93a79d3ac87bdb0b96a6efcf7a4c003e2ca7e 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-17  Adam Roben  <aroben@apple.com>
+
+        Remove WebContextMenuClient::shouldIncludeInspectElementItem
+
+        Reviewed by Tim.
+
+        * WebCoreSupport/WebContextMenuClient.h:
+        * WebCoreSupport/WebContextMenuClient.mm:
+
 2007-07-17  Adam Roben  <aroben@apple.com>
 
         Initialize Settings::developerExtrasEnabled
index ed2ce8e1ccfe03e8367b0c94cceedecde85f6fd7..f3c70c56e7e4fb8b44f1bb6b87a986af99c8e42e 100644 (file)
@@ -47,7 +47,6 @@ public:
     virtual void speak(const WebCore::String&);
     virtual void stopSpeaking();
     virtual void searchWithSpotlight();
-    virtual bool shouldIncludeInspectElementItem();
 
     WebView *webView() { return m_webView; }
         
index bd9bf1d261a829046f1d37ae4bdef3e2fc16d5ae..2b629eb8653473733008929b4bee6ab27d36a306 100644 (file)
@@ -288,8 +288,3 @@ void WebContextMenuClient::stopSpeaking()
 {
     [NSApp stopSpeaking];
 }
-
-bool WebContextMenuClient::shouldIncludeInspectElementItem()
-{
-    return [WebView _developerExtrasEnabled];
-}
index ef874836be2164347eadd71fbb11065868e01514..36cba942fae28d5652a51f1c772691f5da51b29a 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-17  Adam Roben  <aroben@apple.com>
+
+        Remove WebContextMenuClient::shouldIncludeInspectElementItem
+
+        Reviewed by Tim.
+
+        * WebContextMenuClient.cpp:
+        * WebContextMenuClient.h:
+
 2007-07-17  Adam Roben  <aroben@apple.com>
 
         Initialize Settings::developerExtrasEnabled
index 8ebdce8699aadbd2fb0d7296ae61c8c48533c075..bf8e5af01e98dbe863c4b55ab7b9ecfa3fe93d5c 100644 (file)
@@ -135,9 +135,3 @@ void WebContextMenuClient::stopSpeaking()
 {
     notImplemented();
 }
-
-bool WebContextMenuClient::shouldIncludeInspectElementItem()
-{
-    notImplemented();
-    return true;
-}
index 725fc47a494863be18a935707cce78c124e1590d..a981f4ed42ea840f5c46e5e8250a6efd65fb32c5 100644 (file)
@@ -45,7 +45,6 @@ public:
     virtual void lookUpInDictionary(WebCore::Frame*);
     virtual void speak(const WebCore::String&);
     virtual void stopSpeaking();
-    virtual bool shouldIncludeInspectElementItem();
 
 private:
     WebView* m_webView;
index 65bb3a3a0f0fab49bf1456a79ef9aa69c50d0f8f..0db6df94403d45b7ef83bacf7e7ab4d6c7db519a 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-17  Adam Roben  <aroben@apple.com>
+
+        Remove ContextMenuClientQt::shouldIncludeInspectElementItem
+
+        Reviewed by Tim.
+
+        * WebCoreSupport/ContextMenuClientQt.cpp:
+        * WebCoreSupport/ContextMenuClientQt.h:
+
 2007-07-16  Adam Roben  <aroben@apple.com>
 
         Updated ChromeClientQt for ChromeClient changes.
index ddf47e7b08f7e1dc2448145a1efba09495a146fa..144c57c2b6d34b2d93b3ca19a525827c65760112 100644 (file)
@@ -76,11 +76,5 @@ void ContextMenuClientQt::searchWithGoogle(const Frame*)
     notImplemented();
 }
 
-bool ContextMenuClientQt::shouldIncludeInspectElementItem()
-{
-    notImplemented();
-    return false;
-}
-
 }
 
index d7c35d166501b281585c4581be5a047109507e5b..e668c6892282b1fe73c506a3158d5ee8f8e61b18 100644 (file)
@@ -46,8 +46,6 @@ namespace WebCore {
         virtual void speak(const String&);
         virtual void stopSpeaking();
         virtual void searchWithGoogle(const Frame*);
-
-        virtual bool shouldIncludeInspectElementItem();
     };
 }