<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[159387] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/159387">159387</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2013-11-17 12:30:43 -0800 (Sun, 17 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCHandleMessageh">trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageh">trunk/Source/WebKit2/UIProcess/API/C/WKPage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKBrowsingContextPolicyDelegateh">trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxycpp">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPolicyClientcpp">trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPolicyClienth">trunk/Source/WebKit2/UIProcess/WebPolicyClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflPagePolicyClientEflcpp">trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflPagePolicyClientEflh">trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsMiniBrowsermacWK2BrowserWindowControllerm">trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2PageLoadBasiccpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/ChangeLog        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2013-11-16  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        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.
+
+        * 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.
+
</ins><span class="cx"> 2013-11-15  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed EFL build fix after r159358.
</span><span class="lines">@@ -46,7 +86,7 @@
</span><span class="cx">         policy client version to 1.
</span><span class="cx"> 
</span><span class="cx">         * UIProcess/API/mac/WKBrowsingContextController.mm:
</span><del>-        (setUpPagePolicyClient): Include the originating frame’s URL under the a new key in the
</del><ins>+        (setUpPagePolicyClient): Include the originating frame’s URL under a new key in the
</ins><span class="cx">         action information dictionary.
</span><span class="cx">         * UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h: Declared
</span><span class="cx">         WKActionOriginatingFrameURLKey.
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCHandleMessageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -346,10 +346,10 @@
</span><span class="cx"> 
</span><span class="cx"> // Variadic dispatch functions with non-variadic reply arguments.
</span><span class="cx"> 
</span><del>-template&lt;typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename R1, typename R2, typename R3&gt;
-void callMemberFunction(std::tuple&lt;P1, P2, P3, P4&gt;&amp;&amp; args, MessageDecoder&amp; decoder, std::tuple&lt;R1, R2, R3&gt;&amp; replyArgs, C* object, MF function)
</del><ins>+template&lt;typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename P5, typename R1, typename R2, typename R3&gt;
+void callMemberFunction(std::tuple&lt;P1, P2, P3, P4, P5&gt;&amp;&amp; args, MessageDecoder&amp; decoder, std::tuple&lt;R1, R2, R3&gt;&amp; replyArgs, C* object, MF function)
</ins><span class="cx"> {
</span><del>-    (object-&gt;*function)(std::get&lt;0&gt;(args), std::get&lt;1&gt;(args), std::get&lt;2&gt;(args), std::get&lt;3&gt;(args), decoder, std::get&lt;0&gt;(replyArgs), std::get&lt;1&gt;(replyArgs), std::get&lt;2&gt;(replyArgs));
</del><ins>+    (object-&gt;*function)(std::get&lt;0&gt;(args), std::get&lt;1&gt;(args), std::get&lt;2&gt;(args), std::get&lt;3&gt;(args), std::get&lt;4&gt;(args), decoder, std::get&lt;0&gt;(replyArgs), std::get&lt;1&gt;(replyArgs), std::get&lt;2&gt;(replyArgs));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename C, typename MF, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename R1, typename R2&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -150,22 +150,24 @@
</span><span class="cx"> // Policy Client.
</span><span class="cx"> typedef void (*WKPageDecidePolicyForNavigationActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</span><span class="cx"> typedef void (*WKPageDecidePolicyForNewWindowActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</span><del>-typedef void (*WKPageDecidePolicyForResponseCallback)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</del><ins>+typedef void (*WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</ins><span class="cx"> typedef void (*WKPageUnableToImplementPolicyCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo);
</span><span class="cx"> 
</span><span class="cx"> // Deprecated
</span><span class="cx"> typedef void (*WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</span><ins>+typedef void (*WKPageDecidePolicyForResponseCallback)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
</ins><span class="cx"> 
</span><span class="cx"> struct WKPagePolicyClient {
</span><span class="cx">     int                                                                  version;
</span><span class="cx">     const void *                                                         clientInfo;
</span><span class="cx">     WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0 decidePolicyForNavigationAction_deprecatedForUseWithV0;
</span><span class="cx">     WKPageDecidePolicyForNewWindowActionCallback                         decidePolicyForNewWindowAction;
</span><del>-    WKPageDecidePolicyForResponseCallback                                decidePolicyForResponse;
</del><ins>+    WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0         decidePolicyForResponse_deprecatedForUseWithV0;
</ins><span class="cx">     WKPageUnableToImplementPolicyCallback                                unableToImplementPolicy;
</span><span class="cx"> 
</span><span class="cx">     // Version 1
</span><span class="cx">     WKPageDecidePolicyForNavigationActionCallback                        decidePolicyForNavigationAction;
</span><ins>+    WKPageDecidePolicyForResponseCallback                                decidePolicyForResponse;
</ins><span class="cx"> };
</span><span class="cx"> typedef struct WKPagePolicyClient WKPagePolicyClient;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx"> NSString * const WKActionURLResponseKey = @&quot;WKActionURLResponseKey&quot;;
</span><span class="cx"> NSString * const WKActionFrameNameKey = @&quot;WKActionFrameNameKey&quot;;
</span><span class="cx"> NSString * const WKActionOriginatingFrameURLKey = @&quot;WKActionOriginatingFrameURLKey&quot;;
</span><ins>+NSString * const WKActionCanShowMIMETypeKey = @&quot;WKActionCanShowMIMETypeKey&quot;;
</ins><span class="cx"> 
</span><span class="cx"> @interface WKBrowsingContextControllerData : NSObject {
</span><span class="cx"> @public
</span><span class="lines">@@ -663,14 +664,15 @@
</span><span class="cx">             WKFramePolicyListenerUse(listener);
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</del><ins>+    policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</ins><span class="cx">     {
</span><span class="cx">         WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
</span><span class="cx">         if ([browsingContext.policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForResponseAction:decisionHandler:)]) {
</span><span class="cx">             NSDictionary *actionDictionary = @{
</span><span class="cx">                 WKActionIsMainFrameKey: @(WKFrameIsMainFrame(frame)),
</span><span class="cx">                 WKActionURLRequestKey: adoptNS(WKURLRequestCopyNSURLRequest(request)).get(),
</span><del>-                WKActionURLResponseKey: adoptNS(WKURLResponseCopyNSURLResponse(response)).get()
</del><ins>+                WKActionURLResponseKey: adoptNS(WKURLResponseCopyNSURLResponse(response)).get(),
+                WKActionCanShowMIMETypeKey: @(canShowMIMEType),
</ins><span class="cx">             };
</span><span class="cx"> 
</span><span class="cx">             [browsingContext.policyDelegate browsingContextController:browsingContext decidePolicyForResponseAction:actionDictionary decisionHandler:makePolicyDecisionBlock(listener)];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextPolicyDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> WK_EXPORT extern NSString * const WKActionURLResponseKey;         // NSURLResponse
</span><span class="cx"> WK_EXPORT extern NSString * const WKActionFrameNameKey;           // NSString
</span><span class="cx"> WK_EXPORT extern NSString * const WKActionOriginatingFrameURLKey; // NSURL
</span><ins>+WK_EXPORT extern NSString * const WKActionCanShowMIMETypeKey;     // NSNumber (BOOL)
</ins><span class="cx"> 
</span><span class="cx"> typedef NS_ENUM(NSUInteger, WKNavigationType) {
</span><span class="cx">     WKNavigationTypeLinkClicked,
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -443,9 +443,10 @@
</span><span class="cx">         this, /* clientInfo */
</span><span class="cx">         0, /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
</span><span class="cx">         0, /* decidePolicyForNewWindowAction */
</span><ins>+        0, /* decidePolicyForResponse_deprecatedForUseWithV0 */
+        0, /* unableToImplementPolicy */
+        decidePolicyForNavigationAction,
</ins><span class="cx">         0, /* decidePolicyForResponse */
</span><del>-        0, /* unableToImplementPolicy */
-        decidePolicyForNavigationAction
</del><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     inspectorPage-&gt;initializePolicyClient(&amp;policyClient);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -2462,7 +2462,7 @@
</span><span class="cx">         listener-&gt;use();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceResponse&amp; response, const ResourceRequest&amp; request, uint64_t listenerID, CoreIPC::MessageDecoder&amp; decoder)
</del><ins>+void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceResponse&amp; response, const ResourceRequest&amp; request, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&amp; decoder)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;API::Object&gt; userData;
</span><span class="cx">     WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
</span><span class="lines">@@ -2476,11 +2476,11 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebFramePolicyListenerProxy&gt; listener = frame-&gt;setUpPolicyListenerProxy(listenerID);
</span><span class="cx"> 
</span><del>-    if (!m_policyClient.decidePolicyForResponse(this, frame, response, request, listener.get(), userData.get()))
</del><ins>+    if (!m_policyClient.decidePolicyForResponse(this, frame, response, request, canShowMIMEType, listener.get(), userData.get()))
</ins><span class="cx">         listener-&gt;use();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::decidePolicyForResponseSync(uint64_t frameID, const ResourceResponse&amp; response, const ResourceRequest&amp; request, uint64_t listenerID, CoreIPC::MessageDecoder&amp; decoder, bool&amp; receivedPolicyAction, uint64_t&amp; policyAction, uint64_t&amp; downloadID)
</del><ins>+void WebPageProxy::decidePolicyForResponseSync(uint64_t frameID, const ResourceResponse&amp; response, const ResourceRequest&amp; request, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&amp; decoder, bool&amp; receivedPolicyAction, uint64_t&amp; policyAction, uint64_t&amp; downloadID)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!m_inDecidePolicyForResponseSync);
</span><span class="cx"> 
</span><span class="lines">@@ -2488,7 +2488,7 @@
</span><span class="cx">     m_decidePolicyForResponseRequest = &amp;request;
</span><span class="cx">     m_syncMimeTypePolicyActionIsValid = false;
</span><span class="cx"> 
</span><del>-    decidePolicyForResponse(frameID, response, request, listenerID, decoder);
</del><ins>+    decidePolicyForResponse(frameID, response, request, canShowMIMEType, listenerID, decoder);
</ins><span class="cx"> 
</span><span class="cx">     m_inDecidePolicyForResponseSync = false;
</span><span class="cx">     m_decidePolicyForResponseRequest = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -791,8 +791,8 @@
</span><span class="cx"> 
</span><span class="cx">     void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, uint64_t originatingFrameID, const WebCore::ResourceRequest&amp;, uint64_t listenerID, CoreIPC::MessageDecoder&amp;, bool&amp; receivedPolicyAction, uint64_t&amp; policyAction, uint64_t&amp; downloadID);
</span><span class="cx">     void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&amp;, const String&amp; frameName, uint64_t listenerID, CoreIPC::MessageDecoder&amp;);
</span><del>-    void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, uint64_t listenerID, CoreIPC::MessageDecoder&amp;);
-    void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, uint64_t listenerID, CoreIPC::MessageDecoder&amp;, bool&amp; receivedPolicyAction, uint64_t&amp; policyAction, uint64_t&amp; downloadID);
</del><ins>+    void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&amp;);
+    void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, bool canShowMIMEType, uint64_t listenerID, CoreIPC::MessageDecoder&amp;, bool&amp; receivedPolicyAction, uint64_t&amp; policyAction, uint64_t&amp; downloadID);
</ins><span class="cx">     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&amp;, CoreIPC::MessageDecoder&amp;);
</span><span class="cx"> 
</span><span class="cx">     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector&lt;std::pair&lt;String, String&gt;&gt;&amp; textFieldValues, uint64_t listenerID, CoreIPC::MessageDecoder&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     # Policy messages
</span><del>-    DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -&gt; (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
</del><ins>+    DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -&gt; (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
</ins><span class="cx">     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) -&gt; (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
</span><span class="cx">     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
</span><span class="cx">     UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)  Variadic
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPolicyClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebPolicyClient.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -60,15 +60,19 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPolicyClient::decidePolicyForResponse(WebPageProxy* page, WebFrameProxy* frame, const ResourceResponse&amp; resourceResponse, const ResourceRequest&amp; resourceRequest, WebFramePolicyListenerProxy* listener, API::Object* userData)
</del><ins>+bool WebPolicyClient::decidePolicyForResponse(WebPageProxy* page, WebFrameProxy* frame, const ResourceResponse&amp; resourceResponse, const ResourceRequest&amp; resourceRequest, bool canShowMIMEType, WebFramePolicyListenerProxy* listener, API::Object* userData)
</ins><span class="cx"> {
</span><del>-    if (!m_client.decidePolicyForResponse)
</del><ins>+    if (!m_client.decidePolicyForResponse_deprecatedForUseWithV0 &amp;&amp; !m_client.decidePolicyForResponse)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebURLResponse&gt; response = WebURLResponse::create(resourceResponse);
</span><span class="cx">     RefPtr&lt;WebURLRequest&gt; request = WebURLRequest::create(resourceRequest);
</span><span class="cx"> 
</span><del>-    m_client.decidePolicyForResponse(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.clientInfo);
</del><ins>+    if (m_client.decidePolicyForResponse_deprecatedForUseWithV0)
+        m_client.decidePolicyForResponse_deprecatedForUseWithV0(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), toAPI(listener), toAPI(userData), m_client.clientInfo);
+    else
+        m_client.decidePolicyForResponse(toAPI(page), toAPI(frame), toAPI(response.get()), toAPI(request.get()), canShowMIMEType, toAPI(listener), toAPI(userData), m_client.clientInfo);
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPolicyClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPolicyClient.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPolicyClient.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/WebPolicyClient.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> public:
</span><span class="cx">     bool decidePolicyForNavigationAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, WebFrameProxy* originatingFrame, const WebCore::ResourceRequest&amp;, WebFramePolicyListenerProxy*, API::Object* userData);
</span><span class="cx">     bool decidePolicyForNewWindowAction(WebPageProxy*, WebFrameProxy*, WebCore::NavigationType, WebEvent::Modifiers, WebMouseEvent::Button, const WebCore::ResourceRequest&amp;, const String&amp; frameName, WebFramePolicyListenerProxy*, API::Object* userData);
</span><del>-    bool decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, WebFramePolicyListenerProxy*, API::Object* userData);
</del><ins>+    bool decidePolicyForResponse(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceResponse&amp;, const WebCore::ResourceRequest&amp;, bool canShowMIMEType, WebFramePolicyListenerProxy*, API::Object* userData);
</ins><span class="cx">     void unableToImplementPolicy(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&amp;, API::Object* userData);
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflPagePolicyClientEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     policyClient-&gt;m_view-&gt;smartCallback&lt;NewWindowPolicyDecision&gt;().call(decision.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* /*clientInfo*/)
</del><ins>+void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* /*clientInfo*/)
</ins><span class="cx"> {
</span><span class="cx">     // Ignore responses with an HTTP status code of 204 (No Content)
</span><span class="cx">     if (WKURLResponseHTTPStatusCode(response) == WebCore::HTTPNoContent) {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflPagePolicyClientEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> private:
</span><span class="cx">     static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKFrameRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
</span><span class="cx">     static void decidePolicyForNewWindowAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKStringRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
</span><del>-    static void decidePolicyForResponseCallback(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
</del><ins>+    static void decidePolicyForResponseCallback(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef, WKTypeRef, const void*);
</ins><span class="cx"> 
</span><span class="cx">     EwkView* m_view;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -638,13 +638,15 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    bool canShowMIMEType = webPage-&gt;canShowMIMEType(response.mimeType());
+
</ins><span class="cx">     uint64_t listenerID = m_frame-&gt;setUpPolicyListener(std::move(function));
</span><span class="cx">     bool receivedPolicyAction;
</span><span class="cx">     uint64_t policyAction;
</span><span class="cx">     uint64_t downloadID;
</span><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><del>-    if (!webPage-&gt;sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame-&gt;frameID(), response, request, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID)))
</del><ins>+    if (!webPage-&gt;sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame-&gt;frameID(), response, request, canShowMIMEType, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID)))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // We call this synchronously because CFNetwork can only convert a loading connection to a download from its didReceiveResponse callback.
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Tools/ChangeLog        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2013-11-16  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        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.
+
+        * 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:
+
</ins><span class="cx"> 2013-11-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Checkmarks are shifted down on iPhone at build.webkit.org/dashboard
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacWK2BrowserWindowControllerm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx">     WKFramePolicyListenerUse(listener);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</del><ins>+static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</ins><span class="cx"> {
</span><span class="cx">     WKFramePolicyListenerUse(listener);
</span><span class="cx"> }
</span><span class="lines">@@ -672,9 +672,10 @@
</span><span class="cx">         self,       /* clientInfo */
</span><span class="cx">         0,          /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
</span><span class="cx">         decidePolicyForNewWindowAction,
</span><del>-        decidePolicyForResponse,
</del><ins>+        0,          /* decidePolicyForResponse_deprecatedForUseWithV */
</ins><span class="cx">         0,          /* unableToImplementPolicy */
</span><span class="cx">         decidePolicyForNavigationAction,
</span><ins>+        decidePolicyForResponse,
</ins><span class="cx">     };
</span><span class="cx">     WKPageSetPagePolicyClient(_webView.pageRef, &amp;policyClient);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2PageLoadBasiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">     WKFramePolicyListenerUse(listener);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</del><ins>+static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
</ins><span class="cx"> {
</span><span class="cx">     WKFramePolicyListenerUse(listener);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -490,9 +490,10 @@
</span><span class="cx">         this,
</span><span class="cx">         0, // decidePolicyForNavigationAction_deprecatedForUseWithV0
</span><span class="cx">         0, // decidePolicyForNewWindowAction
</span><del>-        decidePolicyForResponse,
</del><ins>+        0, // decidePolicyForResponse_deprecatedForUseWithV0
</ins><span class="cx">         0, // unableToImplementPolicy
</span><span class="cx">         decidePolicyForNavigationAction,
</span><ins>+        decidePolicyForResponse,
</ins><span class="cx">     };
</span><span class="cx">     WKPageSetPagePolicyClient(m_mainWebView-&gt;page(), &amp;pagePolicyClient);
</span><span class="cx"> 
</span><span class="lines">@@ -1232,7 +1233,7 @@
</span><span class="cx">     WKFramePolicyListenerUse(listener);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
</del><ins>+void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
</ins><span class="cx"> {
</span><span class="cx">     static_cast&lt;TestController*&gt;(const_cast&lt;void*&gt;(clientInfo))-&gt;decidePolicyForResponse(frame, response, listener);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (159386 => 159387)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2013-11-17 18:25:34 UTC (rev 159386)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2013-11-17 20:30:43 UTC (rev 159387)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">     static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKFrameRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
</span><span class="cx">     void decidePolicyForNavigationAction(WKFramePolicyListenerRef);
</span><span class="cx"> 
</span><del>-    static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
</del><ins>+    static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, bool canShowMIMEType, WKFramePolicyListenerRef, WKTypeRef, const void*);
</ins><span class="cx">     void decidePolicyForResponse(WKFrameRef, WKURLResponseRef, WKFramePolicyListenerRef);
</span><span class="cx"> 
</span><span class="cx">     static WKPageRef createOtherPage(WKPageRef oldPage, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*);
</span></span></pre>
</div>
</div>

</body>
</html>