Changeset 159387 in webkit


Ignore:
Timestamp:
Nov 17, 2013 12:30:43 PM (10 years ago)
Author:
mitz@apple.com
Message:

No way for policy client to determine if a the response’s MIME type can be shown
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:
Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r159371 r159387  
     12013-11-16  Dan Bernstein  <mitz@apple.com>
     2
     3        No way for policy client to determine if a the response’s MIME type can be shown
     4        https://bugs.webkit.org/show_bug.cgi?id=124445
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Platform/CoreIPC/HandleMessage.h:
     9        (CoreIPC::callMemberFunction): Added a fifth message parameter to this template.
     10
     11        * UIProcess/API/C/WKPage.h: Added a canShowMIMEType parameter to
     12        WKPageDecidePolicyForResponseCallback and deprecated the old version.
     13
     14        * UIProcess/API/mac/WKBrowsingContextController.mm:
     15        (setUpPagePolicyClient): Include whether the response MIME type can be shown under a new key
     16        in the action information dictionary.
     17        * UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h: Declared
     18        WKActionCanShowMIMETypeKey.
     19
     20        * UIProcess/WebInspectorProxy.cpp:
     21        (WebKit::WebInspectorProxy::createInspectorPage): Updated for changes in the policy client.
     22
     23        * UIProcess/WebPageProxy.cpp:
     24        (WebKit::WebPageProxy::decidePolicyForResponse): Added canShowMIMEType parameter, which is
     25        passed to the policy client.
     26        (WebKit::WebPageProxy::decidePolicyForResponseSync): Added canShowMIMEType parameter, which
     27        is passed to the above function.
     28        * UIProcess/WebPageProxy.h:
     29        * UIProcess/WebPageProxy.messages.in: Added canShowMIMEType paramter to
     30        DecidePolicyForResponseSync.
     31
     32        * UIProcess/WebPolicyClient.cpp:
     33        (WebKit::WebPolicyClient::decidePolicyForResponse): Added canShowMIMEType parameter, which
     34        is passed to the client callback.
     35        * UIProcess/WebPolicyClient.h:
     36
     37        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     38        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Determine if the response
     39        MIME type can be shown and pass this information along in the message to the UI process.
     40
    1412013-11-15  Ryuan Choi  <ryuan.choi@samsung.com>
    242
     
    4787
    4888        * UIProcess/API/mac/WKBrowsingContextController.mm:
    49         (setUpPagePolicyClient): Include the originating frame’s URL under the a new key in the
     89        (setUpPagePolicyClient): Include the originating frame’s URL under a new key in the
    5090        action information dictionary.
    5191        * UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h: Declared
  • trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h

    r159358 r159387  
    347347// Variadic dispatch functions with non-variadic reply arguments.
    348348
    349 template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename R1, typename R2, typename R3>
    350 void callMemberFunction(std::tuple<P1, P2, P3, P4>&& args, MessageDecoder& decoder, std::tuple<R1, R2, R3>& replyArgs, C* object, MF function)
    351 {
    352     (object->*function)(std::get<0>(args), std::get<1>(args), std::get<2>(args), std::get<3>(args), decoder, std::get<0>(replyArgs), std::get<1>(replyArgs), std::get<2>(replyArgs));
     349template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename P5, typename R1, typename R2, typename R3>
     350void callMemberFunction(std::tuple<P1, P2, P3, P4, P5>&& args, MessageDecoder& decoder, std::tuple<R1, R2, R3>& replyArgs, C* object, MF function)
     351{
     352    (object->*function)(std::get<0>(args), std::get<1>(args), std::get<2>(args), std::get<3>(args), std::get<4>(args), decoder, std::get<0>(replyArgs), std::get<1>(replyArgs), std::get<2>(replyArgs));
    353353}
    354354
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.h

    r159358 r159387  
    151151typedef void (*WKPageDecidePolicyForNavigationActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
    152152typedef void (*WKPageDecidePolicyForNewWindowActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
    153 typedef void (*WKPageDecidePolicyForResponseCallback)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
     153typedef void (*WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
    154154typedef void (*WKPageUnableToImplementPolicyCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo);
    155155
    156156// Deprecated
    157157typedef void (*WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
     158typedef void (*WKPageDecidePolicyForResponseCallback)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
    158159
    159160struct WKPagePolicyClient {
     
    162163    WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0 decidePolicyForNavigationAction_deprecatedForUseWithV0;
    163164    WKPageDecidePolicyForNewWindowActionCallback                         decidePolicyForNewWindowAction;
    164     WKPageDecidePolicyForResponseCallback                                decidePolicyForResponse;
     165    WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0         decidePolicyForResponse_deprecatedForUseWithV0;
    165166    WKPageUnableToImplementPolicyCallback                                unableToImplementPolicy;
    166167
    167168    // Version 1
    168169    WKPageDecidePolicyForNavigationActionCallback                        decidePolicyForNavigationAction;
     170    WKPageDecidePolicyForResponseCallback                                decidePolicyForResponse;
    169171};
    170172typedef struct WKPagePolicyClient WKPagePolicyClient;
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm

    r159358 r159387  
    8383NSString * const WKActionFrameNameKey = @"WKActionFrameNameKey";
    8484NSString * const WKActionOriginatingFrameURLKey = @"WKActionOriginatingFrameURLKey";
     85NSString * const WKActionCanShowMIMETypeKey = @"WKActionCanShowMIMETypeKey";
    8586
    8687@interface WKBrowsingContextControllerData : NSObject {
     
    664665    };
    665666
    666     policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     667    policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
    667668    {
    668669        WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
     
    671672                WKActionIsMainFrameKey: @(WKFrameIsMainFrame(frame)),
    672673                WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get(),
    673                 WKActionURLResponseKey: adoptNS(WKURLResponseCopyNSURLResponse(response)).get()
     674                WKActionURLResponseKey: adoptNS(WKURLResponseCopyNSURLResponse(response)).get(),
     675                WKActionCanShowMIMETypeKey: @(canShowMIMEType),
    674676            };
    675677
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h

    r159358 r159387  
    3737WK_EXPORT extern NSString * const WKActionFrameNameKey;           // NSString
    3838WK_EXPORT extern NSString * const WKActionOriginatingFrameURLKey; // NSURL
     39WK_EXPORT extern NSString * const WKActionCanShowMIMETypeKey;     // NSNumber (BOOL)
    3940
    4041typedef NS_ENUM(NSUInteger, WKNavigationType) {
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r159358 r159387  
    444444        0, /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
    445445        0, /* decidePolicyForNewWindowAction */
     446        0, /* decidePolicyForResponse_deprecatedForUseWithV0 */
     447        0, /* unableToImplementPolicy */
     448        decidePolicyForNavigationAction,
    446449        0, /* decidePolicyForResponse */
    447         0, /* unableToImplementPolicy */
    448         decidePolicyForNavigationAction
    449450    };
    450451
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r159358 r159387  
    24632463}
    24642464
    2465 void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceResponse& response, const ResourceRequest& request, uint64_t listenerID, CoreIPC::MessageDecoder& decoder)
     2465void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceResponse& response, const ResourceRequest& request, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder& decoder)
    24662466{
    24672467    RefPtr<API::Object> userData;
     
    24772477    RefPtr<WebFramePolicyListenerProxy> listener = frame->setUpPolicyListenerProxy(listenerID);
    24782478
    2479     if (!m_policyClient.decidePolicyForResponse(this, frame, response, request, listener.get(), userData.get()))
     2479    if (!m_policyClient.decidePolicyForResponse(this, frame, response, request, canShowMIMEType, listener.get(), userData.get()))
    24802480        listener->use();
    24812481}
    24822482
    2483 void WebPageProxy::decidePolicyForResponseSync(uint64_t frameID, const ResourceResponse& response, const ResourceRequest& request, uint64_t listenerID, CoreIPC::MessageDecoder& decoder, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
     2483void WebPageProxy::decidePolicyForResponseSync(uint64_t frameID, const ResourceResponse& response, const ResourceRequest& request, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder& decoder, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
    24842484{
    24852485    ASSERT(!m_inDecidePolicyForResponseSync);
     
    24892489    m_syncMimeTypePolicyActionIsValid = false;
    24902490
    2491     decidePolicyForResponse(frameID, response, request, listenerID, decoder);
     2491    decidePolicyForResponse(frameID, response, request, canShowMIMEType, listenerID, decoder);
    24922492
    24932493    m_inDecidePolicyForResponseSync = false;
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r159358 r159387  
    792792    void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
    793793    void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, CoreIPC::MessageDecoder&);
    794     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::MessageDecoder&);
    795     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
     794    void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&);
     795    void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
    796796    void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::MessageDecoder&);
    797797
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r159358 r159387  
    9797
    9898    # Policy messages
    99     DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
     99    DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
    100100    DecidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
    101101    DecidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, WebCore::ResourceRequest request, WTF::String frameName, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
  • trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp

    r159358 r159387  
    6161}
    6262
    63 bool WebPolicyClient::decidePolicyForResponse(WebPageProxy* page, WebFrameProxy* frame, const ResourceResponse& resourceResponse, const ResourceRequest& resourceRequest, WebFramePolicyListenerProxy* listener, API::Object* userData)
     63bool WebPolicyClient::decidePolicyForResponse(WebPageProxy* page, WebFrameProxy* frame, const ResourceResponse& resourceResponse, const ResourceRequest& resourceRequest, bool canShowMIMEType, WebFramePolicyListenerProxy* listener, API::Object* userData)
    6464{
    65     if (!m_client.decidePolicyForResponse)
     65    if (!m_client.decidePolicyForResponse_deprecatedForUseWithV0 && !m_client.decidePolicyForResponse)
    6666        return false;
    6767
     
    6969    RefPtr<WebURLRequest> request = WebURLRequest::create(resourceRequest);
    7070
    71     m_client.decidePolicyForResponse(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.clientInfo);
     71    if (m_client.decidePolicyForResponse_deprecatedForUseWithV0)
     72        m_client.decidePolicyForResponse_deprecatedForUseWithV0(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.clientInfo);
     73    else
     74        m_client.decidePolicyForResponse(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), canShowMIMEType, toAPI(listener), toAPI(userData), m_client.clientInfo);
     75
    7276    return true;
    7377}
  • trunk/Source/WebKit2/UIProcess/WebPolicyClient.h

    r159358 r159387  
    5353    bool decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, WebFrameProxy* originatingFrame, const WebCore::ResourceRequest&, WebFramePolicyListenerProxy*, API::Object* userData);
    5454    bool decidePolicyForNewWindowAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, const WebCore::ResourceRequest&, const String& frameName, WebFramePolicyListenerProxy*, API::Object* userData);
    55     bool decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, WebFramePolicyListenerProxy*, API::Object* userData);
     55    bool decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, WebFramePolicyListenerProxy*, API::Object* userData);
    5656    void unableToImplementPolicy(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object* userData);
    5757};
  • trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp

    r159371 r159387  
    6262}
    6363
    64 void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* /*clientInfo*/)
     64void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* /*clientInfo*/)
    6565{
    6666    // Ignore responses with an HTTP status code of 204 (No Content)
  • trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h

    r159371 r159387  
    4242    static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKFrameRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
    4343    static void decidePolicyForNewWindowAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKStringRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
    44     static void decidePolicyForResponseCallback(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
     44    static void decidePolicyForResponseCallback(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef, WKTypeRef, const void*);
    4545
    4646    EwkView* m_view;
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r159358 r159387  
    639639    }
    640640
     641    bool canShowMIMEType = webPage->canShowMIMEType(response.mimeType());
     642
    641643    uint64_t listenerID = m_frame->setUpPolicyListener(std::move(function));
    642644    bool receivedPolicyAction;
     
    645647
    646648    // Notify the UIProcess.
    647     if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame->frameID(), response, request, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID)))
     649    if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame->frameID(), response, request, canShowMIMEType, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID)))
    648650        return;
    649651
  • trunk/Tools/ChangeLog

    r159382 r159387  
     12013-11-16  Dan Bernstein  <mitz@apple.com>
     2
     3        No way for policy client to determine if a the response’s MIME type can be shown
     4        https://bugs.webkit.org/show_bug.cgi?id=124445
     5
     6        Reviewed by Sam Weinig.
     7
     8        * MiniBrowser/mac/WK2BrowserWindowController.m:
     9        (decidePolicyForResponse): Added canShowMIMEType parameter.
     10        (-[WK2BrowserWindowController awakeFromNib]): Updated for changes in the policy client.
     11
     12        * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
     13        (TestWebKitAPI::decidePolicyForResponse): Added canShowMIMEType parameter.
     14
     15        * WebKitTestRunner/TestController.cpp:
     16        (WTR::TestController::createWebViewWithOptions): Updated for changes in the policy client.
     17        (WTR::TestController::decidePolicyForResponse): Added canShowMIMEType parameter.
     18        * WebKitTestRunner/TestController.h:
     19
    1202013-11-16  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r159358 r159387  
    427427}
    428428
    429 static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     429static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
    430430{
    431431    WKFramePolicyListenerUse(listener);
     
    673673        0,          /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
    674674        decidePolicyForNewWindowAction,
    675         decidePolicyForResponse,
     675        0,          /* decidePolicyForResponse_deprecatedForUseWithV */
    676676        0,          /* unableToImplementPolicy */
    677677        decidePolicyForNavigationAction,
     678        decidePolicyForResponse,
    678679    };
    679680    WKPageSetPagePolicyClient(_webView.pageRef, &policyClient);
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp

    r159358 r159387  
    104104}
    105105
    106 static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     106static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
    107107{
    108108    WKFramePolicyListenerUse(listener);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r159358 r159387  
    491491        0, // decidePolicyForNavigationAction_deprecatedForUseWithV0
    492492        0, // decidePolicyForNewWindowAction
    493         decidePolicyForResponse,
     493        0, // decidePolicyForResponse_deprecatedForUseWithV0
    494494        0, // unableToImplementPolicy
    495495        decidePolicyForNavigationAction,
     496        decidePolicyForResponse,
    496497    };
    497498    WKPageSetPagePolicyClient(m_mainWebView->page(), &pagePolicyClient);
     
    12331234}
    12341235
    1235 void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
     1236void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
    12361237{
    12371238    static_cast<TestController*>(const_cast<void*>(clientInfo))->decidePolicyForResponse(frame, response, listener);
  • trunk/Tools/WebKitTestRunner/TestController.h

    r159358 r159387  
    156156    void decidePolicyForNavigationAction(WKFramePolicyListenerRef);
    157157
    158     static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
     158    static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef, WKTypeRef, const void*);
    159159    void decidePolicyForResponse(WKFrameRef, WKURLResponseRef, WKFramePolicyListenerRef);
    160160
Note: See TracChangeset for help on using the changeset viewer.