[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
philn at webkit.org
philn at webkit.org
Wed Dec 22 16:28:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f878cfce13ed09f944cbedbda23d6bb876b60cfc
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 24 08:24:26 2010 +0000
2010-11-23 Philippe Normand <pnormand at igalia.com>
Reviewed by Martin Robinson.
[soup] implement ResourceHandle::platformSetDefersLoading
https://bugs.webkit.org/show_bug.cgi?id=44158
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading): Implemented
using the soup_session_{,un}pause_message APIs.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9a9acd5..ae314cd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-23 Philippe Normand <pnormand at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [soup] implement ResourceHandle::platformSetDefersLoading
+ https://bugs.webkit.org/show_bug.cgi?id=44158
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::ResourceHandle::platformSetDefersLoading): Implemented
+ using the soup_session_{,un}pause_message APIs.
+
2010-11-22 Abhishek Arya <inferno at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index 0f97867..7a1084e 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -545,6 +545,9 @@ static void sendRequestCallback(GObject* source, GAsyncResult* res, gpointer use
}
}
+ if (d->m_defersLoading)
+ soup_session_pause_message(handle->defaultSession(), d->m_soupMessage.get());
+
g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, READ_BUFFER_SIZE,
G_PRIORITY_DEFAULT, d->m_cancellable.get(), readCallback, 0);
}
@@ -654,8 +657,11 @@ static bool startHttp(ResourceHandle* handle)
if (!soup_message_headers_get_one(soupMessage->request_headers, "Accept"))
soup_message_headers_append(soupMessage->request_headers, "Accept", "*/*");
- d->m_cancellable = adoptPlatformRef(g_cancellable_new());
- webkit_soup_request_send_async(d->m_soupRequest.get(), d->m_cancellable.get(), sendRequestCallback, 0);
+ // Send the request only if it's not been explicitely deferred.
+ if (!d->m_defersLoading) {
+ d->m_cancellable = adoptPlatformRef(g_cancellable_new());
+ webkit_soup_request_send_async(d->m_soupRequest.get(), d->m_cancellable.get(), sendRequestCallback, 0);
+ }
return true;
}
@@ -728,9 +734,28 @@ bool ResourceHandle::supportsBufferedData()
return false;
}
-void ResourceHandle::platformSetDefersLoading(bool)
+void ResourceHandle::platformSetDefersLoading(bool defersLoading)
{
- notImplemented();
+ // Initial implementation of this method was required for bug #44157.
+
+ if (d->m_cancelled)
+ return;
+
+ if (!defersLoading && !d->m_cancellable && d->m_soupRequest.get()) {
+ d->m_cancellable = adoptPlatformRef(g_cancellable_new());
+ webkit_soup_request_send_async(d->m_soupRequest.get(), d->m_cancellable.get(), sendRequestCallback, 0);
+ return;
+ }
+
+ // Only supported for http(s) transfers. Something similar would
+ // probably be needed for data transfers done with GIO.
+ if (!d->m_soupMessage)
+ return;
+
+ if (defersLoading)
+ soup_session_pause_message(defaultSession(), d->m_soupMessage.get());
+ else
+ soup_session_unpause_message(defaultSession(), d->m_soupMessage.get());
}
bool ResourceHandle::loadsBlocked()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list