<!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>[185876] trunk/Source/WebKit2</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/185876">185876</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2015-06-23 09:45:30 -0700 (Tue, 23 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>&lt;rdar://problem/21342465&gt; Make -[WKWebView _certificateChain] public.
https://bugs.webkit.org/show_bug.cgi?id=145886

Reviewed by Sam Weinig.

* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
PageLoadState::Observer functions to PageLoadStateObserver.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
WebCertificateInfo::create.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.

* UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
state, or an empty array if there is no certificate chain.

* UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.

* UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
functions.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeCertificateInfo): Override to call
-willChangeValueForKey:.
(WebKit::NavigationState::didChangeCertificateInfo): Override to call
-didChangeValueForKey:.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Call the new observer functions
willChangeCertificateInfo and didChangeCertificateInfo.
(WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
in the uncommitted state.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::certificateInfo): Added this getter.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
WebCore::CertificateInfo to WebCertificateInfo.
* UIProcess/WebFrameProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
PageLoadState::didCommitLoad.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCertificateInfoh">trunk/Source/WebKit2/Shared/WebCertificateInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessGroupmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStateh">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStatemm">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageLoadStatecpp">trunk/Source/WebKit2/UIProcess/PageLoadState.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageLoadStateh">trunk/Source/WebKit2/UIProcess/PageLoadState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameProxycpp">trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameProxyh">trunk/Source/WebKit2/UIProcess/WebFrameProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/ChangeLog        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2015-06-23  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        &lt;rdar://problem/21342465&gt; Make -[WKWebView _certificateChain] public.
+        https://bugs.webkit.org/show_bug.cgi?id=145886
+
+        Reviewed by Sam Weinig.
+
+        * Shared/WebCertificateInfo.h:
+        (WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.
+
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
+        PageLoadState::Observer functions to PageLoadStateObserver.
+
+        * UIProcess/API/Cocoa/WKProcessGroup.mm:
+        (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
+        WebCertificateInfo::create.
+
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.
+
+        * UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
+        state, or an empty array if there is no certificate chain.
+
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.
+
+        * UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
+        functions.
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::willChangeCertificateInfo): Override to call
+        -willChangeValueForKey:.
+        (WebKit::NavigationState::didChangeCertificateInfo): Override to call
+        -didChangeValueForKey:.
+
+        * UIProcess/PageLoadState.cpp:
+        (WebKit::PageLoadState::commitChanges): Call the new observer functions
+        willChangeCertificateInfo and didChangeCertificateInfo.
+        (WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
+        in the uncommitted state.
+        * UIProcess/PageLoadState.h:
+        (WebKit::PageLoadState::certificateInfo): Added this getter.
+
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
+        WebCore::CertificateInfo to WebCertificateInfo.
+        * UIProcess/WebFrameProxy.h:
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
+        PageLoadState::didCommitLoad.
+
</ins><span class="cx"> 2015-06-22  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL][CustomProtocol] Do not add duplicated custom scheme
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCertificateInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCertificateInfo.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCertificateInfo.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/Shared/WebCertificateInfo.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -28,15 +28,15 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><span class="cx"> #include &lt;WebCore/CertificateInfo.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><ins>+#include &lt;wtf/Ref.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class WebCertificateInfo : public API::ObjectImpl&lt;API::Object::Type::CertificateInfo&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;WebCertificateInfo&gt; create(const WebCore::CertificateInfo&amp; info)
</del><ins>+    static Ref&lt;WebCertificateInfo&gt; create(const WebCore::CertificateInfo&amp; info)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new WebCertificateInfo(info));
</del><ins>+        return adoptRef(*new WebCertificateInfo(info));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     const WebCore::CertificateInfo&amp; certificateInfo() const { return m_certificateInfo; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -125,6 +125,8 @@
</span><span class="cx">     virtual void didChangeCanGoForward() override { }
</span><span class="cx">     virtual void willChangeNetworkRequestsInProgress() override { }
</span><span class="cx">     virtual void didChangeNetworkRequestsInProgress() override { }
</span><ins>+    virtual void willChangeCertificateInfo() override { }
+    virtual void didChangeCertificateInfo() override { }
</ins><span class="cx"> 
</span><span class="cx">     WKBrowsingContextController *m_controller;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessGroupmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host
</span><span class="cx"> {
</span><del>-    _processPool-&gt;allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</del><ins>+    _processPool-&gt;allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).ptr(), host);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host
</span><span class="cx"> {
</span><del>-    _processPool-&gt;allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</del><ins>+    _processPool-&gt;allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).ptr(), host);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_setCanHandleHTTPSServerTrustEvaluation:(BOOL)value
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -164,6 +164,13 @@
</span><span class="cx">  */
</span><span class="cx"> @property (nonatomic, readonly) BOOL hasOnlySecureContent;
</span><span class="cx"> 
</span><ins>+/*! @abstract An array of SecCertificateRef objects forming the certificate
+ chain for the currently committed navigation.
+ @discussion The certificates are ordered from leaf (at index 0) to anchor.
+ @link WKWebView @/link is key-value observing (KVO) compliant for this property.
+ */
+@property (nonatomic, readonly, copy) NSArray *certificateChain WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+
</ins><span class="cx"> /*! @abstract A Boolean value indicating whether there is a back item in
</span><span class="cx">  the back-forward list that can be navigated to.
</span><span class="cx">  @discussion @link WKWebView @/link is key-value observing (KVO) compliant
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -517,6 +517,15 @@
</span><span class="cx">     return _page-&gt;pageLoadState().hasOnlySecureContent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSArray *)certificateChain
+{
+    auto certificateInfo = _page-&gt;pageLoadState().certificateInfo();
+    if (!certificateInfo)
+        return @[ ];
+
+    return (NSArray *)certificateInfo-&gt;certificateInfo().certificateChain() ?: @[ ];
+}
+
</ins><span class="cx"> - (BOOL)canGoBack
</span><span class="cx"> {
</span><span class="cx">     return _page-&gt;pageLoadState().canGoBack();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL;
</span><span class="cx"> 
</span><del>-@property (nonatomic, readonly) NSArray *_certificateChain;
</del><ins>+@property (nonatomic, readonly) NSArray *_certificateChain WK_DEPRECATED(10_10, WK_MAC_TBA, 8_0, WK_IOS_TBA, &quot;use -certificateChain&quot;);
</ins><span class="cx"> @property (nonatomic, readonly) NSURL *_committedURL;
</span><span class="cx"> @property (nonatomic, readonly) NSString *_MIMEType;
</span><span class="cx"> @property (nonatomic, readonly) NSString *_userAgent WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -138,6 +138,8 @@
</span><span class="cx">     virtual void didChangeCanGoForward() override;
</span><span class="cx">     virtual void willChangeNetworkRequestsInProgress() override;
</span><span class="cx">     virtual void didChangeNetworkRequestsInProgress() override;
</span><ins>+    virtual void willChangeCertificateInfo() override;
+    virtual void didChangeCertificateInfo() override;
</ins><span class="cx"> 
</span><span class="cx">     WKWebView *m_webView;
</span><span class="cx">     WeakObjCPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; m_navigationDelegate;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -840,6 +840,16 @@
</span><span class="cx">     [m_webView didChangeValueForKey:@&quot;_networkRequestsInProgress&quot;];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NavigationState::willChangeCertificateInfo()
+{
+    [m_webView willChangeValueForKey:@&quot;certificateChain&quot;];
+}
+
+void NavigationState::didChangeCertificateInfo()
+{
+    [m_webView didChangeValueForKey:@&quot;certificateChain&quot;];
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageLoadStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageLoadState.cpp (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageLoadState.cpp        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/PageLoadState.cpp        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx">     bool hasOnlySecureContentChanged = hasOnlySecureContent(m_committedState) != hasOnlySecureContent(m_uncommittedState);
</span><span class="cx">     bool estimatedProgressChanged = estimatedProgress(m_committedState) != estimatedProgress(m_uncommittedState);
</span><span class="cx">     bool networkRequestsInProgressChanged = m_committedState.networkRequestsInProgress != m_uncommittedState.networkRequestsInProgress;
</span><ins>+    bool certificateInfoChanged = m_committedState.certificateInfo != m_uncommittedState.certificateInfo;
</ins><span class="cx"> 
</span><span class="cx">     if (canGoBackChanged)
</span><span class="cx">         callObserverCallback(&amp;Observer::willChangeCanGoBack);
</span><span class="lines">@@ -118,10 +119,14 @@
</span><span class="cx">         callObserverCallback(&amp;Observer::willChangeEstimatedProgress);
</span><span class="cx">     if (networkRequestsInProgressChanged)
</span><span class="cx">         callObserverCallback(&amp;Observer::willChangeNetworkRequestsInProgress);
</span><ins>+    if (certificateInfoChanged)
+        callObserverCallback(&amp;Observer::willChangeCertificateInfo);
</ins><span class="cx"> 
</span><span class="cx">     m_committedState = m_uncommittedState;
</span><span class="cx"> 
</span><span class="cx">     // The &quot;did&quot; ordering is the reverse of the &quot;will&quot;. This is a requirement of Cocoa Key-Value Observing.
</span><ins>+    if (certificateInfoChanged)
+        callObserverCallback(&amp;Observer::didChangeCertificateInfo);
</ins><span class="cx">     if (networkRequestsInProgressChanged)
</span><span class="cx">         callObserverCallback(&amp;Observer::didChangeNetworkRequestsInProgress);
</span><span class="cx">     if (estimatedProgressChanged)
</span><span class="lines">@@ -267,13 +272,14 @@
</span><span class="cx">     m_uncommittedState.unreachableURL = m_lastUnreachableURL;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageLoadState::didCommitLoad(const Transaction::Token&amp; token, bool hasInsecureContent)
</del><ins>+void PageLoadState::didCommitLoad(const Transaction::Token&amp; token, WebCertificateInfo&amp; certificateInfo, bool hasInsecureContent)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT_UNUSED(token, &amp;token.m_pageLoadState == this);
</span><span class="cx">     ASSERT(m_uncommittedState.state == State::Provisional);
</span><span class="cx"> 
</span><span class="cx">     m_uncommittedState.state = State::Committed;
</span><span class="cx">     m_uncommittedState.hasInsecureContent = hasInsecureContent;
</span><ins>+    m_uncommittedState.certificateInfo = &amp;certificateInfo;
</ins><span class="cx"> 
</span><span class="cx">     m_uncommittedState.url = m_uncommittedState.provisionalURL;
</span><span class="cx">     m_uncommittedState.provisionalURL = String();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageLoadStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageLoadState.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageLoadState.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/PageLoadState.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -26,10 +26,12 @@
</span><span class="cx"> #ifndef PageLoadState_h
</span><span class="cx"> #define PageLoadState_h
</span><span class="cx"> 
</span><ins>+#include &quot;WebCertificateInfo.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+class WebCertificateInfo;
</ins><span class="cx"> class WebPageProxy;
</span><span class="cx"> 
</span><span class="cx"> class PageLoadState {
</span><span class="lines">@@ -70,6 +72,9 @@
</span><span class="cx"> 
</span><span class="cx">         virtual void willChangeNetworkRequestsInProgress() = 0;
</span><span class="cx">         virtual void didChangeNetworkRequestsInProgress() = 0;
</span><ins>+
+        virtual void willChangeCertificateInfo() = 0;
+        virtual void didChangeCertificateInfo() = 0;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     class Transaction {
</span><span class="lines">@@ -123,6 +128,8 @@
</span><span class="cx">     double estimatedProgress() const;
</span><span class="cx">     bool networkRequestsInProgress() const { return m_committedState.networkRequestsInProgress; }
</span><span class="cx"> 
</span><ins>+    WebCertificateInfo* certificateInfo() const { return m_committedState.certificateInfo.get(); }
+
</ins><span class="cx">     const String&amp; pendingAPIRequestURL() const;
</span><span class="cx">     void setPendingAPIRequestURL(const Transaction::Token&amp;, const String&amp;);
</span><span class="cx">     void clearPendingAPIRequestURL(const Transaction::Token&amp;);
</span><span class="lines">@@ -131,7 +138,7 @@
</span><span class="cx">     void didReceiveServerRedirectForProvisionalLoad(const Transaction::Token&amp;, const String&amp; url);
</span><span class="cx">     void didFailProvisionalLoad(const Transaction::Token&amp;);
</span><span class="cx"> 
</span><del>-    void didCommitLoad(const Transaction::Token&amp;, bool hasInsecureContent);
</del><ins>+    void didCommitLoad(const Transaction::Token&amp;, WebCertificateInfo&amp;, bool hasInsecureContent);
</ins><span class="cx">     void didFinishLoad(const Transaction::Token&amp;);
</span><span class="cx">     void didFailLoad(const Transaction::Token&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -191,6 +198,8 @@
</span><span class="cx"> 
</span><span class="cx">         double estimatedProgress;
</span><span class="cx">         bool networkRequestsInProgress;
</span><ins>+
+        RefPtr&lt;WebCertificateInfo&gt; certificateInfo;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     static bool isLoading(const Data&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -139,14 +139,14 @@
</span><span class="cx">     m_frameLoadState.didFailProvisionalLoad();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebFrameProxy::didCommitLoad(const String&amp; contentType, const WebCore::CertificateInfo&amp; certificateInfo)
</del><ins>+void WebFrameProxy::didCommitLoad(const String&amp; contentType, WebCertificateInfo&amp; certificateInfo)
</ins><span class="cx"> {
</span><span class="cx">     m_frameLoadState.didCommitLoad();
</span><span class="cx"> 
</span><span class="cx">     m_title = String();
</span><span class="cx">     m_MIMEType = contentType;
</span><span class="cx">     m_isFrameSet = false;
</span><del>-    m_certificateInfo = WebCertificateInfo::create(certificateInfo);
</del><ins>+    m_certificateInfo = &amp;certificateInfo;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameProxy::didFinishLoad()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.h (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.h        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.h        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -49,10 +49,6 @@
</span><span class="cx">     class Connection;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-namespace WebCore {
-class CertificateInfo;
-}
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx"> class WebCertificateInfo;
</span><span class="cx"> class WebFormSubmissionListenerProxy;
</span><span class="lines">@@ -111,7 +107,7 @@
</span><span class="cx">     void didStartProvisionalLoad(const String&amp; url);
</span><span class="cx">     void didReceiveServerRedirectForProvisionalLoad(const String&amp; url);
</span><span class="cx">     void didFailProvisionalLoad();
</span><del>-    void didCommitLoad(const String&amp; contentType, const WebCore::CertificateInfo&amp;);
</del><ins>+    void didCommitLoad(const String&amp; contentType, WebCertificateInfo&amp;);
</ins><span class="cx">     void didFinishLoad();
</span><span class="cx">     void didFailLoad();
</span><span class="cx">     void didSameDocumentNavigation(const String&amp;); // eg. anchor navigation, session state change.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (185875 => 185876)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-06-23 16:26:08 UTC (rev 185875)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-06-23 16:45:30 UTC (rev 185876)
</span><span class="lines">@@ -2942,8 +2942,9 @@
</span><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx">     bool markPageInsecure = m_treatsSHA1CertificatesAsInsecure &amp;&amp; certificateInfo.containsNonRootSHA1SignedCertificate();
</span><ins>+    Ref&lt;WebCertificateInfo&gt; webCertificateInfo = WebCertificateInfo::create(certificateInfo);
</ins><span class="cx">     if (frame-&gt;isMainFrame())
</span><del>-        m_pageLoadState.didCommitLoad(transaction, markPageInsecure);
</del><ins>+        m_pageLoadState.didCommitLoad(transaction, webCertificateInfo, markPageInsecure);
</ins><span class="cx">     else if (markPageInsecure)
</span><span class="cx">         m_pageLoadState.didDisplayOrRunInsecureContent(transaction);
</span><span class="cx"> 
</span><span class="lines">@@ -2956,7 +2957,7 @@
</span><span class="cx"> 
</span><span class="cx">     clearLoadDependentCallbacks();
</span><span class="cx"> 
</span><del>-    frame-&gt;didCommitLoad(mimeType, certificateInfo);
</del><ins>+    frame-&gt;didCommitLoad(mimeType, webCertificateInfo);
</ins><span class="cx"> 
</span><span class="cx">     if (frame-&gt;isMainFrame()) {
</span><span class="cx">         m_mainFrameHasCustomContentProvider = frameHasCustomContentProvider;
</span></span></pre>
</div>
</div>

</body>
</html>