Skip to content
  • bdakin's avatar
    WebCore: · 8254b19d
    bdakin authored
            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: http://svn.webkit.org/repository/webkit/trunk@17855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8254b19d