diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp index 1eae26753..36cd6c0e6 100644 --- a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp +++ b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp @@ -21,7 +21,6 @@ #include "config.h" #include "WebKitLoaderClient.h" -#include "WebKit2GtkAuthenticationDialog.h" #include "WebKitBackForwardListPrivate.h" #include "WebKitURIResponsePrivate.h" #include "WebKitWebViewBasePrivate.h" @@ -57,8 +56,11 @@ static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef f GOwnPtr<GError> webError(g_error_new_literal(g_quark_from_string(resourceError.domain().utf8().data()), resourceError.errorCode(), resourceError.localizedDescription().utf8().data())); - webkitWebViewLoadFailed(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_LOAD_STARTED, - resourceError.failingURL().utf8().data(), webError.get()); + if (resourceError.tlsErrors()) { + webkitWebViewLoadFailedWithTLSErrors(WEBKIT_WEB_VIEW(clientInfo), resourceError.failingURL().utf8().data(), webError.get(), + static_cast<GTlsCertificateFlags>(resourceError.tlsErrors()), resourceError.certificate()); + } else + webkitWebViewLoadFailed(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_LOAD_STARTED, resourceError.failingURL().utf8().data(), webError.get()); } static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) @@ -106,6 +108,16 @@ static void didReceiveTitleForFrame(WKPageRef page, WKStringRef titleRef, WKFram webkitWebViewSetTitle(WEBKIT_WEB_VIEW(clientInfo), toImpl(titleRef)->string().utf8()); } +static void didDisplayInsecureContentForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) +{ + webkitWebViewInsecureContentDetected(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_INSECURE_CONTENT_DISPLAYED); +} + +static void didRunInsecureContentForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) +{ + webkitWebViewInsecureContentDetected(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_INSECURE_CONTENT_RUN); +} + static void didChangeProgress(WKPageRef page, const void* clientInfo) { webkitWebViewSetEstimatedLoadProgress(WEBKIT_WEB_VIEW(clientInfo), WKPageGetEstimatedProgress(page)); @@ -121,6 +133,11 @@ static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef webkitWebViewHandleAuthenticationChallenge(WEBKIT_WEB_VIEW(clientInfo), toImpl(authenticationChallenge)); } +static void processDidCrash(WKPageRef page, const void* clientInfo) +{ + webkitWebViewWebProcessCrashed(WEBKIT_WEB_VIEW(clientInfo)); +} + void attachLoaderClientToView(WebKitWebView* webView) { WKPageLoaderClient wkLoaderClient = { @@ -138,8 +155,8 @@ void attachLoaderClientToView(WebKitWebView* webView) 0, // didFirstLayoutForFrame 0, // didFirstVisuallyNonEmptyLayoutForFrame 0, // didRemoveFrameFromHierarchy - 0, // didDisplayInsecureContentForFrame - 0, // didRunInsecureContentForFrame + didDisplayInsecureContentForFrame, + didRunInsecureContentForFrame, 0, // canAuthenticateAgainstProtectionSpaceInFrame didReceiveAuthenticationChallengeInFrame, didChangeProgress, // didStartProgress @@ -147,7 +164,7 @@ void attachLoaderClientToView(WebKitWebView* webView) didChangeProgress, // didFinishProgress 0, // didBecomeUnresponsive 0, // didBecomeResponsive - 0, // processDidCrash + processDidCrash, didChangeBackForwardList, 0, // shouldGoToBackForwardListItem 0, // didFailToInitializePlugin @@ -155,10 +172,12 @@ void attachLoaderClientToView(WebKitWebView* webView) 0, // didFirstVisuallyNonEmptyLayoutForFrame 0, // willGoToBackForwardListItem 0, // interactionOccurredWhileProcessUnresponsive - 0, // pluginDidFail + 0, // pluginDidFail_deprecatedForUseWithV1 0, // didReceiveIntentForFrame 0, // registerIntentServiceForFrame 0, // didLayout + 0, // pluginLoadPolicy + 0, // pluginDidFail }; WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView))); WKPageSetPageLoaderClient(wkPage, &wkLoaderClient); |