[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 15:20:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d3161aa7812c2e53bd8364c1df0a51a2bcb730ee
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 1 16:50:30 2010 +0000
Cancel main resource loads after we hand them off to the media engine
This is the Windows equivalent of r51104. Clearly this code should be
moved to a cross-platform location someday.
Fixes <http://webkit.org/b/48531> <rdar://problem/8606635> Assertion
failure in DocumentLoader::commitData when loading a media document in
WebKit1 on Windows
Reviewed by Dan Bernstein.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::committedLoad): Cancel the main resource load
after handing off the load to the media engine. This code originally
came from -[WebHTMLRepresentation receivedData:withDataSource:].
* WebFrame.cpp:
(WebFrame::shouldFallBack): Don't fall back when handing the resource
load off to the media engine or a plugin. Added error domain checking
so that we don't rely on error codes being unique.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index ce59419..6af6b3e 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,26 @@
+2010-11-01 Adam Roben <aroben at apple.com>
+
+ Cancel main resource loads after we hand them off to the media engine
+
+ This is the Windows equivalent of r51104. Clearly this code should be
+ moved to a cross-platform location someday.
+
+ Fixes <http://webkit.org/b/48531> <rdar://problem/8606635> Assertion
+ failure in DocumentLoader::commitData when loading a media document in
+ WebKit1 on Windows
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::committedLoad): Cancel the main resource load
+ after handing off the load to the media engine. This code originally
+ came from -[WebHTMLRepresentation receivedData:withDataSource:].
+
+ * WebFrame.cpp:
+ (WebFrame::shouldFallBack): Don't fall back when handing the resource
+ load off to the media engine or a plugin. Added error domain checking
+ so that we don't rely on error codes being unique.
+
2010-10-29 Daniel Bates <dbates at rim.com>
No review, rolling out 70971.
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 6591347..7d5a1cc 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
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 9db6a2a..c1d9c21 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -1718,7 +1718,13 @@ ResourceError WebFrame::pluginWillHandleLoadError(const ResourceResponse& respon
bool WebFrame::shouldFallBack(const ResourceError& error)
{
- return error.errorCode() != WebURLErrorCancelled;
+ if (error.errorCode() == WebURLErrorCancelled && error.domain() == String(WebURLErrorDomain))
+ return false;
+
+ if (error.errorCode() == WebKitErrorPlugInWillHandleLoad && error.domain() == String(WebKitErrorDomain))
+ return false;
+
+ return true;
}
COMPtr<WebFramePolicyListener> WebFrame::setUpPolicyListener(WebCore::FramePolicyFunction function)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list