Skip to content
  • beidson@apple.com's avatar
    <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412... · 75158d2e
    beidson@apple.com authored
    <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412 REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted
    
    Reviewed by Geoff Garen.
    
    Source/WebCore:
    
    WebKit API test WebViewCanPasteURL.mm added.
    
    * WebCore.exp.in:
    
    Add a strategy method specifically for getting the URL:
    * platform/PasteboardStrategy.h:
    
    Use that strategy method when creating the fragment for a URL:
    * platform/mac/PasteboardMac.mm:
    (WebCore::Pasteboard::documentFragment):
    
    Add a platform pasteboard accessor to "do the right thing" for getting a URL:
    * platform/PlatformPasteboard.h:
    * platform/mac/PlatformPasteboardMac.mm:
    (WebCore::PlatformPasteboard::url):
    
    Source/WebKit/mac:
    
    * WebCoreSupport/WebEditorClient.mm:
    (WebEditorClient::setInsertionPasteboard):
    * WebCoreSupport/WebPlatformStrategies.h:
    (WebPlatformStrategies):
    * WebCoreSupport/WebPlatformStrategies.mm:
    (WebPlatformStrategies::url):
    
    Source/WebKit2:
    
    Add new message so the WebProcess can ask the UIProcesses pasteboard for the URL:
    * UIProcess/WebContext.h:
    * UIProcess/WebContext.messages.in:
    * UIProcess/mac/WebContextMac.mm:
    (WebKit::WebContext::getPasteboardURL):
    
    Use that new message to implement the pasteboard strategy:
    * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
    (WebKit::WebPlatformStrategies::url):
    * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
    (WebPlatformStrategies):
    
    Tools:
    
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    75158d2e