[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
ap at apple.com
ap at apple.com
Wed Mar 17 18:28:38 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit ea23421edb131d207768a5d47f4fafa7e63b6227
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 8 23:52:08 2010 +0000
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=35879
Eliminate m_mightDownloadFromHandle
It was only used on Mac, and unnecessarily complicated the code.
No change in behavior, thus no test.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::loadNow):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::load):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::createResourceHandle):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::ResourceHandle):
(WebCore::ResourceHandle::create):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::start):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 18c5378..37ca7c8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-03-08 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35879
+ Eliminate m_mightDownloadFromHandle
+
+ It was only used on Mac, and unnecessarily complicated the code.
+
+ No change in behavior, thus no test.
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::loadNow):
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::load):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::createResourceHandle):
+ * platform/network/ResourceHandle.cpp:
+ (WebCore::ResourceHandle::ResourceHandle):
+ (WebCore::ResourceHandle::create):
+ * platform/network/ResourceHandle.h:
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start):
+
2010-03-02 Peter Kasting <pkasting at google.com>
Reviewed by Adam Barth.
diff --git a/WebCore/loader/MainResourceLoader.cpp b/WebCore/loader/MainResourceLoader.cpp
index 1992347..28587e2 100644
--- a/WebCore/loader/MainResourceLoader.cpp
+++ b/WebCore/loader/MainResourceLoader.cpp
@@ -517,7 +517,7 @@ bool MainResourceLoader::loadNow(ResourceRequest& r)
else if (shouldLoadEmpty || frameLoader()->representationExistsForURLScheme(url.protocol()))
handleEmptyLoad(url, !shouldLoadEmpty);
else
- m_handle = ResourceHandle::create(r, this, m_frame.get(), false, true, true);
+ m_handle = ResourceHandle::create(r, this, m_frame.get(), false, true);
return false;
}
diff --git a/WebCore/loader/ResourceLoader.cpp b/WebCore/loader/ResourceLoader.cpp
index afa8ad2..69e8633 100644
--- a/WebCore/loader/ResourceLoader.cpp
+++ b/WebCore/loader/ResourceLoader.cpp
@@ -130,7 +130,7 @@ bool ResourceLoader::load(const ResourceRequest& r)
return true;
}
- m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff, true);
+ m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff);
return true;
}
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index c8a485a..526043b 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -443,7 +443,7 @@ PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KUR
}
}
- return ResourceHandle::create(request, this, m_frame, false, true, false);
+ return ResourceHandle::create(request, this, m_frame, false, true);
}
void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const ResourceResponse& response)
diff --git a/WebCore/platform/network/ResourceHandle.cpp b/WebCore/platform/network/ResourceHandle.cpp
index ddee75b..9d995c1 100644
--- a/WebCore/platform/network/ResourceHandle.cpp
+++ b/WebCore/platform/network/ResourceHandle.cpp
@@ -37,18 +37,18 @@ namespace WebCore {
static bool shouldForceContentSniffing;
ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading,
- bool shouldContentSniff, bool mightDownloadFromHandle)
- : d(new ResourceHandleInternal(this, request, client, defersLoading, shouldContentSniff, mightDownloadFromHandle))
+ bool shouldContentSniff)
+ : d(new ResourceHandleInternal(this, request, client, defersLoading, shouldContentSniff))
{
}
PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client,
- Frame* frame, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle)
+ Frame* frame, bool defersLoading, bool shouldContentSniff)
{
if (shouldContentSniff)
shouldContentSniff = shouldContentSniffURL(request.url());
- RefPtr<ResourceHandle> newHandle(adoptRef(new ResourceHandle(request, client, defersLoading, shouldContentSniff, mightDownloadFromHandle)));
+ RefPtr<ResourceHandle> newHandle(adoptRef(new ResourceHandle(request, client, defersLoading, shouldContentSniff)));
if (!request.url().isValid()) {
newHandle->scheduleFailure(InvalidURLFailure);
diff --git a/WebCore/platform/network/ResourceHandle.h b/WebCore/platform/network/ResourceHandle.h
index 59be78f..ff682fb 100644
--- a/WebCore/platform/network/ResourceHandle.h
+++ b/WebCore/platform/network/ResourceHandle.h
@@ -98,7 +98,7 @@ class ResourceHandle : public RefCounted<ResourceHandle>
#endif
{
private:
- ResourceHandle(const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle);
+ ResourceHandle(const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff);
enum FailureType {
BlockedFailure,
@@ -107,7 +107,7 @@ private:
public:
// FIXME: should not need the Frame
- static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, Frame*, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle = false);
+ static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, Frame*, bool defersLoading, bool shouldContentSniff);
static void loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data, Frame* frame);
static bool willLoadFromCache(ResourceRequest&, Frame*);
diff --git a/WebCore/platform/network/ResourceHandleInternal.h b/WebCore/platform/network/ResourceHandleInternal.h
index 799361b..f20f055 100644
--- a/WebCore/platform/network/ResourceHandleInternal.h
+++ b/WebCore/platform/network/ResourceHandleInternal.h
@@ -81,14 +81,13 @@ namespace WebCore {
class ResourceHandleInternal : public Noncopyable {
public:
- ResourceHandleInternal(ResourceHandle* loader, const ResourceRequest& request, ResourceHandleClient* c, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle)
+ ResourceHandleInternal(ResourceHandle* loader, const ResourceRequest& request, ResourceHandleClient* c, bool defersLoading, bool shouldContentSniff)
: m_client(c)
, m_request(request)
, m_lastHTTPMethod(request.httpMethod())
, status(0)
, m_defersLoading(defersLoading)
, m_shouldContentSniff(shouldContentSniff)
- , m_mightDownloadFromHandle(mightDownloadFromHandle)
#if USE(CFNETWORK)
, m_connection(0)
#endif
@@ -160,7 +159,6 @@ namespace WebCore {
bool m_defersLoading;
bool m_shouldContentSniff;
- bool m_mightDownloadFromHandle;
#if USE(CFNETWORK)
RetainPtr<CFURLConnectionRef> m_connection;
#elif PLATFORM(MAC)
diff --git a/WebCore/platform/network/mac/ResourceHandleMac.mm b/WebCore/platform/network/mac/ResourceHandleMac.mm
index b4b5c2e..3af3230 100644
--- a/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -166,17 +166,9 @@ bool ResourceHandle::start(Frame* frame)
isInitializingConnection = YES;
#endif
- id delegate;
-
- if (d->m_mightDownloadFromHandle) {
- ASSERT(!d->m_proxy);
- d->m_proxy = wkCreateNSURLConnectionDelegateProxy();
- [d->m_proxy.get() setDelegate:ResourceHandle::delegate()];
- [d->m_proxy.get() release];
-
- delegate = d->m_proxy.get();
- } else
- delegate = ResourceHandle::delegate();
+ ASSERT(!d->m_proxy);
+ d->m_proxy.adoptNS(wkCreateNSURLConnectionDelegateProxy());
+ [d->m_proxy.get() setDelegate:ResourceHandle::delegate()];
if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty())
#ifndef BUILDING_ON_TIGER
@@ -233,17 +225,17 @@ bool ResourceHandle::start(Frame* frame)
if (d->m_shouldContentSniff || frame->settings()->localFileContentSniffingEnabled())
#ifdef BUILDING_ON_TIGER
- connection = [[NSURLConnection alloc] initWithRequest:d->m_request.nsURLRequest() delegate:delegate];
+ connection = [[NSURLConnection alloc] initWithRequest:d->m_request.nsURLRequest() delegate:d->m_proxy.get()];
#else
- connection = [[NSURLConnection alloc] initWithRequest:d->m_request.nsURLRequest() delegate:delegate startImmediately:NO];
+ connection = [[NSURLConnection alloc] initWithRequest:d->m_request.nsURLRequest() delegate:d->m_proxy.get() startImmediately:NO];
#endif
else {
NSMutableURLRequest *request = [d->m_request.nsURLRequest() mutableCopy];
wkSetNSURLRequestShouldContentSniff(request, NO);
#ifdef BUILDING_ON_TIGER
- connection = [[NSURLConnection alloc] initWithRequest:request delegate:delegate];
+ connection = [[NSURLConnection alloc] initWithRequest:request delegate:d->m_proxy.get()];
#else
- connection = [[NSURLConnection alloc] initWithRequest:request delegate:delegate startImmediately:NO];
+ connection = [[NSURLConnection alloc] initWithRequest:request delegate:d->m_proxy.get() startImmediately:NO];
#endif
[request release];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list