<!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>[173423] 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/173423">173423</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-09-09 01:19:16 -0700 (Tue, 09 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Pass certificate info as part of ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=136611
Reviewed by Darin Adler.
Source/WebCore:
The current way of passing certificate info separately from ResourceResponse and then jamming it back
is complex and confusing. This patch makes it a true part of the ResourceResponse.
With this patch we also only create and pass the certificate info object for the main resource. It is
a big and complex object and we never look into it for any other resource type.
* WebCore.exp.in:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
Mark initialized for synthetic responses, unitialized for those backed by a platform request.
(WebCore::ResourceResponseBase::initializeCertificateInfo):
Calling this pulls the certificate info out from the platform type.
It shoud only be used for resources that need it.
(WebCore::ResourceResponseBase::certificateInfo):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::platformCertificateInfo):
(WebCore::ResourceResponseBase::platformSuggestedFileName):
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):
Encode and decode certificate info if it is present.
* platform/network/cf/ResourceResponse.h:
* platform/network/mac/CertificateInfo.h:
* platform/network/mac/CertificateInfoMac.mm:
(WebCore::CertificateInfo::CertificateInfo):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::ResourceResponse::setCertificateChain): Deleted.
(WebCore::ResourceResponse::certificateChain): Deleted.
* platform/network/soup/ResourceResponse.h:
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformCertificateInfo):
Source/WebKit2:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Initialize the certificate info only if requested.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Deleted.
Rename didReceiveResponseWithCertificateInfo -> didReceiveResponse as it is now part of the response.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
Request certificate info for the main resource only.
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo):</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="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCoreplatformnetworkmacCertificateInfoMacmm">trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceResponseMacmm">trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceResponseh">trunk/Source/WebCore/platform/network/soup/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceResponseSoupcpp">trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2SharedNetworkNetworkResourceLoadParameterscpp">trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedNetworkNetworkResourceLoadParametersh">trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoaderh">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadermessagesin">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebFramecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkcfCertificateInfoh">trunk/Source/WebCore/platform/network/cf/CertificateInfo.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkmacCertificateInfoh">trunk/Source/WebCore/platform/network/mac/CertificateInfo.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/ChangeLog        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2014-09-08 Antti Koivisto <antti@apple.com>
+
+ Pass certificate info as part of ResourceResponse
+ https://bugs.webkit.org/show_bug.cgi?id=136611
+
+ Reviewed by Darin Adler.
+
+ The current way of passing certificate info separately from ResourceResponse and then jamming it back
+ is complex and confusing. This patch makes it a true part of the ResourceResponse.
+
+ With this patch we also only create and pass the certificate info object for the main resource. It is
+ a big and complex object and we never look into it for any other resource type.
+
+ * WebCore.exp.in:
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::ResourceResponseBase):
+
+ Mark initialized for synthetic responses, unitialized for those backed by a platform request.
+
+ (WebCore::ResourceResponseBase::initializeCertificateInfo):
+
+ Calling this pulls the certificate info out from the platform type.
+ It shoud only be used for resources that need it.
+
+ (WebCore::ResourceResponseBase::certificateInfo):
+ * platform/network/ResourceResponseBase.h:
+ (WebCore::ResourceResponseBase::platformCertificateInfo):
+ (WebCore::ResourceResponseBase::platformSuggestedFileName):
+ (WebCore::ResourceResponseBase::encode):
+ (WebCore::ResourceResponseBase::decode):
+
+ Encode and decode certificate info if it is present.
+
+ * platform/network/cf/ResourceResponse.h:
+ * platform/network/mac/CertificateInfo.h:
+ * platform/network/mac/CertificateInfoMac.mm:
+ (WebCore::CertificateInfo::CertificateInfo):
+ * platform/network/mac/ResourceResponseMac.mm:
+ (WebCore::ResourceResponse::platformCertificateInfo):
+ (WebCore::ResourceResponse::setCertificateChain): Deleted.
+ (WebCore::ResourceResponse::certificateChain): Deleted.
+ * platform/network/soup/ResourceResponse.h:
+ * platform/network/soup/ResourceResponseSoup.cpp:
+ (WebCore::ResourceResponse::platformCertificateInfo):
+
</ins><span class="cx"> 2014-09-09 Mihnea Ovidenie <mihnea@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSSRegions] Use C++11 range-based loops in FlowThreadController
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -491,9 +491,6 @@
</span><span class="cx"> __ZN7WebCore15BackForwardList8capacityEv
</span><span class="cx"> __ZN7WebCore15BackForwardList9goForwardEv
</span><span class="cx"> __ZN7WebCore15BackForwardListC1EPNS_4PageE
</span><del>-__ZN7WebCore15CertificateInfoC1EPK9__CFArray
-__ZN7WebCore15CertificateInfoC1ERKNS_16ResourceResponseE
-__ZN7WebCore15CertificateInfoC1Ev
</del><span class="cx"> __ZN7WebCore15DOMWrapperWorld13clearWrappersEv
</span><span class="cx"> __ZN7WebCore15DOMWrapperWorldD1Ev
</span><span class="cx"> __ZN7WebCore15DatabaseManager10initializeERKN3WTF6StringE
</span><span class="lines">@@ -716,7 +713,6 @@
</span><span class="cx"> __ZN7WebCore16NavigationActionC1ERKNS_15ResourceRequestENS_13FrameLoadTypeEb
</span><span class="cx"> __ZN7WebCore16NavigationActionC1ERKNS_15ResourceRequestENS_14NavigationTypeE
</span><span class="cx"> __ZN7WebCore16NavigationActionC1Ev
</span><del>-__ZN7WebCore16ResourceResponse19setCertificateChainEPK9__CFArray
</del><span class="cx"> __ZN7WebCore16ScriptController10initScriptERNS_15DOMWrapperWorldE
</span><span class="cx"> __ZN7WebCore16ScriptController11createWorldEv
</span><span class="cx"> __ZN7WebCore16ScriptController13executeScriptERKN3WTF6StringEb
</span><span class="lines">@@ -1781,7 +1777,6 @@
</span><span class="cx"> __ZNK7WebCore16HTMLInputElement6isTextEv
</span><span class="cx"> __ZNK7WebCore16IconDatabaseBase12databasePathEv
</span><span class="cx"> __ZNK7WebCore16ResourceResponse13nsURLResponseEv
</span><del>-__ZNK7WebCore16ResourceResponse16certificateChainEv
</del><span class="cx"> __ZNK7WebCore16VisibleSelection17isContentEditableEv
</span><span class="cx"> __ZNK7WebCore16VisibleSelection17isInPasswordFieldEv
</span><span class="cx"> __ZNK7WebCore16VisibleSelection17toNormalizedRangeEv
</span><span class="lines">@@ -1830,11 +1825,13 @@
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase12lastModifiedEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase14httpStatusTextEv
</span><ins>+__ZNK7WebCore20ResourceResponseBase15certificateInfoEv
</ins><span class="cx"> __ZNK7WebCore20ResourceResponseBase15httpHeaderFieldENS_14HTTPHeaderNameE
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase16httpHeaderFieldsEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase16textEncodingNameEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase17suggestedFilenameEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase21expectedContentLengthEv
</span><ins>+__ZNK7WebCore20ResourceResponseBase22includeCertificateInfoEv
</ins><span class="cx"> __ZNK7WebCore20ResourceResponseBase3urlEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase6isHTTPEv
</span><span class="cx"> __ZNK7WebCore20ResourceResponseBase8lazyInitENS0_9InitLevelE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -19798,6 +19798,7 @@
</span><span class="cx"> <ClInclude Include="..\platform\network\SynchronousLoaderClient.h" />
</span><span class="cx"> <CustomBuildStep Include="..\platform\network\cf\AuthenticationCF.h" />
</span><span class="cx"> <CustomBuildStep Include="..\platform\network\cf\AuthenticationChallenge.h" />
</span><ins>+ <CustomBuildStep Include="..\platform\network\cf\CertificateInfo.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\network\cf\DownloadBundle.h" />
</span><span class="cx"> <CustomBuildStep Include="..\platform\network\cf\FormDataStreamCFNet.h" />
</span><span class="cx"> <ClInclude Include="..\platform\network\cf\LoaderRunLoopCF.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -16317,7 +16317,6 @@
</span><span class="cx">                                 514C76420CE9234E007EF3CD /* AuthenticationMac.h */,
</span><span class="cx">                                 514C76430CE9234E007EF3CD /* AuthenticationMac.mm */,
</span><span class="cx">                                 E164A2EB191AE6350010737D /* BlobDataFileReferenceMac.mm */,
</span><del>-                                5F2DBBE8178E336900141486 /* CertificateInfo.h */,
</del><span class="cx">                                 5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */,
</span><span class="cx">                                 E1424C8F164B460B00F32D40 /* CookieJarMac.mm */,
</span><span class="cx">                                 E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */,
</span><span class="lines">@@ -20569,6 +20568,7 @@
</span><span class="cx">                                 7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */,
</span><span class="cx">                                 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */,
</span><span class="cx">                                 7EE6844E12D26E3800E79415 /* AuthenticationChallenge.h */,
</span><ins>+                                5F2DBBE8178E336900141486 /* CertificateInfo.h */,
</ins><span class="cx">                                 7EE6844F12D26E3800E79415 /* CookieJarCFNet.cpp */,
</span><span class="cx">                                 7EE6845012D26E3800E79415 /* CookieStorageCFNet.cpp */,
</span><span class="cx">                                 7EE6845212D26E3800E79415 /* CredentialStorageCFNet.cpp */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">
</span><span class="cx"> ResourceResponseBase::ResourceResponseBase()
</span><span class="cx"> : m_expectedContentLength(0)
</span><ins>+ , m_includesCertificateInfo(false)
</ins><span class="cx"> , m_httpStatusCode(0)
</span><span class="cx"> , m_connectionID(0)
</span><span class="cx"> , m_cacheControlMaxAge(0)
</span><span class="lines">@@ -72,6 +73,7 @@
</span><span class="cx"> , m_mimeType(mimeType)
</span><span class="cx"> , m_expectedContentLength(expectedLength)
</span><span class="cx"> , m_textEncodingName(textEncodingName)
</span><ins>+ , m_includesCertificateInfo(true) // Empty but valid for synthetic responses.
</ins><span class="cx"> , m_httpStatusCode(0)
</span><span class="cx"> , m_connectionID(0)
</span><span class="cx"> , m_cacheControlMaxAge(0)
</span><span class="lines">@@ -205,7 +207,20 @@
</span><span class="cx"> // FIXME: Should invalidate or update platform response if present.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME should compute this on the fly
</del><ins>+void ResourceResponseBase::includeCertificateInfo() const
+{
+ if (m_includesCertificateInfo)
+ return;
+ m_certificateInfo = static_cast<const ResourceResponse*>(this)->platformCertificateInfo();
+ m_includesCertificateInfo = true;
+}
+
+CertificateInfo ResourceResponseBase::certificateInfo() const
+{
+ ASSERT(m_includesCertificateInfo);
+ return m_certificateInfo;
+}
+
</ins><span class="cx"> String ResourceResponseBase::suggestedFilename() const
</span><span class="cx"> {
</span><span class="cx"> return static_cast<const ResourceResponse*>(this)->platformSuggestedFilename();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #ifndef ResourceResponseBase_h
</span><span class="cx"> #define ResourceResponseBase_h
</span><span class="cx">
</span><ins>+#include "CertificateInfo.h"
</ins><span class="cx"> #include "HTTPHeaderMap.h"
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "ResourceLoadTiming.h"
</span><span class="lines">@@ -91,6 +92,9 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool isAttachment() const;
</span><span class="cx"> WEBCORE_EXPORT String suggestedFilename() const;
</span><ins>+
+ void includeCertificateInfo() const;
+ CertificateInfo certificateInfo() 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">@@ -139,11 +143,11 @@
</span><span class="cx">
</span><span class="cx"> void lazyInit(InitLevel) const;
</span><span class="cx">
</span><del>- // The ResourceResponse subclass may "shadow" this method to lazily initialize platform specific fields
</del><ins>+ // The ResourceResponse subclass should shadow these functions to lazily initialize platform specific fields
</ins><span class="cx"> void platformLazyInit(InitLevel) { }
</span><del>- String platformSuggestedFileName() { return String(); }
</del><ins>+ CertificateInfo platformCertificateInfo() const { return CertificateInfo(); };
+ String platformSuggestedFileName() const { return String(); }
</ins><span class="cx">
</span><del>- // The ResourceResponse subclass may "shadow" this method to compare platform specific fields
</del><span class="cx"> static bool platformCompare(const ResourceResponse&, const ResourceResponse&) { return true; }
</span><span class="cx">
</span><span class="cx"> URL m_url;
</span><span class="lines">@@ -154,6 +158,9 @@
</span><span class="cx"> HTTPHeaderMap m_httpHeaderFields;
</span><span class="cx"> mutable ResourceLoadTiming m_resourceLoadTiming;
</span><span class="cx">
</span><ins>+ mutable bool m_includesCertificateInfo;
+ mutable CertificateInfo m_certificateInfo;
+
</ins><span class="cx"> int m_httpStatusCode;
</span><span class="cx"> unsigned m_connectionID;
</span><span class="cx">
</span><span class="lines">@@ -206,6 +213,9 @@
</span><span class="cx"> encoder << m_resourceLoadTiming;
</span><span class="cx"> encoder << m_httpStatusCode;
</span><span class="cx"> encoder << m_connectionID;
</span><ins>+ encoder << m_includesCertificateInfo;
+ if (m_includesCertificateInfo)
+ encoder << m_certificateInfo;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<class Decoder>
</span><span class="lines">@@ -240,6 +250,12 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(response.m_connectionID))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(response.m_includesCertificateInfo))
+ return false;
+ if (response.m_includesCertificateInfo) {
+ if (!decoder.decode(response.m_certificateInfo))
+ return false;
+ }
</ins><span class="cx"> response.m_isNull = false;
</span><span class="cx">
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfCertificateInfohfromrev173372trunkSourceWebCoreplatformnetworkmacCertificateInfoh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/network/cf/CertificateInfo.h (from rev 173372, trunk/Source/WebCore/platform/network/mac/CertificateInfo.h) (0 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/CertificateInfo.h         (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/CertificateInfo.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CertificateInfo_h
+#define CertificateInfo_h
+
+#include <wtf/RetainPtr.h>
+
+namespace WebCore {
+
+class CertificateInfo {
+public:
+ CertificateInfo() { }
+ CertificateInfo(RetainPtr<CFArrayRef> certificateChain)
+ : m_certificateChain(certificateChain)
+ { }
+
+ void setCertificateChain(CFArrayRef certificateChain) { m_certificateChain = certificateChain; }
+ CFArrayRef certificateChain() const { return m_certificateChain.get(); }
+
+#ifndef NDEBUG
+ void dump() const;
+#endif
+
+private:
+ RetainPtr<CFArrayRef> m_certificateChain;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponse.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -92,11 +92,6 @@
</span><span class="cx"> WEBCORE_EXPORT NSURLResponse *nsURLResponse() const;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA) || USE(CFNETWORK)
- WEBCORE_EXPORT void setCertificateChain(CFArrayRef);
- WEBCORE_EXPORT RetainPtr<CFArrayRef> certificateChain() const;
-#endif
-
</del><span class="cx"> bool platformResponseIsUpToDate() const { return m_platformResponseIsUpToDate; }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -104,6 +99,8 @@
</span><span class="cx">
</span><span class="cx"> void platformLazyInit(InitLevel);
</span><span class="cx"> String platformSuggestedFilename() const;
</span><ins>+ CertificateInfo platformCertificateInfo() const;
+
</ins><span class="cx"> PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
</span><span class="cx"> void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -121,10 +118,6 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> mutable RetainPtr<NSURLResponse> m_nsResponse;
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(COCOA) || USE(CFNETWORK)
- // Certificate chain is normally part of NS/CFURLResponse, but there is no way to re-add it to a deserialized response after IPC.
- RetainPtr<CFArrayRef> m_externalCertificateChain;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCertificateInfoh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/network/mac/CertificateInfo.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CertificateInfo.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/mac/CertificateInfo.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CertificateInfo_h
-#define CertificateInfo_h
-
-#include <WebCore/ResourceResponse.h>
-#include <wtf/RetainPtr.h>
-
-namespace WebCore {
-
-class CertificateInfo {
-public:
- WEBCORE_EXPORT CertificateInfo();
- WEBCORE_EXPORT explicit CertificateInfo(const ResourceResponse&);
- WEBCORE_EXPORT explicit CertificateInfo(CFArrayRef certificateChain);
-
- void setCertificateChain(CFArrayRef certificateChain) { m_certificateChain = certificateChain; }
- CFArrayRef certificateChain() const { return m_certificateChain.get(); }
-
-#ifndef NDEBUG
- void dump() const;
-#endif
-
-private:
- RetainPtr<CFArrayRef> m_certificateChain;
-};
-
-} // namespace WebKit
-
-#endif // CertificateInfo_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCertificateInfoMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -28,20 +28,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-CertificateInfo::CertificateInfo()
-{
-}
-
-CertificateInfo::CertificateInfo(const ResourceResponse& response)
- : m_certificateChain(response.certificateChain())
-{
-}
-
-CertificateInfo::CertificateInfo(CFArrayRef certificateChain)
- : m_certificateChain(certificateChain)
-{
-}
-
</del><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> void CertificateInfo::dump() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceResponseMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -172,6 +172,12 @@
</span><span class="cx"> m_initLevel = initLevel;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+CertificateInfo ResourceResponse::platformCertificateInfo() const
+{
+ ASSERT(m_nsResponse);
+ return CertificateInfo(adoptCF(wkCopyNSURLResponseCertificateChain(m_nsResponse.get())));
+}
+
</ins><span class="cx"> String ResourceResponse::platformSuggestedFilename() const
</span><span class="cx"> {
</span><span class="cx"> return [nsURLResponse() suggestedFilename];
</span><span class="lines">@@ -184,23 +190,5 @@
</span><span class="cx">
</span><span class="cx"> #endif // USE(CFNETWORK)
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA) || USE(CFNETWORK)
-
-void ResourceResponse::setCertificateChain(CFArrayRef certificateChain)
-{
- ASSERT(!m_nsResponse || !wkCopyNSURLResponseCertificateChain(m_nsResponse.get()));
- m_externalCertificateChain = certificateChain;
-}
-
-RetainPtr<CFArrayRef> ResourceResponse::certificateChain() const
-{
- if (m_externalCertificateChain)
- return m_externalCertificateChain;
-
- return adoptCF(wkCopyNSURLResponseCertificateChain(nsURLResponse()));
-}
-
-#endif // PLATFORM(COCOA) || USE(CFNETWORK)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceResponse.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceResponse.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/soup/ResourceResponse.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -89,6 +89,7 @@
</span><span class="cx">
</span><span class="cx"> void doUpdateResourceResponse() { }
</span><span class="cx"> String platformSuggestedFilename() const;
</span><ins>+ CertificateInfo platformCertificateInfo() const;
</ins><span class="cx">
</span><span class="cx"> PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
</span><span class="cx"> void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceResponseSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -101,6 +101,11 @@
</span><span class="cx"> setExpectedContentLength(soup_message_headers_get_content_length(headers));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+CertificateInfo ResourceResponse::platformCertificateInfo() const
+{
+ return CertificateInfo(m_certificate.get(), m_tlsErrors);
+}
+
</ins><span class="cx"> String ResourceResponse::platformSuggestedFilename() const
</span><span class="cx"> {
</span><span class="cx"> return filenameFromHTTPContentDisposition(httpHeaderField(HTTPHeaderName::ContentDisposition));
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/ChangeLog        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-09-08 Antti Koivisto <antti@apple.com>
+
+ Pass certificate info as part of ResourceResponse
+ https://bugs.webkit.org/show_bug.cgi?id=136611
+
+ Reviewed by Darin Adler.
+
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
+
+ Initialize the certificate info only if requested.
+
+ * WebProcess/Network/WebResourceLoader.cpp:
+ (WebKit::WebResourceLoader::didReceiveResponse):
+ (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Deleted.
+
+ Rename didReceiveResponseWithCertificateInfo -> didReceiveResponse as it is now part of the response.
+
+ * WebProcess/Network/WebResourceLoader.h:
+ * WebProcess/Network/WebResourceLoader.messages.in:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+
+ Request certificate info for the main resource only.
+
+ (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
+ * WebProcess/WebPage/WebFrame.cpp:
+ (WebKit::WebFrame::certificateInfo):
+
</ins><span class="cx"> 2014-09-08 Shivakumar JM <shiva.jm@samsung.com>
</span><span class="cx">
</span><span class="cx"> [WebKit2] Fix build error in WebKit2/WebProcess module
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -97,6 +97,7 @@
</span><span class="cx"> , m_shouldClearReferrerOnHTTPSToHTTPRedirect(parameters.shouldClearReferrerOnHTTPSToHTTPRedirect)
</span><span class="cx"> , m_isLoadingMainResource(parameters.isMainResource)
</span><span class="cx"> , m_defersLoading(parameters.defersLoading)
</span><ins>+ , m_needsCertificateInfo(parameters.needsCertificateInfo)
</ins><span class="cx"> , m_maximumBufferingTime(parameters.maximumBufferingTime)
</span><span class="cx"> , m_bufferingTimer(this, &NetworkResourceLoader::bufferingTimerFired)
</span><span class="cx"> , m_sandboxExtensionsAreConsumed(false)
</span><span class="lines">@@ -221,10 +222,13 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT_UNUSED(handle, handle == m_handle);
</span><span class="cx">
</span><ins>+ if (m_needsCertificateInfo)
+ response.includeCertificateInfo();
+
</ins><span class="cx"> if (isSynchronous())
</span><span class="cx"> m_synchronousLoadData->m_response = response;
</span><span class="cx"> else
</span><del>- sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, CertificateInfo(response), isLoadingMainResource()));
</del><ins>+ sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponse(response, isLoadingMainResource()));
</ins><span class="cx">
</span><span class="cx"> // m_handle will be null if the request got aborted above.
</span><span class="cx"> if (!m_handle)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -193,6 +193,7 @@
</span><span class="cx"> bool m_shouldClearReferrerOnHTTPSToHTTPRedirect;
</span><span class="cx"> bool m_isLoadingMainResource;
</span><span class="cx"> bool m_defersLoading;
</span><ins>+ bool m_needsCertificateInfo;
</ins><span class="cx"> const std::chrono::milliseconds m_maximumBufferingTime;
</span><span class="cx">
</span><span class="cx"> WebCore::Timer<NetworkResourceLoader> m_bufferingTimer;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNetworkNetworkResourceLoadParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> , shouldClearReferrerOnHTTPSToHTTPRedirect(true)
</span><span class="cx"> , isMainResource(false)
</span><span class="cx"> , defersLoading(false)
</span><ins>+ , needsCertificateInfo(false)
</ins><span class="cx"> , maximumBufferingTime(0_ms)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -95,6 +96,7 @@
</span><span class="cx"> encoder << shouldClearReferrerOnHTTPSToHTTPRedirect;
</span><span class="cx"> encoder << isMainResource;
</span><span class="cx"> encoder << defersLoading;
</span><ins>+ encoder << needsCertificateInfo;
</ins><span class="cx"> encoder << maximumBufferingTime;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -146,6 +148,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.defersLoading))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(result.needsCertificateInfo))
+ return false;
</ins><span class="cx"> if (!decoder.decode(result.maximumBufferingTime))
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNetworkNetworkResourceLoadParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx"> bool shouldClearReferrerOnHTTPSToHTTPRedirect;
</span><span class="cx"> bool isMainResource;
</span><span class="cx"> bool defersLoading;
</span><ins>+ bool needsCertificateInfo;
</ins><span class="cx"> std::chrono::milliseconds maximumBufferingTime;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -173,6 +173,7 @@
</span><span class="cx"> loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = shouldClearReferrerOnHTTPSToHTTPRedirect;
</span><span class="cx"> loadParameters.isMainResource = resource && resource->type() == CachedResource::MainResource;
</span><span class="cx"> loadParameters.defersLoading = resourceLoader->defersLoading();
</span><ins>+ loadParameters.needsCertificateInfo = loadParameters.isMainResource;
</ins><span class="cx"> loadParameters.maximumBufferingTime = maximumBufferingTime(resource);
</span><span class="cx">
</span><span class="cx"> ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == DoNotAskClientForAnyCredentials);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -102,33 +102,23 @@
</span><span class="cx"> m_coreLoader->didSendData(bytesSent, totalBytesToBeSent);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const CertificateInfo& certificateInfo, bool needsContinueDidReceiveResponseMessage)
</del><ins>+void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, bool needsContinueDidReceiveResponseMessage)
</ins><span class="cx"> {
</span><span class="cx"> LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponseWithCertificateInfo for '%s'. Status %d.", m_coreLoader->url().string().utf8().data(), response.httpStatusCode());
</span><span class="cx">
</span><span class="cx"> Ref<WebResourceLoader> protect(*this);
</span><span class="cx">
</span><del>- ResourceResponse responseCopy(response);
-
- // FIXME: This should use CertificateInfo to avoid the platform ifdefs. See https://bugs.webkit.org/show_bug.cgi?id=124724.
-#if PLATFORM(COCOA)
- responseCopy.setCertificateChain(certificateInfo.certificateChain());
-#elif USE(SOUP)
- responseCopy.setSoupMessageCertificate(certificateInfo.certificate());
- responseCopy.setSoupMessageTLSErrors(certificateInfo.tlsErrors());
-#endif
-
- if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(m_coreLoader.get(), responseCopy))
</del><ins>+ if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(m_coreLoader.get(), response))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> // Refrain from calling didReceiveResponse if QuickLook will convert this response, since the MIME type of the
</span><span class="cx"> // converted resource isn't yet known. WebResourceLoaderQuickLookDelegate will later call didReceiveResponse upon
</span><span class="cx"> // receiving the converted data.
</span><del>- m_coreLoader->documentLoader()->setQuickLookHandle(QuickLookHandle::create(resourceLoader(), responseCopy.nsURLResponse()));
</del><ins>+ m_coreLoader->documentLoader()->setQuickLookHandle(QuickLookHandle::create(resourceLoader(), response.nsURLResponse()));
</ins><span class="cx"> if (!m_coreLoader->documentLoader()->quickLookHandle())
</span><span class="cx"> #endif
</span><del>- m_coreLoader->didReceiveResponse(responseCopy);
</del><ins>+ m_coreLoader->didReceiveResponse(response);
</ins><span class="cx">
</span><span class="cx"> // If m_coreLoader becomes null as a result of the didReceiveResponse callback, we can't use the send function().
</span><span class="cx"> if (!m_coreLoader)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">
</span><span class="cx"> void willSendRequest(const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
</span><span class="cx"> void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
</span><del>- void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const WebCore::CertificateInfo&, bool needsContinueDidReceiveResponseMessage);
</del><ins>+ void didReceiveResponse(const WebCore::ResourceResponse&, bool needsContinueDidReceiveResponseMessage);
</ins><span class="cx"> void didReceiveData(const IPC::DataReference&, int64_t encodedDataLength);
</span><span class="cx"> void didFinishResourceLoad(double finishTime);
</span><span class="cx"> void didFailResourceLoad(const WebCore::ResourceError&);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -26,10 +26,9 @@
</span><span class="cx">
</span><span class="cx"> CancelResourceLoader()
</span><span class="cx">
</span><del>- // FIXME (NetworkProcess): We'll need much more granularity for response messages.
</del><span class="cx"> WillSendRequest(WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
</span><span class="cx"> DidSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent)
</span><del>- DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebCore::CertificateInfo certificateInfo, bool needsContinueDidReceiveResponseMessage)
</del><ins>+ DidReceiveResponse(WebCore::ResourceResponse response, bool needsContinueDidReceiveResponseMessage)
</ins><span class="cx"> DidReceiveData(IPC::DataReference data, int64_t encodedDataLength)
</span><span class="cx"> DidFinishResourceLoad(double finishTime)
</span><span class="cx"> DidFailResourceLoad(WebCore::ResourceError error)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -455,7 +455,7 @@
</span><span class="cx">
</span><span class="cx"> // Notify the UIProcess.
</span><span class="cx">
</span><del>- webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), CertificateInfo(documentLoader.response()), InjectedBundleUserMessageEncoder(userData.get())));
</del><ins>+ webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), documentLoader.response().certificateInfo(), InjectedBundleUserMessageEncoder(userData.get())));
</ins><span class="cx"> webPage->didCommitLoad(m_frame);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (173422 => 173423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-09-09 07:57:10 UTC (rev 173422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-09-09 08:19:16 UTC (rev 173423)
</span><span class="lines">@@ -417,7 +417,7 @@
</span><span class="cx"> if (!documentLoader)
</span><span class="cx"> return CertificateInfo();
</span><span class="cx">
</span><del>- return CertificateInfo(documentLoader->response());
</del><ins>+ return documentLoader->response().certificateInfo();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebFrame::innerText() const
</span></span></pre>
</div>
</div>
</body>
</html>