diff options
Diffstat (limited to 'Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp index 34c53cf..dc47923 100644 --- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -842,14 +842,11 @@ void FrameLoaderClientImpl::dispatchShow() webView->client()->show(webView->initialNavigationPolicy()); } -void FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType( +void FrameLoaderClientImpl::dispatchDecidePolicyForResponse( FramePolicyFunction function, - const String& mimeType, + const ResourceResponse& response, const ResourceRequest&) { - const ResourceResponse& response = - m_webFrame->frame()->loader()->activeDocumentLoader()->response(); - PolicyAction action; int statusCode = response.httpStatusCode(); @@ -861,7 +858,7 @@ void FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType( // Downloading is handled by the embedder, but we still get the initial // response so that we can ignore it and clean up properly. action = PolicyIgnore; - } else if (!canShowMIMEType(mimeType)) { + } else if (!canShowMIMEType(response.mimeType())) { // Make sure that we can actually handle this type internally. action = PolicyIgnore; } else { @@ -1135,6 +1132,14 @@ bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem* item) const return false; } +bool FrameLoaderClientImpl::shouldStopLoadingForHistoryItem(HistoryItem* targetItem) const +{ + // Don't stop loading for pseudo-back-forward URLs, since they will get + // translated and then pass through again. + const KURL& url = targetItem->url(); + return !url.protocolIs(backForwardNavigationScheme); +} + void FrameLoaderClientImpl::dispatchDidAddBackForwardItem(HistoryItem*) const { } |