WebCore:
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2006 01:21:56 +0000 (01:21 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2006 01:21:56 +0000 (01:21 +0000)
commitf2ae816dc4e8ff88092a89c313c89149a24dd8e0
treeadfc358db37faec6ab1614d955d097a13fa1dfa8
parent81aeeb43c1b3898f946e97063772e607e1865bf9
WebCore:
        Reviewed by Adam.

        Implementation of actions for the new context menus.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/EditorClient.h: Declaration of shouldInsertText.
        * bridge/mac/FrameMac.h: Two new spelling functions.
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::ignoreSpelling):
        (WebCore::FrameMac::learnSpelling):
        * editing/Editor.cpp:
        (WebCore::Editor::shouldInsertText): Call into the client.
        * editing/Editor.h:
        * editing/EditorInsertAction.h: Added.
        (WebCore::): The WebCore equivalent of WebViewInsertAction. This is
        defined in its own header so that we can use it from Editor.h and
        EditorClient.h without having one of the above include the other.
        * page/ContextMenuClient.h: A few currently WebKit-implemented
        function needed for menu actions.
        * page/ContextMenuController.cpp:
        (WebCore::makeGoogleSearchURL):
        (WebCore::ContextMenuController::contextMenuActionSelected): The
        actions!
        * page/ContextMenuController.h:
        * page/Frame.h: New pure-virtual spelling functions.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::controller): Get the controller from the
        menu.
        * platform/ContextMenu.h:
        * platform/mac/ContextMenuMac.mm:
        (-[MenuTarget
        forwardContextMenuAction:initWithContextMenuController:WebCore::]):
        Use the controller instead of the menu
        (-[MenuTarget WebCore::]):
        (-[MenuTarget setMenuController:WebCore::]):
        (-[MenuTarget forwardContextMenuAction:]):
        (getNSMenuItem):
        (ContextMenu::show):
        (ContextMenu::hide):

WebKit:
        Reviewed by Adam.

        WebKit side of new context menu actions.

        * WebCoreSupport/WebContextMenuClient.h: These are for the
        currently-WebKit-dependent menu actions.
        * WebCoreSupport/WebContextMenuClient.mm:
        (WebContextMenuClient::copyLinkToClipboard):
        (WebContextMenuClient::downloadURL):
        (WebContextMenuClient::copyImageToClipboard):
        (WebContextMenuClient::searchWithSpotlight):
        (WebContextMenuClient::lookUpInDictionary):
        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (core): These are to convert between WebViewInsertAction and
        EditorInsertAction.
        (kit):
        (WebEditorClient::shouldInsertText): Added implementation for
        shouldInsertText.
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Moved
        _lookUpInDictionary to be within the implementation of WebHTMLView
        internal.
        * WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
        * WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/EditorClient.h
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/editing/Editor.cpp
WebCore/editing/Editor.h
WebCore/editing/EditorInsertAction.h [new file with mode: 0644]
WebCore/page/ContextMenuClient.h
WebCore/page/ContextMenuController.cpp
WebCore/page/ContextMenuController.h
WebCore/page/Frame.h
WebCore/platform/ContextMenu.cpp
WebCore/platform/ContextMenu.h
WebCore/platform/mac/ContextMenuMac.mm
WebKit/ChangeLog
WebKit/WebCoreSupport/WebContextMenuClient.h
WebKit/WebCoreSupport/WebContextMenuClient.mm
WebKit/WebCoreSupport/WebEditorClient.h
WebKit/WebCoreSupport/WebEditorClient.mm
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebHTMLViewInternal.h
WebKit/WebView/WebViewInternal.h