[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
philn at webkit.org
philn at webkit.org
Wed Dec 22 18:02:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 618f673910ceb8f2683d3a4cf57b5abca16bdc80
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 6 12:31:00 2010 +0000
2010-12-06 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@73357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 07aba96..4a75215 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-06 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-12-06 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index a3ffeb2..09e1ebe 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -550,6 +550,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);
}
@@ -660,8 +663,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;
}
@@ -734,9 +740,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()
@@ -758,7 +783,7 @@ void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const
// FIXME: we should use the ResourceHandle::create method here,
// but it makes us timeout in a couple of tests. See
// https://bugs.webkit.org/show_bug.cgi?id=41823
- RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, &syncLoader, true, false));
+ RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, &syncLoader, false /*defersLoading*/, false /*shouldContentSniff*/));
handle->start(context);
syncLoader.run();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list