[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:19:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cb3bc9fbd0f6f7d722c4f31b3418883306f907fb
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jun 16 07:45:25 2002 +0000

    WebCore:
    
    	Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
    	with the one for the frames themselves; this one is for resources.
    
    	* kwq/kio/jobclasses.h:
    	* kwq/KWQKjobclasses.mm:
    	(TransferJob::setHandle): Replaced the old TransferJob::begin with this.
    
    	* kwq/KWQLoaderImpl.h: Remove setClient.
    	* kwq/KWQKloader.mm:
    	(-[WebCoreResourceLoader initWithLoader:job:]): Added.
    	(-[WebCoreResourceLoader dealloc]): Added.
    	(-[WebCoreResourceLoader addData:]): Added.
    	(-[WebCoreResourceLoader cancel]): Added.
    	(-[WebCoreResourceLoader finish]): Added.
    	(KWQLoaderImpl::serveRequest): Use [WebCoreBridge startLoadingResource:withURL:].
    	* khtml/misc/loader.cpp: (Loader::load): Removed unneeded call to setClient.
    
    	* kwq/WebCoreBridge.h: Remove unneeded methods. Added [WebCoreBridge startLoadingResource:withURL:].
    
    WebKit:
    
    	Moved the IFURLHandleClient subclass here from WebCore, so it can some day be merged
    	with the one for the frames themselves; this one is for resources.
    
    	* WebCoreSupport.subproj/IFResourceURLHandleClient.h: Added.
    	* WebCoreSupport.subproj/IFResourceURLHandleClient.m: Added.
    	* WebKit.pbproj/project.pbxproj: Added IFResourceURLHandleClient.h and .m.
    
    	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
    	(-[IFWebCoreBridge startLoadingResource:withURL:]): Added.
    	Removed all the old methods, with their guts moved into IFResourceURLHandleClient.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1384 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e1f365c..852e972 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,24 @@
+2002-06-16  Darin Adler  <darin at apple.com>
+
+	Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
+	with the one for the frames themselves; this one is for resources.
+
+	* kwq/kio/jobclasses.h:
+	* kwq/KWQKjobclasses.mm:
+	(TransferJob::setHandle): Replaced the old TransferJob::begin with this.
+
+	* kwq/KWQLoaderImpl.h: Remove setClient.
+	* kwq/KWQKloader.mm:
+	(-[WebCoreResourceLoader initWithLoader:job:]): Added.
+	(-[WebCoreResourceLoader dealloc]): Added.
+	(-[WebCoreResourceLoader addData:]): Added.
+	(-[WebCoreResourceLoader cancel]): Added.
+	(-[WebCoreResourceLoader finish]): Added.
+	(KWQLoaderImpl::serveRequest): Use [WebCoreBridge startLoadingResource:withURL:].
+	* khtml/misc/loader.cpp: (Loader::load): Removed unneeded call to setClient.
+
+	* kwq/WebCoreBridge.h: Remove unneeded methods. Added [WebCoreBridge startLoadingResource:withURL:].
+
 2002-06-15  Darin Adler  <darin at apple.com>
 
 	Fix frame-related calls. I was always searching all the frames, which was disastrous.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e1f365c..852e972 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,24 @@
+2002-06-16  Darin Adler  <darin at apple.com>
+
+	Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
+	with the one for the frames themselves; this one is for resources.
+
+	* kwq/kio/jobclasses.h:
+	* kwq/KWQKjobclasses.mm:
+	(TransferJob::setHandle): Replaced the old TransferJob::begin with this.
+
+	* kwq/KWQLoaderImpl.h: Remove setClient.
+	* kwq/KWQKloader.mm:
+	(-[WebCoreResourceLoader initWithLoader:job:]): Added.
+	(-[WebCoreResourceLoader dealloc]): Added.
+	(-[WebCoreResourceLoader addData:]): Added.
+	(-[WebCoreResourceLoader cancel]): Added.
+	(-[WebCoreResourceLoader finish]): Added.
+	(KWQLoaderImpl::serveRequest): Use [WebCoreBridge startLoadingResource:withURL:].
+	* khtml/misc/loader.cpp: (Loader::load): Removed unneeded call to setClient.
+
+	* kwq/WebCoreBridge.h: Remove unneeded methods. Added [WebCoreBridge startLoadingResource:withURL:].
+
 2002-06-15  Darin Adler  <darin at apple.com>
 
 	Fix frame-related calls. I was always searching all the frames, which was disastrous.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e1f365c..852e972 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2002-06-16  Darin Adler  <darin at apple.com>
+
+	Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
+	with the one for the frames themselves; this one is for resources.
+
+	* kwq/kio/jobclasses.h:
+	* kwq/KWQKjobclasses.mm:
+	(TransferJob::setHandle): Replaced the old TransferJob::begin with this.
+
+	* kwq/KWQLoaderImpl.h: Remove setClient.
+	* kwq/KWQKloader.mm:
+	(-[WebCoreResourceLoader initWithLoader:job:]): Added.
+	(-[WebCoreResourceLoader dealloc]): Added.
+	(-[WebCoreResourceLoader addData:]): Added.
+	(-[WebCoreResourceLoader cancel]): Added.
+	(-[WebCoreResourceLoader finish]): Added.
+	(KWQLoaderImpl::serveRequest): Use [WebCoreBridge startLoadingResource:withURL:].
+	* khtml/misc/loader.cpp: (Loader::load): Removed unneeded call to setClient.
+
+	* kwq/WebCoreBridge.h: Remove unneeded methods. Added [WebCoreBridge startLoadingResource:withURL:].
+
 2002-06-15  Darin Adler  <darin at apple.com>
 
 	Fix frame-related calls. I was always searching all the frames, which was disastrous.
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index 575625c..f3d3fbc 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -1076,9 +1076,6 @@ Loader::~Loader()
 void Loader::load(DocLoader* dl, CachedObject *object, bool incremental)
 {
     Request *req = new Request(dl, object, incremental);
-#ifdef APPLE_CHANGES
-    d->setClient(req);
-#endif
     m_requestsPending.append(req);
 
 #ifndef APPLE_CHANGES
diff --git a/WebCore/kwq/KWQKJobClasses.h b/WebCore/kwq/KWQKJobClasses.h
index 79be8ff..087db7f 100644
--- a/WebCore/kwq/KWQKJobClasses.h
+++ b/WebCore/kwq/KWQKJobClasses.h
@@ -31,11 +31,8 @@
 #include <qstring.h>
 
 #ifdef __OBJC__
- at protocol IFURLHandleClient;
 @class IFURLHandle;
-typedef id <IFURLHandleClient> IFURLHandleClientPtr;
 #else
-typedef struct IFURLHandleClient IFURLHandleClientPtr;
 class IFURLHandle;
 #endif
 
@@ -63,7 +60,7 @@ public:
     void addMetaData(const QString &key, const QString &value);
     void kill();
 
-    void begin(IFURLHandleClientPtr, void *userData);
+    void setHandle(IFURLHandle *);
     IFURLHandle *handle() const;
     
     NSURL *url() const;
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index ba3b55a..157e067 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -111,14 +111,11 @@ void TransferJob::kill()
     [d->handle cancelLoadInBackground];
 }
 
-void TransferJob::begin(id <IFURLHandleClient> client, void *userData)
+void TransferJob::setHandle(IFURLHandle *handle)
 {
-    NSDictionary *attributes;
-    
-    attributes = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:userData] forKey:IFURLHandleUserData];
-    d->handle = [[IFURLHandle alloc] initWithURL:d->url attributes:attributes flags:0];    
-    [d->handle addClient:client];
-    [d->handle loadInBackground];
+    [handle retain];
+    [d->handle release];
+    d->handle = handle;
 }
 
 IFURLHandle *TransferJob::handle() const
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 2853ab9..b086a89 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -39,126 +39,49 @@ using khtml::DocLoader;
 using khtml::Loader;
 using khtml::Request;
 
- at interface KWQURLLoadClient : NSObject <IFURLHandleClient>
+ at interface WebCoreResourceLoader : NSObject <WebCoreResourceLoader>
 {
-    khtml::Loader *m_loader;
-    WebCoreBridge *m_bridge;
-    NSURL *m_currentURL;
+    khtml::Loader *loader;
+    KIO::TransferJob *job;
 }
 
--(id)initWithLoader:(khtml::Loader *)loader bridge:(WebCoreBridge *)bridge;
+-(id)initWithLoader:(khtml::Loader *)loader job:(KIO::TransferJob *)job;
 
 @end
 
- at implementation KWQURLLoadClient
+ at implementation WebCoreResourceLoader
 
--(id)initWithLoader:(Loader *)loader bridge:(WebCoreBridge *)bridge
+-(id)initWithLoader:(khtml::Loader *)l job:(KIO::TransferJob *)j;
 {
-    if ((self = [super init])) {
-        m_loader = loader;
-        m_bridge = [bridge retain];
-        return self;
-    }
+    [super init];
     
-    return nil;
-}
-
-- (void)dealloc
-{
-    // FIXME Radar 2954901: Changed this not to leak because cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT(m_currentURL == nil);
-#else
-    [m_currentURL release];
-#endif    
-    [m_bridge release];
-    [super dealloc];
-}
-
-- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    KWQ_ASSERT(m_currentURL == nil);
-
-    m_currentURL = [[handle url] retain];
-    [m_bridge didStartLoadingWithHandle:handle];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
-{
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d, contentLength %d, contentLengthReceived %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length], [handle contentLength], [handle contentLengthReceived]);
-
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    m_loader->slotData(job, (const char *)[data bytes], [data length]);
+    loader = l;
+    job = j;
     
-    [m_bridge receivedProgressWithHandle:handle];
+    return self;
 }
 
-- (void)doneWithHandle:(IFURLHandle *)handle error:(BOOL)error
+- (void)dealloc
 {
-    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
-    // since cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#else
-    KWQ_ASSERT(m_currentURL == nil || [m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#endif    
-
-    [m_bridge removeHandle:handle];
-    
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    if (error) {
-        job->setError(1);
-    }
-    m_loader->slotFinished(job);
     delete job;
-    
-    [m_currentURL release];
-    m_currentURL = nil;
+    [super dealloc];
 }
 
-- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+- (void)addData:(NSData *)data
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didCancelLoadingWithHandle:handle];
+    loader->slotData(job, (const char *)[data bytes], [data length]);
 }
 
-- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+- (void)cancel
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length]);
-    
-    KWQ_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
-    KWQ_ASSERT((int)[data length] == [handle contentLengthReceived]);
-
-    [self doneWithHandle:handle error:NO];
-    [m_bridge didFinishLoadingWithHandle:handle];
+    job->setError(1);
+    [self finish];
 }
 
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)result
+- (void)finish
 {
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p, result = %s, URL = %s", m_bridge, DEBUG_OBJECT([result errorDescription]), DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didFailToLoadWithHandle:handle error:result];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "url = %s", DEBUG_OBJECT(URL));
-    
-    KWQ_ASSERT(m_currentURL != nil);
-
-    [m_bridge didRedirectWithHandle:handle fromURL:m_currentURL];
-    [URL retain];
-    [m_currentURL release];
-    m_currentURL = URL;
+    loader->slotFinished(job);
+    job->setHandle(0);
 }
 
 @end
@@ -168,25 +91,17 @@ KWQLoaderImpl::KWQLoaderImpl(Loader *l)
 {
 }
 
-void KWQLoaderImpl::setClient(Request *req)
-{
-    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
-    req->client = [[[KWQURLLoadClient alloc] initWithLoader:loader bridge:bridge] autorelease];
-}
-
-void KWQLoaderImpl::serveRequest(Request *req, KIO::TransferJob *job)
+void KWQLoaderImpl::start(Request *req, KIO::TransferJob *job)
 {
     KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s", 
           req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
     
-    job->begin(req->client, job);
-    if (job->handle() == nil) {
-        // The only error that prevents us from making a handle is a malformed URL.
-        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
-        [req->client->m_bridge didFailBeforeLoadingWithError:error];
-    } else {
-        [req->client->m_bridge addHandle:job->handle()];
-    }
+    WebCoreResourceLoader *resourceLoader = [[WebCoreResourceLoader alloc] initWithLoader:loader job:job];
+    
+    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
+    job->setHandle([bridge startLoadingResource:resourceLoader withURL:job->url()]);
+    
+    [resourceLoader release];
 }
 
 void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
@@ -200,6 +115,6 @@ void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
     
     // FIXME: Are we sure that we can globally notify with the URL as the notification
     // name without conflicting with other frameworks? No "IF" prefix needed?
-    // Maybe the notification should have a distinctive name, and the URL should be the object.
+    // Perhaps the notification should have a distinctive name, and the URL should be the object.
     [[NSNotificationCenter defaultCenter] postNotificationName:urlString object:nil];
 }
diff --git a/WebCore/kwq/KWQLoader.h b/WebCore/kwq/KWQLoader.h
index 91d7379..0df8ff1 100644
--- a/WebCore/kwq/KWQLoader.h
+++ b/WebCore/kwq/KWQLoader.h
@@ -38,7 +38,6 @@ class KWQLoaderImpl
 public:
     KWQLoaderImpl(khtml::Loader *);
     
-    void setClient(khtml::Request *);
     void serveRequest(khtml::Request *, KIO::TransferJob *);
     void objectFinished(khtml::CachedObject *);
 
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 2853ab9..b086a89 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -39,126 +39,49 @@ using khtml::DocLoader;
 using khtml::Loader;
 using khtml::Request;
 
- at interface KWQURLLoadClient : NSObject <IFURLHandleClient>
+ at interface WebCoreResourceLoader : NSObject <WebCoreResourceLoader>
 {
-    khtml::Loader *m_loader;
-    WebCoreBridge *m_bridge;
-    NSURL *m_currentURL;
+    khtml::Loader *loader;
+    KIO::TransferJob *job;
 }
 
--(id)initWithLoader:(khtml::Loader *)loader bridge:(WebCoreBridge *)bridge;
+-(id)initWithLoader:(khtml::Loader *)loader job:(KIO::TransferJob *)job;
 
 @end
 
- at implementation KWQURLLoadClient
+ at implementation WebCoreResourceLoader
 
--(id)initWithLoader:(Loader *)loader bridge:(WebCoreBridge *)bridge
+-(id)initWithLoader:(khtml::Loader *)l job:(KIO::TransferJob *)j;
 {
-    if ((self = [super init])) {
-        m_loader = loader;
-        m_bridge = [bridge retain];
-        return self;
-    }
+    [super init];
     
-    return nil;
-}
-
-- (void)dealloc
-{
-    // FIXME Radar 2954901: Changed this not to leak because cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT(m_currentURL == nil);
-#else
-    [m_currentURL release];
-#endif    
-    [m_bridge release];
-    [super dealloc];
-}
-
-- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    KWQ_ASSERT(m_currentURL == nil);
-
-    m_currentURL = [[handle url] retain];
-    [m_bridge didStartLoadingWithHandle:handle];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
-{
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d, contentLength %d, contentLengthReceived %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length], [handle contentLength], [handle contentLengthReceived]);
-
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    m_loader->slotData(job, (const char *)[data bytes], [data length]);
+    loader = l;
+    job = j;
     
-    [m_bridge receivedProgressWithHandle:handle];
+    return self;
 }
 
-- (void)doneWithHandle:(IFURLHandle *)handle error:(BOOL)error
+- (void)dealloc
 {
-    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
-    // since cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#else
-    KWQ_ASSERT(m_currentURL == nil || [m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#endif    
-
-    [m_bridge removeHandle:handle];
-    
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    if (error) {
-        job->setError(1);
-    }
-    m_loader->slotFinished(job);
     delete job;
-    
-    [m_currentURL release];
-    m_currentURL = nil;
+    [super dealloc];
 }
 
-- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+- (void)addData:(NSData *)data
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didCancelLoadingWithHandle:handle];
+    loader->slotData(job, (const char *)[data bytes], [data length]);
 }
 
-- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+- (void)cancel
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length]);
-    
-    KWQ_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
-    KWQ_ASSERT((int)[data length] == [handle contentLengthReceived]);
-
-    [self doneWithHandle:handle error:NO];
-    [m_bridge didFinishLoadingWithHandle:handle];
+    job->setError(1);
+    [self finish];
 }
 
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)result
+- (void)finish
 {
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p, result = %s, URL = %s", m_bridge, DEBUG_OBJECT([result errorDescription]), DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didFailToLoadWithHandle:handle error:result];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "url = %s", DEBUG_OBJECT(URL));
-    
-    KWQ_ASSERT(m_currentURL != nil);
-
-    [m_bridge didRedirectWithHandle:handle fromURL:m_currentURL];
-    [URL retain];
-    [m_currentURL release];
-    m_currentURL = URL;
+    loader->slotFinished(job);
+    job->setHandle(0);
 }
 
 @end
@@ -168,25 +91,17 @@ KWQLoaderImpl::KWQLoaderImpl(Loader *l)
 {
 }
 
-void KWQLoaderImpl::setClient(Request *req)
-{
-    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
-    req->client = [[[KWQURLLoadClient alloc] initWithLoader:loader bridge:bridge] autorelease];
-}
-
-void KWQLoaderImpl::serveRequest(Request *req, KIO::TransferJob *job)
+void KWQLoaderImpl::start(Request *req, KIO::TransferJob *job)
 {
     KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s", 
           req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
     
-    job->begin(req->client, job);
-    if (job->handle() == nil) {
-        // The only error that prevents us from making a handle is a malformed URL.
-        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
-        [req->client->m_bridge didFailBeforeLoadingWithError:error];
-    } else {
-        [req->client->m_bridge addHandle:job->handle()];
-    }
+    WebCoreResourceLoader *resourceLoader = [[WebCoreResourceLoader alloc] initWithLoader:loader job:job];
+    
+    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
+    job->setHandle([bridge startLoadingResource:resourceLoader withURL:job->url()]);
+    
+    [resourceLoader release];
 }
 
 void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
@@ -200,6 +115,6 @@ void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
     
     // FIXME: Are we sure that we can globally notify with the URL as the notification
     // name without conflicting with other frameworks? No "IF" prefix needed?
-    // Maybe the notification should have a distinctive name, and the URL should be the object.
+    // Perhaps the notification should have a distinctive name, and the URL should be the object.
     [[NSNotificationCenter defaultCenter] postNotificationName:urlString object:nil];
 }
diff --git a/WebCore/kwq/KWQLoaderImpl.h b/WebCore/kwq/KWQLoaderImpl.h
index 91d7379..0df8ff1 100644
--- a/WebCore/kwq/KWQLoaderImpl.h
+++ b/WebCore/kwq/KWQLoaderImpl.h
@@ -38,7 +38,6 @@ class KWQLoaderImpl
 public:
     KWQLoaderImpl(khtml::Loader *);
     
-    void setClient(khtml::Request *);
     void serveRequest(khtml::Request *, KIO::TransferJob *);
     void objectFinished(khtml::CachedObject *);
 
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 2853ab9..b086a89 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -39,126 +39,49 @@ using khtml::DocLoader;
 using khtml::Loader;
 using khtml::Request;
 
- at interface KWQURLLoadClient : NSObject <IFURLHandleClient>
+ at interface WebCoreResourceLoader : NSObject <WebCoreResourceLoader>
 {
-    khtml::Loader *m_loader;
-    WebCoreBridge *m_bridge;
-    NSURL *m_currentURL;
+    khtml::Loader *loader;
+    KIO::TransferJob *job;
 }
 
--(id)initWithLoader:(khtml::Loader *)loader bridge:(WebCoreBridge *)bridge;
+-(id)initWithLoader:(khtml::Loader *)loader job:(KIO::TransferJob *)job;
 
 @end
 
- at implementation KWQURLLoadClient
+ at implementation WebCoreResourceLoader
 
--(id)initWithLoader:(Loader *)loader bridge:(WebCoreBridge *)bridge
+-(id)initWithLoader:(khtml::Loader *)l job:(KIO::TransferJob *)j;
 {
-    if ((self = [super init])) {
-        m_loader = loader;
-        m_bridge = [bridge retain];
-        return self;
-    }
+    [super init];
     
-    return nil;
-}
-
-- (void)dealloc
-{
-    // FIXME Radar 2954901: Changed this not to leak because cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT(m_currentURL == nil);
-#else
-    [m_currentURL release];
-#endif    
-    [m_bridge release];
-    [super dealloc];
-}
-
-- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    KWQ_ASSERT(m_currentURL == nil);
-
-    m_currentURL = [[handle url] retain];
-    [m_bridge didStartLoadingWithHandle:handle];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
-{
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d, contentLength %d, contentLengthReceived %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length], [handle contentLength], [handle contentLengthReceived]);
-
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    m_loader->slotData(job, (const char *)[data bytes], [data length]);
+    loader = l;
+    job = j;
     
-    [m_bridge receivedProgressWithHandle:handle];
+    return self;
 }
 
-- (void)doneWithHandle:(IFURLHandle *)handle error:(BOOL)error
+- (void)dealloc
 {
-    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
-    // since cancel messages are sometimes sent before begin.
-#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
-    KWQ_ASSERT([m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#else
-    KWQ_ASSERT(m_currentURL == nil || [m_currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
-#endif    
-
-    [m_bridge removeHandle:handle];
-    
-    void *userData = [[handle attributeForKey:IFURLHandleUserData] pointerValue];
-    KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
-    if (error) {
-        job->setError(1);
-    }
-    m_loader->slotFinished(job);
     delete job;
-    
-    [m_currentURL release];
-    m_currentURL = nil;
+    [super dealloc];
 }
 
-- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+- (void)addData:(NSData *)data
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s", m_bridge, DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didCancelLoadingWithHandle:handle];
+    loader->slotData(job, (const char *)[data bytes], [data length]);
 }
 
-- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+- (void)cancel
 {
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "bridge = %p for URL %s data at %p, length %d", m_bridge, DEBUG_OBJECT([handle url]), data, [data length]);
-    
-    KWQ_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
-    KWQ_ASSERT((int)[data length] == [handle contentLengthReceived]);
-
-    [self doneWithHandle:handle error:NO];
-    [m_bridge didFinishLoadingWithHandle:handle];
+    job->setError(1);
+    [self finish];
 }
 
-- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)result
+- (void)finish
 {
-    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "bridge = %p, result = %s, URL = %s", m_bridge, DEBUG_OBJECT([result errorDescription]), DEBUG_OBJECT([handle url]));
-
-    [self doneWithHandle:handle error:YES];
-    [m_bridge didFailToLoadWithHandle:handle error:result];
-}
-
-- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
-{
-    KWQDEBUGLEVEL(KWQ_LOG_LOADING, "url = %s", DEBUG_OBJECT(URL));
-    
-    KWQ_ASSERT(m_currentURL != nil);
-
-    [m_bridge didRedirectWithHandle:handle fromURL:m_currentURL];
-    [URL retain];
-    [m_currentURL release];
-    m_currentURL = URL;
+    loader->slotFinished(job);
+    job->setHandle(0);
 }
 
 @end
@@ -168,25 +91,17 @@ KWQLoaderImpl::KWQLoaderImpl(Loader *l)
 {
 }
 
-void KWQLoaderImpl::setClient(Request *req)
-{
-    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
-    req->client = [[[KWQURLLoadClient alloc] initWithLoader:loader bridge:bridge] autorelease];
-}
-
-void KWQLoaderImpl::serveRequest(Request *req, KIO::TransferJob *job)
+void KWQLoaderImpl::start(Request *req, KIO::TransferJob *job)
 {
     KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s", 
           req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
     
-    job->begin(req->client, job);
-    if (job->handle() == nil) {
-        // The only error that prevents us from making a handle is a malformed URL.
-        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
-        [req->client->m_bridge didFailBeforeLoadingWithError:error];
-    } else {
-        [req->client->m_bridge addHandle:job->handle()];
-    }
+    WebCoreResourceLoader *resourceLoader = [[WebCoreResourceLoader alloc] initWithLoader:loader job:job];
+    
+    WebCoreBridge *bridge = ((KHTMLPart *)req->m_docLoader->part())->impl->getBridge();
+    job->setHandle([bridge startLoadingResource:resourceLoader withURL:job->url()]);
+    
+    [resourceLoader release];
 }
 
 void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
@@ -200,6 +115,6 @@ void KWQLoaderImpl::objectFinished(khtml::CachedObject *object)
     
     // FIXME: Are we sure that we can globally notify with the URL as the notification
     // name without conflicting with other frameworks? No "IF" prefix needed?
-    // Maybe the notification should have a distinctive name, and the URL should be the object.
+    // Perhaps the notification should have a distinctive name, and the URL should be the object.
     [[NSNotificationCenter defaultCenter] postNotificationName:urlString object:nil];
 }
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index e10b5da..ed672d8 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -45,9 +45,7 @@ typedef struct KHTMLRenderPart KHTMLRenderPart;
 #endif
 
 @class IFError;
-#ifndef RESOURCE_URL_CLIENT_READY
 @class IFURLHandle;
-#endif
 
 @class WebCoreBridge;
 
@@ -112,23 +110,7 @@ typedef struct KHTMLRenderPart KHTMLRenderPart;
 
 - (KHTMLView *)widget;
 
-- (void)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL;
-
-#ifndef RESOURCE_URL_CLIENT_READY
-
-- (void)addHandle:(IFURLHandle *)handle;
-- (void)removeHandle:(IFURLHandle *)handle;
-
-- (void)didStartLoadingWithHandle:(IFURLHandle *)handle;
-- (void)receivedProgressWithHandle:(IFURLHandle *)handle;
-- (void)didFinishLoadingWithHandle:(IFURLHandle *)handle;
-
-- (void)didCancelLoadingWithHandle:(IFURLHandle *)handle;
-- (void)didFailToLoadWithHandle:(IFURLHandle *)handle error:(IFError *)error;
-- (void)didRedirectWithHandle:(IFURLHandle *)handle fromURL:(NSURL *)fromURL;
-- (void)didFailBeforeLoadingWithError:(IFError *)error;
-
-#endif
+- (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL;
 
 @end
 
diff --git a/WebCore/kwq/kio/jobclasses.h b/WebCore/kwq/kio/jobclasses.h
index 79be8ff..087db7f 100644
--- a/WebCore/kwq/kio/jobclasses.h
+++ b/WebCore/kwq/kio/jobclasses.h
@@ -31,11 +31,8 @@
 #include <qstring.h>
 
 #ifdef __OBJC__
- at protocol IFURLHandleClient;
 @class IFURLHandle;
-typedef id <IFURLHandleClient> IFURLHandleClientPtr;
 #else
-typedef struct IFURLHandleClient IFURLHandleClientPtr;
 class IFURLHandle;
 #endif
 
@@ -63,7 +60,7 @@ public:
     void addMetaData(const QString &key, const QString &value);
     void kill();
 
-    void begin(IFURLHandleClientPtr, void *userData);
+    void setHandle(IFURLHandle *);
     IFURLHandle *handle() const;
     
     NSURL *url() const;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c1ed603..0b5a0be 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2002-06-16  Darin Adler  <darin at apple.com>
+
+	Moved the IFURLHandleClient subclass here from WebCore, so it can some day be merged
+	with the one for the frames themselves; this one is for resources.
+
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.h: Added.
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.m: Added.
+	* WebKit.pbproj/project.pbxproj: Added IFResourceURLHandleClient.h and .m.
+
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebCoreBridge startLoadingResource:withURL:]): Added.
+	Removed all the old methods, with their guts moved into IFResourceURLHandleClient.
+
 2002-06-15  Darin Adler  <darin at apple.com>
 
 	Update for frame-related changes in WebCore.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index c1ed603..0b5a0be 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-06-16  Darin Adler  <darin at apple.com>
+
+	Moved the IFURLHandleClient subclass here from WebCore, so it can some day be merged
+	with the one for the frames themselves; this one is for resources.
+
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.h: Added.
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.m: Added.
+	* WebKit.pbproj/project.pbxproj: Added IFResourceURLHandleClient.h and .m.
+
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebCoreBridge startLoadingResource:withURL:]): Added.
+	Removed all the old methods, with their guts moved into IFResourceURLHandleClient.
+
 2002-06-15  Darin Adler  <darin at apple.com>
 
 	Update for frame-related changes in WebCore.
diff --git a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.h b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.h
new file mode 100644
index 0000000..bb27633
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.h
@@ -0,0 +1,24 @@
+//
+//  IFResourceURLHandleClient.h
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebFoundation/IFURLHandleClient.h>
+
+ at protocol WebCoreResourceLoader;
+ at class IFWebDataSource;
+
+ at interface IFResourceURLHandleClient : NSObject <IFURLHandleClient>
+{
+    id <WebCoreResourceLoader> loader;
+    IFWebDataSource *dataSource;
+    NSURL *currentURL;
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)dataSource;
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
new file mode 100644
index 0000000..f4d245d
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
@@ -0,0 +1,180 @@
+//
+//  IFResourceURLHandleClient.m
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/IFResourceURLHandleClient.h>
+
+#import <WebFoundation/IFError.h>
+#import <WebFoundation/IFURLHandle.h>
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFWebControllerPrivate.h>
+#import <WebKit/IFWebCoreBridge.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/WebKitDebug.h>
+
+#import <WebCoreBridge.h>
+
+ at implementation IFResourceURLHandleClient
+
+- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
+{
+    [super init];
+    
+    loader = [l retain];
+    dataSource = [s retain];
+    
+    return self;
+}
+
+- (void)dealloc
+{
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
+    WEBKIT_ASSERT(currentURL == nil);
+#else
+    [currentURL release];
+#endif
+    
+    [loader release];
+    [dataSource release];
+    
+    [super dealloc];
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)source
+{
+    IFURLHandle *handle;
+    IFResourceURLHandleClient *client;
+    
+    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    if (handle == nil) {
+        [rLoader cancel];
+
+        IFError *badURLError = [IFError errorWithCode:IFURLHandleResultBadURLError
+            inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];        
+        [[source controller] _receivedError:badURLError forResourceHandle:nil
+            partialProgress:nil fromDataSource:source];
+        
+        return nil;
+    } else {
+        [source _addURLHandle:handle];
+        
+        client = [[self alloc] initWithLoader:rLoader dataSource:source];
+        [handle addClient:client];
+        [client release];
+        
+        [handle loadInBackground];
+        
+        return handle;
+    }
+}
+
+- (void)receivedProgressWithHandle:(IFURLHandle *)handle
+{
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progressWithURLHandle:handle]
+        forResourceHandle:handle fromDataSource:dataSource];
+}
+
+- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
+{
+    WEBKIT_ASSERT(currentURL == nil);
+
+    currentURL = [[handle url] retain];
+    [[dataSource controller] _didStartLoading:[handle url]];
+    [self receivedProgressWithHandle:handle];
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [self receivedProgressWithHandle:handle];
+    [loader addData:data];    
+}
+
+- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+{
+    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
+    // since cancel messages are sometimes sent before begin.
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
+
+    [dataSource _removeURLHandle:handle];
+        
+    [loader cancel];
+    
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
+        forResourceHandle:handle fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+{    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+    WEBKIT_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
+    WEBKIT_ASSERT((int)[data length] == [handle contentLengthReceived]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader finish];
+    
+    IFError *nonTerminalError = [handle error];
+    if (nonTerminalError) {
+        [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
+            partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    }
+    
+    [self receivedProgressWithHandle:handle];
+
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader cancel];
+    
+    [[dataSource controller] _receivedError:error forResourceHandle:handle
+        partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
+{
+    WEBKIT_ASSERT(currentURL != nil);
+    WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
+
+    [[dataSource controller] _didStopLoading:currentURL];
+
+    [dataSource _setFinalURL:URL];
+    [[dataSource _bridge] setURL:URL];
+
+    //[[dataSource _locationChangeHandler] serverRedirectTo:toURL forDataSource:dataSource];
+    
+    [[dataSource controller] _didStartLoading:URL];
+    
+    [URL retain];
+    [currentURL release];
+    currentURL = URL;
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index 668ef34..b563050 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -8,7 +8,7 @@
 #import <WebKit/IFHTMLRepresentation.h>
 #import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFLoadProgress.h>
-//#import <WebKit/IFResourceURLHandleClient.h>
+#import <WebKit/IFResourceURLHandleClient.h>
 #import <WebKit/IFWebControllerPrivate.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
@@ -195,87 +195,9 @@
     [self addData:data withEncoding:[dataSource encoding]];
 }
 
-- (void)addHandle:(IFURLHandle *)handle
+- (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(dataSource);
-    [dataSource _addURLHandle:handle];
-}
-
-- (void)removeHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [dataSource _removeURLHandle:handle];
-}
-
-- (void)didStartLoadingWithHandle:(IFURLHandle *)handle
-{
-    [[dataSource controller] _didStartLoading:[handle url]];
-    [self receivedProgressWithHandle:handle];
-}
-
-- (void)receivedProgressWithHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedProgress:[IFLoadProgress progressWithURLHandle:handle]
-        forResourceHandle:handle fromDataSource:dataSource];
-}
-
-- (void)didFinishLoadingWithHandle:(IFURLHandle *)handle
-{
-    [self receivedProgressWithHandle:handle];
-
-    IFError *nonTerminalError = [handle error];
-    if (nonTerminalError) {
-        [self didFailToLoadWithHandle:handle error:nonTerminalError];
-    } else {
-        [[dataSource controller] _didStopLoading:[handle url]];
-    }
-}
-
-- (void)didCancelLoadingWithHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
-        forResourceHandle:handle fromDataSource:dataSource];
-    [[dataSource controller] _didStopLoading:[handle url]];
-}
-
-- (void)didFailBeforeLoadingWithError:(IFError *)error
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedError:error forResourceHandle:nil
-        partialProgress:nil fromDataSource:dataSource];
-}
-
-- (void)didFailToLoadWithHandle:(IFURLHandle *)handle error:(IFError *)error
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedError:error forResourceHandle:handle
-        partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
-    [[dataSource controller] _didStopLoading:[handle url]];
-}
-
-- (void)didRedirectWithHandle:(IFURLHandle *)handle fromURL:(NSURL *)fromURL
-{
-    WEBKIT_ASSERT(dataSource);
-
-    NSURL *toURL = [handle redirectedURL];
-    
-    [[dataSource controller] _didStopLoading:fromURL];
-
-    [dataSource _setFinalURL:toURL];
-    [self setURL:toURL];
-
-    //[[dataSource _locationChangeHandler] serverRedirectTo:toURL forDataSource:dataSource];
-    
-    [[dataSource controller] _didStartLoading:toURL];
-}
-
-- (void)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
-{
-#ifdef RESOURCE_URL_CLIENT_READY
-    [IFResourceURLHandleClient startLoadingResource:resourceLoader withURL:URL dataSource:dataSource];
-#endif
+    return [IFResourceURLHandleClient startLoadingResource:resourceLoader withURL:URL dataSource:dataSource];
 }
 
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 668ef34..b563050 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -8,7 +8,7 @@
 #import <WebKit/IFHTMLRepresentation.h>
 #import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFLoadProgress.h>
-//#import <WebKit/IFResourceURLHandleClient.h>
+#import <WebKit/IFResourceURLHandleClient.h>
 #import <WebKit/IFWebControllerPrivate.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
@@ -195,87 +195,9 @@
     [self addData:data withEncoding:[dataSource encoding]];
 }
 
-- (void)addHandle:(IFURLHandle *)handle
+- (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(dataSource);
-    [dataSource _addURLHandle:handle];
-}
-
-- (void)removeHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [dataSource _removeURLHandle:handle];
-}
-
-- (void)didStartLoadingWithHandle:(IFURLHandle *)handle
-{
-    [[dataSource controller] _didStartLoading:[handle url]];
-    [self receivedProgressWithHandle:handle];
-}
-
-- (void)receivedProgressWithHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedProgress:[IFLoadProgress progressWithURLHandle:handle]
-        forResourceHandle:handle fromDataSource:dataSource];
-}
-
-- (void)didFinishLoadingWithHandle:(IFURLHandle *)handle
-{
-    [self receivedProgressWithHandle:handle];
-
-    IFError *nonTerminalError = [handle error];
-    if (nonTerminalError) {
-        [self didFailToLoadWithHandle:handle error:nonTerminalError];
-    } else {
-        [[dataSource controller] _didStopLoading:[handle url]];
-    }
-}
-
-- (void)didCancelLoadingWithHandle:(IFURLHandle *)handle
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
-        forResourceHandle:handle fromDataSource:dataSource];
-    [[dataSource controller] _didStopLoading:[handle url]];
-}
-
-- (void)didFailBeforeLoadingWithError:(IFError *)error
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedError:error forResourceHandle:nil
-        partialProgress:nil fromDataSource:dataSource];
-}
-
-- (void)didFailToLoadWithHandle:(IFURLHandle *)handle error:(IFError *)error
-{
-    WEBKIT_ASSERT(dataSource);
-    [[dataSource controller] _receivedError:error forResourceHandle:handle
-        partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
-    [[dataSource controller] _didStopLoading:[handle url]];
-}
-
-- (void)didRedirectWithHandle:(IFURLHandle *)handle fromURL:(NSURL *)fromURL
-{
-    WEBKIT_ASSERT(dataSource);
-
-    NSURL *toURL = [handle redirectedURL];
-    
-    [[dataSource controller] _didStopLoading:fromURL];
-
-    [dataSource _setFinalURL:toURL];
-    [self setURL:toURL];
-
-    //[[dataSource _locationChangeHandler] serverRedirectTo:toURL forDataSource:dataSource];
-    
-    [[dataSource controller] _didStartLoading:toURL];
-}
-
-- (void)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
-{
-#ifdef RESOURCE_URL_CLIENT_READY
-    [IFResourceURLHandleClient startLoadingResource:resourceLoader withURL:URL dataSource:dataSource];
-#endif
+    return [IFResourceURLHandleClient startLoadingResource:resourceLoader withURL:URL dataSource:dataSource];
 }
 
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h
new file mode 100644
index 0000000..bb27633
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h
@@ -0,0 +1,24 @@
+//
+//  IFResourceURLHandleClient.h
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebFoundation/IFURLHandleClient.h>
+
+ at protocol WebCoreResourceLoader;
+ at class IFWebDataSource;
+
+ at interface IFResourceURLHandleClient : NSObject <IFURLHandleClient>
+{
+    id <WebCoreResourceLoader> loader;
+    IFWebDataSource *dataSource;
+    NSURL *currentURL;
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)dataSource;
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
new file mode 100644
index 0000000..f4d245d
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -0,0 +1,180 @@
+//
+//  IFResourceURLHandleClient.m
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/IFResourceURLHandleClient.h>
+
+#import <WebFoundation/IFError.h>
+#import <WebFoundation/IFURLHandle.h>
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFWebControllerPrivate.h>
+#import <WebKit/IFWebCoreBridge.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/WebKitDebug.h>
+
+#import <WebCoreBridge.h>
+
+ at implementation IFResourceURLHandleClient
+
+- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
+{
+    [super init];
+    
+    loader = [l retain];
+    dataSource = [s retain];
+    
+    return self;
+}
+
+- (void)dealloc
+{
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
+    WEBKIT_ASSERT(currentURL == nil);
+#else
+    [currentURL release];
+#endif
+    
+    [loader release];
+    [dataSource release];
+    
+    [super dealloc];
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)source
+{
+    IFURLHandle *handle;
+    IFResourceURLHandleClient *client;
+    
+    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    if (handle == nil) {
+        [rLoader cancel];
+
+        IFError *badURLError = [IFError errorWithCode:IFURLHandleResultBadURLError
+            inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];        
+        [[source controller] _receivedError:badURLError forResourceHandle:nil
+            partialProgress:nil fromDataSource:source];
+        
+        return nil;
+    } else {
+        [source _addURLHandle:handle];
+        
+        client = [[self alloc] initWithLoader:rLoader dataSource:source];
+        [handle addClient:client];
+        [client release];
+        
+        [handle loadInBackground];
+        
+        return handle;
+    }
+}
+
+- (void)receivedProgressWithHandle:(IFURLHandle *)handle
+{
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progressWithURLHandle:handle]
+        forResourceHandle:handle fromDataSource:dataSource];
+}
+
+- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
+{
+    WEBKIT_ASSERT(currentURL == nil);
+
+    currentURL = [[handle url] retain];
+    [[dataSource controller] _didStartLoading:[handle url]];
+    [self receivedProgressWithHandle:handle];
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [self receivedProgressWithHandle:handle];
+    [loader addData:data];    
+}
+
+- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+{
+    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
+    // since cancel messages are sometimes sent before begin.
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
+
+    [dataSource _removeURLHandle:handle];
+        
+    [loader cancel];
+    
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
+        forResourceHandle:handle fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+{    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+    WEBKIT_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
+    WEBKIT_ASSERT((int)[data length] == [handle contentLengthReceived]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader finish];
+    
+    IFError *nonTerminalError = [handle error];
+    if (nonTerminalError) {
+        [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
+            partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    }
+    
+    [self receivedProgressWithHandle:handle];
+
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader cancel];
+    
+    [[dataSource controller] _receivedError:error forResourceHandle:handle
+        partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
+{
+    WEBKIT_ASSERT(currentURL != nil);
+    WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
+
+    [[dataSource controller] _didStopLoading:currentURL];
+
+    [dataSource _setFinalURL:URL];
+    [[dataSource _bridge] setURL:URL];
+
+    //[[dataSource _locationChangeHandler] serverRedirectTo:toURL forDataSource:dataSource];
+    
+    [[dataSource controller] _didStartLoading:URL];
+    
+    [URL retain];
+    [currentURL release];
+    currentURL = URL;
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
new file mode 100644
index 0000000..bb27633
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
@@ -0,0 +1,24 @@
+//
+//  IFResourceURLHandleClient.h
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebFoundation/IFURLHandleClient.h>
+
+ at protocol WebCoreResourceLoader;
+ at class IFWebDataSource;
+
+ at interface IFResourceURLHandleClient : NSObject <IFURLHandleClient>
+{
+    id <WebCoreResourceLoader> loader;
+    IFWebDataSource *dataSource;
+    NSURL *currentURL;
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)dataSource;
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
new file mode 100644
index 0000000..f4d245d
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -0,0 +1,180 @@
+//
+//  IFResourceURLHandleClient.m
+//  WebKit
+//
+//  Created by Darin Adler on Sat Jun 15 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/IFResourceURLHandleClient.h>
+
+#import <WebFoundation/IFError.h>
+#import <WebFoundation/IFURLHandle.h>
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFWebControllerPrivate.h>
+#import <WebKit/IFWebCoreBridge.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/WebKitDebug.h>
+
+#import <WebCoreBridge.h>
+
+ at implementation IFResourceURLHandleClient
+
+- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
+{
+    [super init];
+    
+    loader = [l retain];
+    dataSource = [s retain];
+    
+    return self;
+}
+
+- (void)dealloc
+{
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
+    WEBKIT_ASSERT(currentURL == nil);
+#else
+    [currentURL release];
+#endif
+    
+    [loader release];
+    [dataSource release];
+    
+    [super dealloc];
+}
+
++ (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+    withURL:(NSURL *)URL dataSource:(IFWebDataSource *)source
+{
+    IFURLHandle *handle;
+    IFResourceURLHandleClient *client;
+    
+    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    if (handle == nil) {
+        [rLoader cancel];
+
+        IFError *badURLError = [IFError errorWithCode:IFURLHandleResultBadURLError
+            inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];        
+        [[source controller] _receivedError:badURLError forResourceHandle:nil
+            partialProgress:nil fromDataSource:source];
+        
+        return nil;
+    } else {
+        [source _addURLHandle:handle];
+        
+        client = [[self alloc] initWithLoader:rLoader dataSource:source];
+        [handle addClient:client];
+        [client release];
+        
+        [handle loadInBackground];
+        
+        return handle;
+    }
+}
+
+- (void)receivedProgressWithHandle:(IFURLHandle *)handle
+{
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progressWithURLHandle:handle]
+        forResourceHandle:handle fromDataSource:dataSource];
+}
+
+- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
+{
+    WEBKIT_ASSERT(currentURL == nil);
+
+    currentURL = [[handle url] retain];
+    [[dataSource controller] _didStartLoading:[handle url]];
+    [self receivedProgressWithHandle:handle];
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDataDidBecomeAvailable:(NSData *)data
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [self receivedProgressWithHandle:handle];
+    [loader addData:data];    
+}
+
+- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
+{
+    // FIXME Radar 2954901: Replaced the assertion below with a more lenient one,
+    // since cancel messages are sometimes sent before begin.
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
+
+    [dataSource _removeURLHandle:handle];
+        
+    [loader cancel];
+    
+    [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
+        forResourceHandle:handle fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)handle data:(NSData *)data
+{    
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+    WEBKIT_ASSERT([handle statusCode] == IFURLHandleStatusLoadComplete);
+    WEBKIT_ASSERT((int)[data length] == [handle contentLengthReceived]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader finish];
+    
+    IFError *nonTerminalError = [handle error];
+    if (nonTerminalError) {
+        [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
+            partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    }
+    
+    [self receivedProgressWithHandle:handle];
+
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
+{
+    WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+
+    [dataSource _removeURLHandle:handle];
+    
+    [loader cancel];
+    
+    [[dataSource controller] _receivedError:error forResourceHandle:handle
+        partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:[handle url]];
+    
+    [currentURL release];
+    currentURL = nil;
+}
+
+- (void)IFURLHandle:(IFURLHandle *)handle didRedirectToURL:(NSURL *)URL
+{
+    WEBKIT_ASSERT(currentURL != nil);
+    WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
+
+    [[dataSource controller] _didStopLoading:currentURL];
+
+    [dataSource _setFinalURL:URL];
+    [[dataSource _bridge] setURL:URL];
+
+    //[[dataSource _locationChangeHandler] serverRedirectTo:toURL forDataSource:dataSource];
+    
+    [[dataSource controller] _didStartLoading:URL];
+    
+    [URL retain];
+    [currentURL release];
+    currentURL = URL;
+}
+
+ at end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 4e1ff50..81c63b5 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -254,6 +254,7 @@
 				F5AFB46002B94DC8018635CA,
 				F5E0A77002B8FEE401C1A525,
 				F5A55DC802BAA2E8018635CC,
+				F5E0E10A02BC45F8018635CA,
 			);
 			isa = PBXHeadersBuildPhase;
 		};
@@ -330,6 +331,7 @@
 				F5FBAB9202B88CBF01FF6074,
 				F5AFB46102B94DC8018635CA,
 				F5E0A77102B8FEE401C1A525,
+				F5E0E10B02BC45F8018635CA,
 			);
 			isa = PBXSourcesBuildPhase;
 		};
@@ -1712,6 +1714,8 @@
 				9CE1F8A302A5C6F30ECA2ACD,
 				F5AFB45E02B94DC8018635CA,
 				F5AFB45F02B94DC8018635CA,
+				F5E0E10802BC45F8018635CA,
+				F5E0E10902BC45F8018635CA,
 			);
 			isa = PBXGroup;
 			name = "WebCore Support";
@@ -1915,6 +1919,30 @@
 			settings = {
 			};
 		};
+		F5E0E10802BC45F8018635CA = {
+			isa = PBXFileReference;
+			name = IFResourceURLHandleClient.h;
+			path = WebCoreSupport.subproj/IFResourceURLHandleClient.h;
+			refType = 4;
+		};
+		F5E0E10902BC45F8018635CA = {
+			isa = PBXFileReference;
+			name = IFResourceURLHandleClient.m;
+			path = WebCoreSupport.subproj/IFResourceURLHandleClient.m;
+			refType = 4;
+		};
+		F5E0E10A02BC45F8018635CA = {
+			fileRef = F5E0E10802BC45F8018635CA;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5E0E10B02BC45F8018635CA = {
+			fileRef = F5E0E10902BC45F8018635CA;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		F5E638620265FC0D01000102 = {
 			isa = PBXFileReference;
 			name = plugin_document_template.html;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list