<!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>[173272] trunk/Source</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/173272">173272</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-09-04 13:00:11 -0700 (Thu, 04 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove ResourceResponse::m_suggestedFilename
https://bugs.webkit.org/show_bug.cgi?id=136534

Reviewed by Alexey Proskuryakov.

Source/WebCore:

This will simplify things.

* WebCore.exp.in:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::handleSubstituteDataLoadNow):
(WebCore::DocumentLoader::maybeLoadEmpty):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willLoadMediaElementURL):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCache):
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::create):
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
(WebCore::BlobResourceHandle::notifyResponseOnError):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
(WebCore::ResourceResponseBase::suggestedFilename):
(WebCore::ResourceResponseBase::httpStatusText):
(WebCore::ResourceResponseBase::setHTTPStatusText):
(WebCore::ResourceResponseBase::httpHeaderField):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::addHTTPHeaderField):
(WebCore::ResourceResponseBase::httpHeaderFields):
(WebCore::ResourceResponseBase::isAttachment):
(WebCore::ResourceResponseBase::wasCached):
(WebCore::ResourceResponseBase::connectionReused):
(WebCore::ResourceResponseBase::setConnectionReused):
(WebCore::ResourceResponseBase::connectionID):
(WebCore::ResourceResponseBase::setConnectionID):

    Remove AllFields initialization. It was only used to get m_suggestedFilename.
    Rename CommonAndUncommonFields to AllFields

(WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.

    No more setter.

* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::platformSuggestedFileName):

    Get the suggested filename from the platform class on-demand.

* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):

    Remove never-used file name constructor parameter.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):

    Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).

(WebCore::ResourceResponse::platformLazyInit):

    Don't pull the suggested filename anymore.

(WebCore::ResourceResponse::platformSuggestedFilename):

    Get the suggested name from the (possibly synthetic) NSURLRequest.

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;ResourceResponse&gt;::encode):
(IPC::ArgumentCoder&lt;ResourceResponse&gt;::decode):

    No more m_suggestedFilename.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::addArchiveResource):

    Fake the suggested filename by using the Content-Disposition header.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheStoragecpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderarchiveArchiveResourcecpp">trunk/Source/WebCore/loader/archive/ArchiveResource.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobResourceHandlecpp">trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBasecpp">trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBaseh">trunk/Source/WebCore/platform/network/ResourceResponseBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseh">trunk/Source/WebCore/platform/network/cf/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceResponseMacmm">trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm</a></li>
<li><a href="#trunkSourceWebCorepluginsPluginStreamcpp">trunk/Source/WebCore/plugins/PluginStream.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/ChangeLog        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2014-09-04  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Remove ResourceResponse::m_suggestedFilename
+        https://bugs.webkit.org/show_bug.cgi?id=136534
+
+        Reviewed by Alexey Proskuryakov.
+
+        This will simplify things.
+
+        * WebCore.exp.in:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
+        (WebCore::DocumentLoader::maybeLoadEmpty):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::willLoadMediaElementURL):
+        * loader/appcache/ApplicationCacheStorage.cpp:
+        (WebCore::ApplicationCacheStorage::loadCache):
+        * loader/archive/ArchiveResource.cpp:
+        (WebCore::ArchiveResource::create):
+        * platform/network/BlobResourceHandle.cpp:
+        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
+        (WebCore::BlobResourceHandle::notifyResponseOnError):
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::ResourceResponseBase):
+        (WebCore::ResourceResponseBase::adopt):
+        (WebCore::ResourceResponseBase::copyData):
+        (WebCore::ResourceResponseBase::suggestedFilename):
+        (WebCore::ResourceResponseBase::httpStatusText):
+        (WebCore::ResourceResponseBase::setHTTPStatusText):
+        (WebCore::ResourceResponseBase::httpHeaderField):
+        (WebCore::ResourceResponseBase::setHTTPHeaderField):
+        (WebCore::ResourceResponseBase::addHTTPHeaderField):
+        (WebCore::ResourceResponseBase::httpHeaderFields):
+        (WebCore::ResourceResponseBase::isAttachment):
+        (WebCore::ResourceResponseBase::wasCached):
+        (WebCore::ResourceResponseBase::connectionReused):
+        (WebCore::ResourceResponseBase::setConnectionReused):
+        (WebCore::ResourceResponseBase::connectionID):
+        (WebCore::ResourceResponseBase::setConnectionID):
+
+            Remove AllFields initialization. It was only used to get m_suggestedFilename.
+            Rename CommonAndUncommonFields to AllFields
+
+        (WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.
+
+            No more setter.
+
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::platformSuggestedFileName):
+
+            Get the suggested filename from the platform class on-demand.
+
+        * platform/network/cf/ResourceResponse.h:
+        (WebCore::ResourceResponse::ResourceResponse):
+
+            Remove never-used file name constructor parameter.
+
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        (WebCore::ResourceResponse::platformLazyInit):
+        * platform/network/mac/ResourceResponseMac.mm:
+        (WebCore::ResourceResponse::initNSURLResponse):
+
+            Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).
+
+        (WebCore::ResourceResponse::platformLazyInit):
+
+            Don't pull the suggested filename anymore.
+
+        (WebCore::ResourceResponse::platformSuggestedFilename):
+
+            Get the suggested name from the (possibly synthetic) NSURLRequest.
+
</ins><span class="cx"> 2014-09-04  Eva Balazsfalvi  &lt;evab.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove CSS_FILTERS flag
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -878,7 +878,6 @@
</span><span class="cx"> __ZN7WebCore20ResourceResponseBase17setHTTPStatusTextERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore20ResourceResponseBase18setHTTPHeaderFieldERKN3WTF6StringES4_
</span><span class="cx"> __ZN7WebCore20ResourceResponseBase19setTextEncodingNameERKN3WTF6StringE
</span><del>-__ZN7WebCore20ResourceResponseBase20setSuggestedFilenameERKN3WTF6StringE
</del><span class="cx"> __ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
</span><span class="cx"> __ZN7WebCore20ResourceResponseBase6setURLERKNS_3URLE
</span><span class="cx"> __ZN7WebCore20ResourceResponseBaseC2Ev
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx">     URL url = m_substituteData.responseURL();
</span><span class="cx">     if (url.isEmpty())
</span><span class="cx">         url = m_request.url();
</span><del>-    ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()-&gt;size(), m_substituteData.textEncoding(), &quot;&quot;);
</del><ins>+    ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()-&gt;size(), m_substituteData.textEncoding());
</ins><span class="cx">     responseReceived(0, response);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1385,7 +1385,7 @@
</span><span class="cx">     if (m_request.url().isEmpty() &amp;&amp; !frameLoader()-&gt;stateMachine().creatingInitialEmptyDocument())
</span><span class="cx">         m_request.setURL(blankURL());
</span><span class="cx">     String mimeType = shouldLoadEmpty ? &quot;text/html&quot; : frameLoader()-&gt;client().generatedMIMETypeForURLScheme(m_request.url().protocol());
</span><del>-    m_response = ResourceResponse(m_request.url(), mimeType, 0, String(), String());
</del><ins>+    m_response = ResourceResponse(m_request.url(), mimeType, 0, String());
</ins><span class="cx">     finishedLoading(monotonicallyIncreasingTime());
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -1513,7 +1513,7 @@
</span><span class="cx">     unsigned long identifier;
</span><span class="cx">     ResourceError error;
</span><span class="cx">     requestFromDelegate(request, identifier, error);
</span><del>-    notifier().sendRemainingDelegateMessages(m_documentLoader.get(), identifier, request, ResourceResponse(url, String(), -1, String(), String()), 0, -1, -1, error);
</del><ins>+    notifier().sendRemainingDelegateMessages(m_documentLoader.get(), identifier, request, ResourceResponse(url, String(), -1, String()), 0, -1, -1, error);
</ins><span class="cx"> 
</span><span class="cx">     url = request.url();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -1159,7 +1159,7 @@
</span><span class="cx">         String mimeType = cacheStatement.getColumnText(3);
</span><span class="cx">         String textEncodingName = cacheStatement.getColumnText(4);
</span><span class="cx">         
</span><del>-        ResourceResponse response(url, mimeType, size, textEncodingName, &quot;&quot;);
</del><ins>+        ResourceResponse response(url, mimeType, size, textEncodingName);
</ins><span class="cx">         response.setHTTPStatusCode(httpStatusCode);
</span><span class="cx"> 
</span><span class="cx">         String headers = cacheStatement.getColumnText(5);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderarchiveArchiveResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/archive/ArchiveResource.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/archive/ArchiveResource.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/loader/archive/ArchiveResource.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     if (response.isNull()) {
</span><span class="cx">         unsigned dataSize = data-&gt;size();
</span><span class="cx">         return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName,
</span><del>-            ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
</del><ins>+            ResourceResponse(url, mimeType, dataSize, textEncoding)));
</ins><span class="cx">     }
</span><span class="cx">     return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobResourceHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -596,7 +596,7 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     bool isRangeRequest = m_rangeOffset != positionNotSpecified;
</span><del>-    ResourceResponse response(firstRequest().url(), m_blobData-&gt;contentType(), m_totalRemainingSize, String(), String());
</del><ins>+    ResourceResponse response(firstRequest().url(), m_blobData-&gt;contentType(), m_totalRemainingSize, String());
</ins><span class="cx">     response.setExpectedContentLength(m_totalRemainingSize);
</span><span class="cx">     response.setHTTPStatusCode(isRangeRequest ? httpPartialContent : httpOK);
</span><span class="cx">     response.setHTTPStatusText(isRangeRequest ? httpPartialContentText : httpOKText);
</span><span class="lines">@@ -617,7 +617,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_errorCode);
</span><span class="cx"> 
</span><del>-    ResourceResponse response(firstRequest().url(), &quot;text/plain&quot;, 0, String(), String());
</del><ins>+    ResourceResponse response(firstRequest().url(), &quot;text/plain&quot;, 0, String());
</ins><span class="cx">     switch (m_errorCode) {
</span><span class="cx">     case rangeError:
</span><span class="cx">         response.setHTTPStatusCode(httpRequestedRangeNotSatisfiable);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -67,12 +67,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ResourceResponseBase::ResourceResponseBase(const URL&amp; url, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName, const String&amp; filename)
</del><ins>+ResourceResponseBase::ResourceResponseBase(const URL&amp; url, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName)
</ins><span class="cx">     : m_url(url)
</span><span class="cx">     , m_mimeType(mimeType)
</span><span class="cx">     , m_expectedContentLength(expectedLength)
</span><span class="cx">     , m_textEncodingName(textEncodingName)
</span><del>-    , m_suggestedFilename(filename)
</del><span class="cx">     , m_httpStatusCode(0)
</span><span class="cx">     , m_connectionID(0)
</span><span class="cx">     , m_cacheControlMaxAge(0)
</span><span class="lines">@@ -101,12 +100,11 @@
</span><span class="cx">     response-&gt;setMimeType(data-&gt;m_mimeType);
</span><span class="cx">     response-&gt;setExpectedContentLength(data-&gt;m_expectedContentLength);
</span><span class="cx">     response-&gt;setTextEncodingName(data-&gt;m_textEncodingName);
</span><del>-    response-&gt;setSuggestedFilename(data-&gt;m_suggestedFilename);
</del><span class="cx"> 
</span><span class="cx">     response-&gt;setHTTPStatusCode(data-&gt;m_httpStatusCode);
</span><span class="cx">     response-&gt;setHTTPStatusText(data-&gt;m_httpStatusText);
</span><span class="cx"> 
</span><del>-    response-&gt;lazyInit(CommonAndUncommonFields);
</del><ins>+    response-&gt;lazyInit(AllFields);
</ins><span class="cx">     response-&gt;m_httpHeaderFields.adopt(WTF::move(data-&gt;m_httpHeaders));
</span><span class="cx">     response-&gt;m_resourceLoadTiming = data-&gt;m_resourceLoadTiming;
</span><span class="cx">     response-&gt;doPlatformAdopt(data);
</span><span class="lines">@@ -120,7 +118,6 @@
</span><span class="cx">     data-&gt;m_mimeType = mimeType().isolatedCopy();
</span><span class="cx">     data-&gt;m_expectedContentLength = expectedContentLength();
</span><span class="cx">     data-&gt;m_textEncodingName = textEncodingName().isolatedCopy();
</span><del>-    data-&gt;m_suggestedFilename = suggestedFilename().isolatedCopy();
</del><span class="cx">     data-&gt;m_httpStatusCode = httpStatusCode();
</span><span class="cx">     data-&gt;m_httpStatusText = httpStatusText().isolatedCopy();
</span><span class="cx">     data-&gt;m_httpHeaders = httpHeaderFields().copyData();
</span><span class="lines">@@ -209,24 +206,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME should compute this on the fly
</span><del>-const String&amp; ResourceResponseBase::suggestedFilename() const
</del><ins>+String ResourceResponseBase::suggestedFilename() const
</ins><span class="cx"> {
</span><del>-    lazyInit(AllFields);
-
-    return m_suggestedFilename;
</del><ins>+    return static_cast&lt;const ResourceResponse*&gt;(this)-&gt;platformSuggestedFilename();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ResourceResponseBase::setSuggestedFilename(const String&amp; suggestedName)
-{
-    lazyInit(AllFields);
-    m_isNull = false;
-
-    // FIXME: Suggested file name is calculated based on other headers. There should not be a setter for it.
-    m_suggestedFilename = suggestedName; 
-
-    // FIXME: Should invalidate or update platform response if present.
-}
-
</del><span class="cx"> int ResourceResponseBase::httpStatusCode() const
</span><span class="cx"> {
</span><span class="cx">     lazyInit(CommonFieldsOnly);
</span><span class="lines">@@ -245,14 +229,14 @@
</span><span class="cx"> 
</span><span class="cx"> const String&amp; ResourceResponseBase::httpStatusText() const 
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_httpStatusText; 
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::setHTTPStatusText(const String&amp; statusText) 
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     m_httpStatusText = statusText; 
</span><span class="cx"> 
</span><span class="lines">@@ -268,7 +252,7 @@
</span><span class="cx">     if (!value.isEmpty())        
</span><span class="cx">         return value;
</span><span class="cx"> 
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_httpHeaderFields.get(name); 
</span><span class="cx"> }
</span><span class="lines">@@ -282,7 +266,7 @@
</span><span class="cx">     if (!value.isEmpty())
</span><span class="cx">         return value;
</span><span class="cx"> 
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_httpHeaderFields.get(name); 
</span><span class="cx"> }
</span><span class="lines">@@ -318,7 +302,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::setHTTPHeaderField(const String&amp; name, const String&amp; value)
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     HTTPHeaderName headerName;
</span><span class="cx">     if (findHTTPHeaderName(name, headerName))
</span><span class="lines">@@ -331,7 +315,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::setHTTPHeaderField(HTTPHeaderName name, const String&amp; value)
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     updateHeaderParsedState(name);
</span><span class="cx"> 
</span><span class="lines">@@ -342,7 +326,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::addHTTPHeaderField(const String&amp; name, const String&amp; value)
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     HTTPHeaderName headerName;
</span><span class="cx">     if (findHTTPHeaderName(name, headerName))
</span><span class="lines">@@ -353,7 +337,7 @@
</span><span class="cx"> 
</span><span class="cx"> const HTTPHeaderMap&amp; ResourceResponseBase::httpHeaderFields() const
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_httpHeaderFields;
</span><span class="cx"> }
</span><span class="lines">@@ -508,7 +492,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool ResourceResponseBase::isAttachment() const
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     String value = m_httpHeaderFields.get(HTTPHeaderName::ContentDisposition);
</span><span class="cx">     size_t loc = value.find(';');
</span><span class="lines">@@ -521,7 +505,7 @@
</span><span class="cx">   
</span><span class="cx"> bool ResourceResponseBase::wasCached() const
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_wasCached;
</span><span class="cx"> }
</span><span class="lines">@@ -533,28 +517,28 @@
</span><span class="cx"> 
</span><span class="cx"> bool ResourceResponseBase::connectionReused() const
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_connectionReused;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::setConnectionReused(bool connectionReused)
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     m_connectionReused = connectionReused;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned ResourceResponseBase::connectionID() const
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     return m_connectionID;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponseBase::setConnectionID(unsigned connectionID)
</span><span class="cx"> {
</span><del>-    lazyInit(CommonAndUncommonFields);
</del><ins>+    lazyInit(AllFields);
</ins><span class="cx"> 
</span><span class="cx">     m_connectionID = connectionID;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -67,11 +67,6 @@
</span><span class="cx">     WEBCORE_EXPORT const String&amp; textEncodingName() const;
</span><span class="cx">     WEBCORE_EXPORT void setTextEncodingName(const String&amp; name);
</span><span class="cx"> 
</span><del>-    // FIXME: Should compute this on the fly.
-    // There should not be a setter exposed, as suggested file name is determined based on other headers in a manner that WebCore does not necessarily know about.
-    WEBCORE_EXPORT const String&amp; suggestedFilename() const;
-    WEBCORE_EXPORT void setSuggestedFilename(const String&amp;);
-
</del><span class="cx">     WEBCORE_EXPORT int httpStatusCode() const;
</span><span class="cx">     WEBCORE_EXPORT void setHTTPStatusCode(int);
</span><span class="cx">     
</span><span class="lines">@@ -95,6 +90,7 @@
</span><span class="cx">     bool isMultipart() const { return mimeType() == &quot;multipart/x-mixed-replace&quot;; }
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool isAttachment() const;
</span><ins>+    WEBCORE_EXPORT String suggestedFilename() const;
</ins><span class="cx">     
</span><span class="cx">     // These functions return parsed values of the corresponding response headers.
</span><span class="cx">     // NaN means that the header was not present or had invalid value.
</span><span class="lines">@@ -132,17 +128,17 @@
</span><span class="cx">     enum InitLevel {
</span><span class="cx">         Uninitialized,
</span><span class="cx">         CommonFieldsOnly,
</span><del>-        CommonAndUncommonFields,
</del><span class="cx">         AllFields
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT ResourceResponseBase();
</span><del>-    ResourceResponseBase(const URL&amp; url, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName, const String&amp; filename);
</del><ins>+    ResourceResponseBase(const URL&amp;, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName);
</ins><span class="cx"> 
</span><span class="cx">     void lazyInit(InitLevel) const;
</span><span class="cx"> 
</span><span class="cx">     // The ResourceResponse subclass may &quot;shadow&quot; this method to lazily initialize platform specific fields
</span><span class="cx">     void platformLazyInit(InitLevel) { }
</span><ins>+    String platformSuggestedFileName() { return String(); }
</ins><span class="cx"> 
</span><span class="cx">     // The ResourceResponse subclass may &quot;shadow&quot; this method to compare platform specific fields
</span><span class="cx">     static bool platformCompare(const ResourceResponse&amp;, const ResourceResponse&amp;) { return true; }
</span><span class="lines">@@ -151,7 +147,6 @@
</span><span class="cx">     AtomicString m_mimeType;
</span><span class="cx">     long long m_expectedContentLength;
</span><span class="cx">     AtomicString m_textEncodingName;
</span><del>-    String m_suggestedFilename;
</del><span class="cx">     AtomicString m_httpStatusText;
</span><span class="cx">     HTTPHeaderMap m_httpHeaderFields;
</span><span class="cx">     mutable ResourceLoadTiming m_resourceLoadTiming;
</span><span class="lines">@@ -199,7 +194,6 @@
</span><span class="cx">     String m_mimeType;
</span><span class="cx">     long long m_expectedContentLength;
</span><span class="cx">     String m_textEncodingName;
</span><del>-    String m_suggestedFilename;
</del><span class="cx">     int m_httpStatusCode;
</span><span class="cx">     String m_httpStatusText;
</span><span class="cx">     std::unique_ptr&lt;CrossThreadHTTPHeaderMapData&gt; m_httpHeaders;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponse.h (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> class ResourceResponse : public ResourceResponseBase {
</span><span class="cx"> public:
</span><span class="cx">     ResourceResponse()
</span><del>-        : m_initLevel(CommonAndUncommonFields)
</del><ins>+        : m_initLevel(AllFields)
</ins><span class="cx">         , m_platformResponseIsUpToDate(true)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -66,9 +66,9 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    ResourceResponse(const URL&amp; url, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName, const String&amp; filename)
-        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
-        , m_initLevel(CommonAndUncommonFields)
</del><ins>+    ResourceResponse(const URL&amp; url, const String&amp; mimeType, long long expectedLength, const String&amp; textEncodingName)
+        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName)
+        , m_initLevel(AllFields)
</ins><span class="cx">         , m_platformResponseIsUpToDate(false)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -103,6 +103,7 @@
</span><span class="cx">     friend class ResourceResponseBase;
</span><span class="cx"> 
</span><span class="cx">     void platformLazyInit(InitLevel);
</span><ins>+    String platformSuggestedFilename() const;
</ins><span class="cx">     PassOwnPtr&lt;CrossThreadResourceResponseData&gt; doPlatformCopyData(PassOwnPtr&lt;CrossThreadResourceResponseData&gt; data) const { return data; }
</span><span class="cx">     void doPlatformAdopt(PassOwnPtr&lt;CrossThreadResourceResponseData&gt;) { }
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">             m_httpStatusCode = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_initLevel &lt; CommonAndUncommonFields &amp;&amp; initLevel &gt;= CommonAndUncommonFields) {
</del><ins>+    if (m_initLevel &lt; AllFields) {
</ins><span class="cx">         CFHTTPMessageRef httpResponse = CFURLResponseGetHTTPResponse(m_cfResponse.get());
</span><span class="cx">         if (httpResponse) {
</span><span class="cx">             RetainPtr&lt;CFStringRef&gt; statusLine = adoptCF(CFHTTPMessageCopyResponseStatusLine(httpResponse));
</span><span class="lines">@@ -107,15 +107,16 @@
</span><span class="cx">                 m_httpHeaderFields.set((CFStringRef)keys[i], (CFStringRef)values[i]);
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
-    if (m_initLevel &lt; AllFields &amp;&amp; initLevel &gt;= AllFields) {
-        RetainPtr&lt;CFStringRef&gt; suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(m_cfResponse.get()));
-        m_suggestedFilename = suggestedFilename.get();
-    }
</del><span class="cx"> 
</span><span class="cx">     m_initLevel = initLevel;
</span><span class="cx"> }
</span><del>-    
</del><ins>+
+String ResourceResponse::platformSuggestedFilename() const
+{
+    RetainPtr&lt;CFStringRef&gt; suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(m_cfResponse.get()));
+    return suggestedFilename.get();
+}
+
</ins><span class="cx"> bool ResourceResponse::platformCompare(const ResourceResponse&amp; a, const ResourceResponse&amp; b)
</span><span class="cx"> {
</span><span class="cx">     // CFEqual crashes if you pass it 0 so do an early check before calling it.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceResponseMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -45,18 +45,24 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceResponse::initNSURLResponse() const
</span><span class="cx"> {
</span><del>-    // Work around a mistake in the NSURLResponse class - &lt;rdar://problem/6875219&gt;.
-    // The init function takes an NSInteger, even though the accessor returns a long long.
-    // For values that won't fit in an NSInteger, pass -1 instead.
-    NSInteger expectedContentLength;
-    if (m_expectedContentLength &lt; 0 || m_expectedContentLength &gt; std::numeric_limits&lt;NSInteger&gt;::max())
-        expectedContentLength = -1;
-    else
-        expectedContentLength = static_cast&lt;NSInteger&gt;(m_expectedContentLength);
</del><ins>+    if (!m_httpStatusCode) {
+        // Work around a mistake in the NSURLResponse class - &lt;rdar://problem/6875219&gt;.
+        // The init function takes an NSInteger, even though the accessor returns a long long.
+        // For values that won't fit in an NSInteger, pass -1 instead.
+        NSInteger expectedContentLength;
+        if (m_expectedContentLength &lt; 0 || m_expectedContentLength &gt; std::numeric_limits&lt;NSInteger&gt;::max())
+            expectedContentLength = -1;
+        else
+            expectedContentLength = static_cast&lt;NSInteger&gt;(m_expectedContentLength);
</ins><span class="cx"> 
</span><del>-    // FIXME: This creates a very incomplete NSURLResponse, which does not even have a status code.
</del><ins>+        m_nsResponse = adoptNS([[NSURLResponse alloc] initWithURL:m_url MIMEType:m_mimeType expectedContentLength:-1 textEncodingName:m_textEncodingName]);
+        return;
+    }
+    NSMutableDictionary* headerDictionary = [NSMutableDictionary dictionary];
+    for (auto&amp; header : m_httpHeaderFields)
+        [headerDictionary setObject:(NSString *)header.value forKey:(NSString *)header.key];
</ins><span class="cx"> 
</span><del>-    m_nsResponse = adoptNS([[NSURLResponse alloc] initWithURL:m_url MIMEType:m_mimeType expectedContentLength:expectedContentLength textEncodingName:m_textEncodingName]);
</del><ins>+    m_nsResponse = adoptNS([[NSHTTPURLResponse alloc] initWithURL:m_url statusCode:m_httpStatusCode HTTPVersion:(NSString*)kCFHTTPVersion1_1 headerFields:headerDictionary]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="lines">@@ -139,7 +145,7 @@
</span><span class="cx">         [pool drain];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_initLevel &lt; CommonAndUncommonFields &amp;&amp; initLevel &gt;= CommonAndUncommonFields) {
</del><ins>+    if (m_initLevel &lt; AllFields) {
</ins><span class="cx">         if ([m_nsResponse.get() isKindOfClass:[NSHTTPURLResponse class]]) {
</span><span class="cx">             NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
</span><span class="cx"> 
</span><span class="lines">@@ -159,14 +165,15 @@
</span><span class="cx">             [pool drain];
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-     
-    if (m_initLevel &lt; AllFields &amp;&amp; initLevel &gt;= AllFields)
-        m_suggestedFilename = [m_nsResponse.get() suggestedFilename];
</del><span class="cx"> 
</span><span class="cx">     m_initLevel = initLevel;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-    
</del><ins>+String ResourceResponse::platformSuggestedFilename() const
+{
+    return [nsURLResponse() suggestedFilename];
+}
+
</ins><span class="cx"> bool ResourceResponse::platformCompare(const ResourceResponse&amp; a, const ResourceResponse&amp; b)
</span><span class="cx"> {
</span><span class="cx">     return a.nsURLResponse() == b.nsURLResponse();
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsPluginStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/PluginStream.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/PluginStream.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebCore/plugins/PluginStream.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PluginStream::sendJavaScriptStream(const URL&amp; requestURL, const CString&amp; resultString)
</span><span class="cx"> {
</span><del>-    didReceiveResponse(0, ResourceResponse(requestURL, &quot;text/plain&quot;, resultString.length(), &quot;&quot;, &quot;&quot;));
</del><ins>+    didReceiveResponse(0, ResourceResponse(requestURL, &quot;text/plain&quot;, resultString.length(), &quot;&quot;));
</ins><span class="cx"> 
</span><span class="cx">     if (m_streamState == StreamStopped)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebKit2/ChangeLog        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-09-04  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Remove ResourceResponse::m_suggestedFilename
+        https://bugs.webkit.org/show_bug.cgi?id=136534
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;ResourceResponse&gt;::encode):
+        (IPC::ArgumentCoder&lt;ResourceResponse&gt;::decode):
+
+            No more m_suggestedFilename.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::addArchiveResource):
+
+            Fake the suggested filename by using the Content-Disposition header.
+
</ins><span class="cx"> 2014-09-04  Eva Balazsfalvi  &lt;evab.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove CSS_FILTERS flag
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -699,7 +699,6 @@
</span><span class="cx">         encoder &lt;&lt; resourceResponse.textEncodingName();
</span><span class="cx">         encoder &lt;&lt; static_cast&lt;int64_t&gt;(resourceResponse.expectedContentLength());
</span><span class="cx">         encoder &lt;&lt; resourceResponse.httpStatusText();
</span><del>-        encoder &lt;&lt; resourceResponse.suggestedFilename();
</del><span class="cx">     }
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="lines">@@ -773,11 +772,6 @@
</span><span class="cx">         if (!decoder.decode(httpStatusText))
</span><span class="cx">             return false;
</span><span class="cx">         response.setHTTPStatusText(httpStatusText);
</span><del>-
-        String suggestedFilename;
-        if (!decoder.decode(suggestedFilename))
-            return false;
-        response.setSuggestedFilename(suggestedFilename);
</del><span class="cx">     }
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (173271 => 173272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-09-04 19:54:54 UTC (rev 173271)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-09-04 20:00:11 UTC (rev 173272)
</span><span class="lines">@@ -809,10 +809,9 @@
</span><span class="cx">     // FIXME: It's a hack to force add a resource to DocumentLoader. PDF documents should just be fetched as CachedResources.
</span><span class="cx"> 
</span><span class="cx">     // Add just enough data for context menu handling and web archives to work.
</span><del>-    ResourceResponse synthesizedResponse;
-    synthesizedResponse.setSuggestedFilename(m_suggestedFilename);
-    synthesizedResponse.setURL(m_sourceURL); // Needs to match the HitTestResult::absolutePDFURL.
-    synthesizedResponse.setMimeType(&quot;application/pdf&quot;);
</del><ins>+    NSDictionary* headers = @{ @&quot;Content-Disposition&quot;: (NSString *)m_suggestedFilename, @&quot;Content-Type&quot; : @&quot;application/pdf&quot; };
+    RetainPtr&lt;NSURLResponse&gt; response = adoptNS([[NSHTTPURLResponse alloc] initWithURL:m_sourceURL statusCode:200 HTTPVersion:(NSString*)kCFHTTPVersion1_1 headerFields:headers]);
+    ResourceResponse synthesizedResponse(response.get());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;ArchiveResource&gt; resource = ArchiveResource::create(SharedBuffer::wrapCFData(m_data.get()), m_sourceURL, &quot;application/pdf&quot;, String(), String(), synthesizedResponse);
</span><span class="cx">     pluginView()-&gt;frame()-&gt;document()-&gt;loader()-&gt;addArchiveResource(resource.release());
</span></span></pre>
</div>
</div>

</body>
</html>