[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

steveblock at google.com steveblock at google.com
Wed Dec 22 17:52:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 87642f19bb212d25e3d6a613f4a71a252968bc44
Author: steveblock at google.com <steveblock at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 1 21:21:18 2010 +0000

    2010-11-30  Steve Block  <steveblock at google.com>
    
            Reviewed by Jeremy Orlow.
    
            Upstream recent changes to WebCore/platform/network/android
            https://bugs.webkit.org/show_bug.cgi?id=50224
    
            Android implementation changes only, no new tests.
    
            * platform/network/NetworkingContext.h:
            * platform/network/android/CookieJarAndroid.cpp:
            (WebCore::setCookies):
            (WebCore::cookies):
            (WebCore::cookieRequestHeaderFieldValue):
            (WebCore::cookiesEnabled):
            * platform/network/android/ProxyServerAndroid.cpp: Added.
            (WebCore::proxyServersForURL):
            * platform/network/android/ResourceHandleAndroid.cpp:
            (WebCore::ResourceHandle::start):
            (WebCore::ResourceHandle::loadResourceSynchronously):
            * platform/network/android/ResourceRequestAndroid.cpp:
            (WebCore::initializeMaximumHTTPConnectionCountPerHost):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2133af0..2e85930 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-11-30  Steve Block  <steveblock at google.com>
+
+        Reviewed by Jeremy Orlow.
+
+        Upstream recent changes to WebCore/platform/network/android
+        https://bugs.webkit.org/show_bug.cgi?id=50224
+
+        Android implementation changes only, no new tests.
+
+        * platform/network/NetworkingContext.h:
+        * platform/network/android/CookieJarAndroid.cpp:
+        (WebCore::setCookies):
+        (WebCore::cookies):
+        (WebCore::cookieRequestHeaderFieldValue):
+        (WebCore::cookiesEnabled):
+        * platform/network/android/ProxyServerAndroid.cpp: Added.
+        (WebCore::proxyServersForURL):
+        * platform/network/android/ResourceHandleAndroid.cpp:
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::loadResourceSynchronously):
+        * platform/network/android/ResourceRequestAndroid.cpp:
+        (WebCore::initializeMaximumHTTPConnectionCountPerHost):
+
 2010-12-01  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/platform/network/NetworkingContext.h b/WebCore/platform/network/NetworkingContext.h
index a7d40dc..e0cb4c5 100644
--- a/WebCore/platform/network/NetworkingContext.h
+++ b/WebCore/platform/network/NetworkingContext.h
@@ -33,6 +33,10 @@ class QNetworkAccessManager;
 
 namespace WebCore {
 
+#if PLATFORM(ANDROID)
+class FrameLoaderClient;
+class MainResourceLoader;
+#endif
 class ResourceError;
 class ResourceRequest;
 
@@ -60,6 +64,11 @@ public:
     virtual ResourceError blockedError(const ResourceRequest&) const = 0;
 #endif
 
+#if PLATFORM(ANDROID)
+    virtual MainResourceLoader* mainResourceLoader() const = 0;
+    virtual FrameLoaderClient* frameLoaderClient() const = 0;
+#endif
+
 protected:
     NetworkingContext() { }
 };
diff --git a/WebCore/platform/network/android/CookieJarAndroid.cpp b/WebCore/platform/network/android/CookieJarAndroid.cpp
index dd324c5..f3b343e 100644
--- a/WebCore/platform/network/android/CookieJarAndroid.cpp
+++ b/WebCore/platform/network/android/CookieJarAndroid.cpp
@@ -31,25 +31,25 @@
 
 namespace WebCore {
 
-void setCookies(Document*, const KURL& url, const String& value)
+void setCookies(Document* document, const KURL& url, const String& value)
 {
-    PlatformBridge::setCookies(url, value);
+    PlatformBridge::setCookies(document, url, value);
 }
 
-String cookies(const Document*, const KURL& url)
+String cookies(const Document* document, const KURL& url)
 {
-    return PlatformBridge::cookies(url);
+    return PlatformBridge::cookies(document, url);
 }
 
-String cookieRequestHeaderFieldValue(const Document*, const KURL& url)
+String cookieRequestHeaderFieldValue(const Document* document, const KURL& url)
 {
     // FIXME: include HttpOnly cookie.
-    return PlatformBridge::cookies(url);
+    return PlatformBridge::cookies(document, url);
 }
 
-bool cookiesEnabled(const Document*)
+bool cookiesEnabled(const Document* document)
 {
-    return PlatformBridge::cookiesEnabled();
+    return PlatformBridge::cookiesEnabled(document);
 }
 
 }
diff --git a/WebCore/platform/network/android/ProxyServerAndroid.cpp b/WebCore/platform/network/android/ProxyServerAndroid.cpp
new file mode 100644
index 0000000..2f813b5
--- /dev/null
+++ b/WebCore/platform/network/android/ProxyServerAndroid.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ProxyServer.h"
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*)
+{
+    notImplemented();
+    return Vector<ProxyServer>();
+}
+
+}
diff --git a/WebCore/platform/network/android/ResourceHandleAndroid.cpp b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
index 39331a3..473e76c 100644
--- a/WebCore/platform/network/android/ResourceHandleAndroid.cpp
+++ b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
@@ -24,7 +24,6 @@
  */
 
 #include "config.h"
-
 #include "ResourceHandle.h"
 
 #include "CachedResourceLoader.h"
@@ -36,6 +35,7 @@
 #include "ResourceHandleClient.h"
 #include "ResourceHandleInternal.h"
 #include "ResourceLoaderAndroid.h"
+#include "Settings.h"
 #include <wtf/text/CString.h>
 
 namespace WebCore {
@@ -48,16 +48,14 @@ ResourceHandle::~ResourceHandle()
 {
 }
 
-bool ResourceHandle::start(Frame* frame)
+bool ResourceHandle::start(NetworkingContext* context)
 {
-    DocumentLoader* documentLoader = frame->loader()->activeDocumentLoader();
-    MainResourceLoader* mainLoader = documentLoader->mainResourceLoader();
-    bool isMainResource = mainLoader && (mainLoader->handle() == this);
-
-    PassRefPtr<ResourceLoaderAndroid> loader = ResourceLoaderAndroid::start(this, d->m_request, frame->loader()->client(), isMainResource, false);
+    MainResourceLoader* mainLoader = context->mainResourceLoader();
+    bool isMainResource = static_cast<void*>(mainLoader) == static_cast<void*>(client());
+    RefPtr<ResourceLoaderAndroid> loader = ResourceLoaderAndroid::start(this, d->m_firstRequest, context->frameLoaderClient(), isMainResource, false);
 
     if (loader) {
-        d->m_loader = loader;
+        d->m_loader = loader.release();
         return true;
     }
 
@@ -101,11 +99,11 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*)
     return ResourceLoaderAndroid::willLoadFromCache(request.url(), formData ? formData->identifier() : 0);
 }
 
-bool ResourceHandle::loadsBlocked() 
+bool ResourceHandle::loadsBlocked()
 {
     // FIXME, need to check whether connection pipe is blocked.
     // return false for now
-    return false; 
+    return false;
 }
 
 // Class to handle synchronized loading of resources.
@@ -140,15 +138,17 @@ private:
     WTF::Vector<char>* m_data;
 };
 
-void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request,
-        StoredCredentials /*storedCredentials*/,
-        ResourceError& error, ResourceResponse& response, WTF::Vector<char>& data,
-        Frame* frame) 
+void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request,
+        StoredCredentials, ResourceError& error, ResourceResponse& response, WTF::Vector<char>& data)
 {
     SyncLoader s(error, response, data);
-    RefPtr<ResourceHandle> h = adoptRef(new ResourceHandle(request, &s, false, false, false));
+    RefPtr<ResourceHandle> h = adoptRef(new ResourceHandle(request, &s, false, false));
     // This blocks until the load is finished.
-    ResourceLoaderAndroid::start(h.get(), request, frame->loader()->client(), false, true);
+    // Use the request owned by the ResourceHandle. This has had the username
+    // and password (if present) stripped from the URL in
+    // ResourceHandleInternal::ResourceHandleInternal(). This matches the
+    // behaviour in the asynchronous case.
+    ResourceLoaderAndroid::start(h.get(), request, context->frameLoaderClient(), false, true);
 }
 
 } // namespace WebCore
diff --git a/WebCore/platform/network/android/ResourceRequestAndroid.cpp b/WebCore/platform/network/android/ResourceRequestAndroid.cpp
index 7f4bccb..00735f3 100644
--- a/WebCore/platform/network/android/ResourceRequestAndroid.cpp
+++ b/WebCore/platform/network/android/ResourceRequestAndroid.cpp
@@ -30,10 +30,17 @@ namespace WebCore {
 
 unsigned initializeMaximumHTTPConnectionCountPerHost()
 {
+#if USE(CHROME_NETWORK_STACK)
+    // The chromium network stack already handles limiting the number of
+    // parallel requests per host, so there's no need to do it here.  Therefore,
+    // this is set to a high value that should never be hit in practice.
+    return 10000;
+#else
     // This is used by the loader to control the number of parallel load
     // requests. Our java framework has 4 threads that can each pipeline up to
     // 5 requests. Use 20 as a maximum number.
     return 20;
+#endif
 }
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list