diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-16 14:51:15 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-16 14:51:15 +0200 |
commit | 4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 (patch) | |
tree | 7bb9ad7e31c24d1cf1707e03e6f1a80f6d033951 /Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp | |
parent | 3977e3d2f72f7fe2c887c1ec0e0c342e1d169f42 (diff) | |
download | qtwebkit-4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26.tar.gz |
Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676)
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp index e30e51d46..8cd149c5b 100644 --- a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp +++ b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp @@ -22,6 +22,7 @@ #include "WebKitLoaderClient.h" #include "WebKitBackForwardListPrivate.h" +#include "WebKitURIResponsePrivate.h" #include "WebKitWebViewBasePrivate.h" #include "WebKitWebViewPrivate.h" #include <wtf/gobject/GOwnPtr.h> @@ -64,7 +65,16 @@ static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef us if (!WKFrameIsMainFrame(frame)) return; - webkitWebViewLoadChanged(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_LOAD_COMMITTED); + WebKitWebView* webView = WEBKIT_WEB_VIEW(clientInfo); + WebKitWebResource* resource = webkit_web_view_get_main_resource(webView); + if (resource) { + // We might not have a resource if this load is a content replacement. + // FIXME: For some reason, when going back/forward this callback is emitted even before + // didInitiateLoadForResource(), so we don't have a main resource at this point either. + webkitURIResponseSetCertificateInfo(webkit_web_resource_get_response(resource), WKFrameGetCertificateInfo(frame)); + } + + webkitWebViewLoadChanged(webView, WEBKIT_LOAD_COMMITTED); } static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) |