Skip to content
  • mitz@apple.com's avatar
    No way for policy client to determine if a the response’s MIME type can be shown · 8f11b919
    mitz@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124445
    
    Reviewed by Sam Weinig.
    
    Source/WebKit2: 
    
    * Platform/CoreIPC/HandleMessage.h:
    (CoreIPC::callMemberFunction): Added a fifth message parameter to this template.
    
    * UIProcess/API/C/WKPage.h: Added a canShowMIMEType parameter to
    WKPageDecidePolicyForResponseCallback and deprecated the old version.
    
    * UIProcess/API/mac/WKBrowsingContextController.mm:
    (setUpPagePolicyClient): Include whether the response MIME type can be shown under a new key
    in the action information dictionary.
    * UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h: Declared
    WKActionCanShowMIMETypeKey.
    
    * UIProcess/WebInspectorProxy.cpp:
    (WebKit::WebInspectorProxy::createInspectorPage): Updated for changes in the policy client.
    
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::decidePolicyForResponse): Added canShowMIMEType parameter, which is
    passed to the policy client.
    (WebKit::WebPageProxy::decidePolicyForResponseSync): Added canShowMIMEType parameter, which
    is passed to the above function.
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebPageProxy.messages.in: Added canShowMIMEType paramter to
    DecidePolicyForResponseSync.
    
    * UIProcess/WebPolicyClient.cpp:
    (WebKit::WebPolicyClient::decidePolicyForResponse): Added canShowMIMEType parameter, which
    is passed to the client callback.
    * UIProcess/WebPolicyClient.h:
    
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Determine if the response
    MIME type can be shown and pass this information along in the message to the UI process.
    
    Tools: 
    
    * MiniBrowser/mac/WK2BrowserWindowController.m:
    (decidePolicyForResponse): Added canShowMIMEType parameter.
    (-[WK2BrowserWindowController awakeFromNib]): Updated for changes in the policy client.
    
    * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
    (TestWebKitAPI::decidePolicyForResponse): Added canShowMIMEType parameter.
    
    * WebKitTestRunner/TestController.cpp:
    (WTR::TestController::createWebViewWithOptions): Updated for changes in the policy client.
    (WTR::TestController::decidePolicyForResponse): Added canShowMIMEType parameter.
    * WebKitTestRunner/TestController.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8f11b919