summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp')
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 6591347..24f97ca 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -494,11 +494,17 @@ void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* dat
if (!m_manualLoader)
loader->commitData(data, length);
+ // If the document is a stand-alone media document, now is the right time to cancel the WebKit load.
+ // FIXME: This code should be shared across all ports. <http://webkit.org/b/48762>.
+ Frame* coreFrame = core(m_webFrame);
+ if (coreFrame->document()->isMediaDocument())
+ loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
+
if (!m_manualLoader)
return;
if (!m_hasSentResponseToPlugin) {
- m_manualLoader->didReceiveResponse(core(m_webFrame)->loader()->documentLoader()->response());
+ m_manualLoader->didReceiveResponse(loader->response());
// didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
// setting up this stream can cause the main document load to be cancelled, setting m_manualLoader
// to null
@@ -514,10 +520,10 @@ void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
// Telling the frame we received some data and passing 0 as the data is our
// way to get work done that is normally done when the first bit of data is
// received, even for the case of a document with no data (like about:blank)
- if (!m_manualLoader) {
- committedLoad(loader, 0, 0);
+ committedLoad(loader, 0, 0);
+
+ if (!m_manualLoader)
return;
- }
m_manualLoader->didFinishLoading();
m_manualLoader = 0;
@@ -741,8 +747,22 @@ void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page*)
m_webFrame->setWebView(webView);
}
-void WebFrameLoaderClient::transferLoadingResourceFromPage(unsigned long, DocumentLoader*, const ResourceRequest&, Page*)
+void WebFrameLoaderClient::transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request, Page* oldPage)
{
+ assignIdentifierToInitialRequest(identifier, loader, request);
+
+ WebView* oldWebView = kit(oldPage);
+ if (!oldWebView)
+ return;
+
+ COMPtr<IWebResourceLoadDelegate> oldResourceLoadDelegate;
+ if (FAILED(oldWebView->resourceLoadDelegate(&oldResourceLoadDelegate)))
+ return;
+
+ COMPtr<IWebResourceLoadDelegatePrivate2> oldResourceLoadDelegatePrivate2(Query, oldResourceLoadDelegate);
+ if (!oldResourceLoadDelegatePrivate2)
+ return;
+ oldResourceLoadDelegatePrivate2->removeIdentifierForRequest(oldWebView, identifier);
}
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer)
@@ -754,8 +774,8 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const Strin
RefPtr<Frame> childFrame = webFrame->init(m_webFrame->webView(), coreFrame->page(), ownerElement);
- coreFrame->tree()->appendChild(childFrame);
childFrame->tree()->setName(name);
+ coreFrame->tree()->appendChild(childFrame);
childFrame->init();
coreFrame->loader()->loadURLIntoChildFrame(URL, referrer, childFrame.get());