[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:32:11 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 869d9ed85a69aa33defcaa7279c06f357844dc9b
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 28 17:28:38 2003 +0000
WebFoundation:
Reviewed by Darin
Cosmetic change. Instances of 'resource' as a local variable
name have been changed to 'connection'. Some other changes
related to this cosmetic cleanup were done as well.
Also updated some comments.
* CacheLoader.subproj/NSURLConnection.h:
* CacheLoader.subproj/NSURLConnection.m:
(-[NSURLConnection initWithRequest:]):
(+[NSURLConnection sendSynchronousRequest:]):
(+[NSURLConnection _forceSingleLoad]):
(-[NSURLConnection _postCallback:]):
(-[NSURLConnectionInternal redirectedToRequest:permanent:]):
(-[NSURLConnectionInternal responseAvailable:]):
(-[NSURLConnectionInternal didLoadBytes:length:]):
(-[NSURLConnectionInternal invalidateCacheObject]):
(-[NSURLConnectionInternal finishedLoading]):
(-[NSURLConnectionInternal failedWithError:]):
* CacheLoader.subproj/NSURLConnectionQueue.h:
* CacheLoader.subproj/NSURLConnectionQueue.m:
(-[NSURLConnectionQueue put:URL:]):
* CacheLoader.subproj/WebSynchronousDelegate.h:
* CacheLoader.subproj/WebSynchronousDelegate.m:
(-[WebSynchronousDelegate dealloc]):
(-[WebSynchronousDelegate run:]):
(-[WebSynchronousDelegate connection]):
WebKit:
Reviewed by Darin
Cosmetic change. Instances of 'resource' as a local variable
name have been changed to 'connection'. Some other changes
related to this cosmetic cleanup were done as well.
As part of this change, I needed to change some 'connection'
method arguments to 'con' to avoid the name conflict now
that instance variables are named .connection'.
* Downloads.subproj/WebDownload.m:
(-[WebDownloadPrivate dealloc]):
(-[WebDownload initWithRequest:]):
(-[WebDownload _initWithLoadingResource:request:response:delegate:proxy:]):
(+[WebDownload _downloadWithLoadingResource:request:response:delegate:proxy:]):
(-[WebDownload loadWithDelegate:]):
(-[WebDownload _downloadEnded]):
(-[WebDownload _cancelWithError:]):
* Downloads.subproj/WebDownloadPrivate.h:
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream connection:didReceiveResponse:]):
(-[WebNetscapePluginStream connection:didReceiveData:]):
(-[WebNetscapePluginStream connectionDidFinishLoading:]):
(-[WebNetscapePluginStream connection:didFailLoadingWithError:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient connection:willSendRequest:redirectResponse:]):
(-[WebSubresourceClient connection:didReceiveResponse:]):
(-[WebSubresourceClient connection:didReceiveData:]):
(-[WebSubresourceClient connectionDidFinishLoading:]):
(-[WebSubresourceClient connection:didFailLoadingWithError:]):
* WebView.subproj/WebBaseResourceHandleDelegate.h:
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate _releaseResources]):
(-[WebBaseResourceHandleDelegate startLoading:]):
(-[WebBaseResourceHandleDelegate loadWithRequest:]):
(-[WebBaseResourceHandleDelegate setDefersCallbacks:]):
(-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]):
(-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
(-[WebBaseResourceHandleDelegate connection:didReceiveData:]):
(-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
(-[WebBaseResourceHandleDelegate connection:didFailLoadingWithError:]):
(-[WebBaseResourceHandleDelegate cancelWithError:]):
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient receivedError:]):
(-[WebMainResourceClient cancelWithError:]):
(-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
(-[WebMainResourceClient continueAfterContentPolicy:response:]):
(-[WebMainResourceClient connection:didReceiveResponse:]):
(-[WebMainResourceClient connection:didReceiveData:]):
(-[WebMainResourceClient connectionDidFinishLoading:]):
(-[WebMainResourceClient connection:didFailLoadingWithError:]):
(-[WebMainResourceClient startLoading:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5a0c406..53bb79d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -2,6 +2,61 @@
Reviewed by Darin
+ Cosmetic change. Instances of 'resource' as a local variable
+ name have been changed to 'connection'. Some other changes
+ related to this cosmetic cleanup were done as well.
+
+ As part of this change, I needed to change some 'connection'
+ method arguments to 'con' to avoid the name conflict now
+ that instance variables are named .connection'.
+
+ * Downloads.subproj/WebDownload.m:
+ (-[WebDownloadPrivate dealloc]):
+ (-[WebDownload initWithRequest:]):
+ (-[WebDownload _initWithLoadingResource:request:response:delegate:proxy:]):
+ (+[WebDownload _downloadWithLoadingResource:request:response:delegate:proxy:]):
+ (-[WebDownload loadWithDelegate:]):
+ (-[WebDownload _downloadEnded]):
+ (-[WebDownload _cancelWithError:]):
+ * Downloads.subproj/WebDownloadPrivate.h:
+ * Plugins.subproj/WebNetscapePluginStream.m:
+ (-[WebNetscapePluginStream connection:didReceiveResponse:]):
+ (-[WebNetscapePluginStream connection:didReceiveData:]):
+ (-[WebNetscapePluginStream connectionDidFinishLoading:]):
+ (-[WebNetscapePluginStream connection:didFailLoadingWithError:]):
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (-[WebSubresourceClient connection:willSendRequest:redirectResponse:]):
+ (-[WebSubresourceClient connection:didReceiveResponse:]):
+ (-[WebSubresourceClient connection:didReceiveData:]):
+ (-[WebSubresourceClient connectionDidFinishLoading:]):
+ (-[WebSubresourceClient connection:didFailLoadingWithError:]):
+ * WebView.subproj/WebBaseResourceHandleDelegate.h:
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate _releaseResources]):
+ (-[WebBaseResourceHandleDelegate startLoading:]):
+ (-[WebBaseResourceHandleDelegate loadWithRequest:]):
+ (-[WebBaseResourceHandleDelegate setDefersCallbacks:]):
+ (-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]):
+ (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
+ (-[WebBaseResourceHandleDelegate connection:didReceiveData:]):
+ (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
+ (-[WebBaseResourceHandleDelegate connection:didFailLoadingWithError:]):
+ (-[WebBaseResourceHandleDelegate cancelWithError:]):
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient receivedError:]):
+ (-[WebMainResourceClient cancelWithError:]):
+ (-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
+ (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+ (-[WebMainResourceClient connection:didReceiveResponse:]):
+ (-[WebMainResourceClient connection:didReceiveData:]):
+ (-[WebMainResourceClient connectionDidFinishLoading:]):
+ (-[WebMainResourceClient connection:didFailLoadingWithError:]):
+ (-[WebMainResourceClient startLoading:]):
+
+2003-03-28 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Darin
+
Changed names for URL connection callback methods to
use the API-approved names. No functional changes.
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 5a02da3..deb1dc6 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -55,7 +55,7 @@ typedef struct WebFSRefParam
BOOL areWritesCancelled;
BOOL encounteredCloseError;
- NSURLConnection *resource;
+ NSURLConnection *connection;
NSURLRequest *request;
NSURLResponse *response;
WebResourceDelegateProxy *proxy;
@@ -136,7 +136,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
- (void)dealloc
{
- ASSERT(!resource);
+ ASSERT(!connection);
ASSERT(!delegate);
ASSERT(!isDownloading);
@@ -145,7 +145,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
[bufferedData release];
[decoderSequence release];
[request release];
- [resource release];
+ [connection release];
[response release];
[proxy setDelegate:nil];
[proxy release];
@@ -168,8 +168,8 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
_private = [[WebDownloadPrivate alloc] init];
_private->request = [request retain];
- _private->resource = [[NSURLConnection alloc] initWithRequest:request];
- if (!_private->resource) {
+ _private->connection = [[NSURLConnection alloc] initWithRequest:request];
+ if (!_private->connection) {
[self release];
return nil;
}
@@ -177,7 +177,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
return self;
}
-- _initWithLoadingResource:(NSURLConnection *)resource
+- _initWithLoadingResource:(NSURLConnection *)connection
request:(NSURLRequest *)request
response:(NSURLResponse *)response
delegate:(id)delegate
@@ -189,7 +189,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
[self _downloadStarted];
_private->request = [request retain];
- _private->resource = [resource retain];
+ _private->connection = [connection retain];
_private->response = [response retain];
_private->proxy = [proxy retain];
[self _setDelegate:delegate];
@@ -203,18 +203,18 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
if ([_private->delegate respondsToSelector:@selector(download:willSendRequest:redirectResponse:)]) {
NSURLRequest *request = [_private->delegate download:self willSendRequest:_private->request redirectResponse:nil];
if (request != _private->request) {
- // If the request is altered, cancel the resource and start a new one.
+ // If the request is altered, cancel the connection and start a new one.
[self cancel];
if (request) {
[self _setRequest:request];
[self _setResponse:nil];
- [_private->resource release];
- _private->resource = [[NSURLConnection alloc] initWithRequest:request];
- if (!_private->resource) {
+ [_private->connection release];
+ _private->connection = [[NSURLConnection alloc] initWithRequest:request];
+ if (!_private->connection) {
[self release];
return nil;
}
- [_private->resource loadWithDelegate:(id <NSURLConnectionDelegate>)self];
+ [_private->connection loadWithDelegate:(id <NSURLConnectionDelegate>)self];
[self _downloadStarted];
}
return self;
@@ -228,13 +228,13 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
return self;
}
-+ _downloadWithLoadingResource:(NSURLConnection *)resource
++ _downloadWithLoadingResource:(NSURLConnection *)connection
request:(NSURLRequest *)request
response:(NSURLResponse *)response
delegate:(id)delegate
proxy:(WebResourceDelegateProxy *)proxy
{
- return [[[WebDownload alloc] _initWithLoadingResource:resource
+ return [[[WebDownload alloc] _initWithLoadingResource:connection
request:request
response:response
delegate:delegate
@@ -253,7 +253,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
[self _downloadStarted];
[self _setDelegate:delegate];
- [_private->resource loadWithDelegate:(id <NSURLConnectionDelegate>)self];
+ [_private->connection loadWithDelegate:(id <NSURLConnectionDelegate>)self];
if ([_private->delegate respondsToSelector:@selector(download:didStartFromRequest:)]) {
[_private->delegate download:self didStartFromRequest:_private->request];
@@ -294,8 +294,8 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
if (_private->isDownloading) {
_private->isDownloading = NO;
- [_private->resource release];
- _private->resource = nil;
+ [_private->connection release];
+ _private->connection = nil;
[self _setDelegate:nil];
@@ -810,7 +810,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
- (void)_cancelWithError:(WebError *)error
{
- [_private->resource cancel];
+ [_private->connection cancel];
if (error) {
if ([_private->delegate respondsToSelector:@selector(download:didFailDownloadingWithError:)]) {
diff --git a/WebKit/Downloads.subproj/WebDownloadPrivate.h b/WebKit/Downloads.subproj/WebDownloadPrivate.h
index 931dcc2..befe984 100644
--- a/WebKit/Downloads.subproj/WebDownloadPrivate.h
+++ b/WebKit/Downloads.subproj/WebDownloadPrivate.h
@@ -13,7 +13,7 @@
@class WebResourceDelegateProxy;
@interface WebDownload (WebPrivate)
-+ _downloadWithLoadingResource:(NSURLConnection *)resource
++ _downloadWithLoadingResource:(NSURLConnection *)connection
request:(NSURLRequest *)request
response:(NSURLResponse *)response
delegate:(id)delegate
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginStream.m b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
index 67497b9..9118ecd 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
@@ -74,13 +74,13 @@
}
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)theResponse
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)theResponse
{
[self setResponse:theResponse];
- [super connection:connection didReceiveResponse:theResponse];
+ [super connection:con didReceiveResponse:theResponse];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
if (transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY) {
[resourceData appendData:data];
@@ -88,10 +88,10 @@
[self receivedData:data];
- [super connection:connection didReceiveData:data];
+ [super connection:con didReceiveData:data];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
[[view controller] _finishedLoadingResourceFromDataSource:[view dataSource]];
[self finishedLoadingWithData:resourceData];
@@ -99,10 +99,10 @@
[view release];
view = nil;
- [super connectionDidFinishLoading:connection];
+ [super connectionDidFinishLoading:con];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)result
{
[[view controller] _receivedError:result fromDataSource:[view dataSource]];
@@ -111,7 +111,7 @@
[view release];
view = nil;
- [super connection:connection didFailLoadingWithError:result];
+ [super connection:con didFailLoadingWithError:result];
}
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index ba4f9c0..b725a8d 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -78,7 +78,7 @@
[[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
// FIXME: We do want to tell the client about redirects for subresources.
// But the current API doesn't give any way to tell redirects on
@@ -88,23 +88,23 @@
// properly on redirect when we have the new redirect
// request-adjusting API
- return [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
+ return [super connection:con willSendRequest:newRequest redirectResponse:redirectResponse];
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
ASSERT(r);
[loader receivedResponse:r];
- [super connection:connection didReceiveResponse:r];
+ [super connection:con didReceiveResponse:r];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
[loader addData:data];
- [super connection:connection didReceiveData:data];
+ [super connection:con didReceiveData:data];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -117,10 +117,10 @@
[self release];
- [super connectionDidFinishLoading:connection];
+ [super connectionDidFinishLoading:con];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)error
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -128,7 +128,7 @@
[loader reportError];
[dataSource _removeSubresourceClient:self];
[self receivedError:error];
- [super connection:connection didFailLoadingWithError:error];
+ [super connection:con didFailLoadingWithError:error];
[self release];
}
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index ba4f9c0..b725a8d 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -78,7 +78,7 @@
[[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
// FIXME: We do want to tell the client about redirects for subresources.
// But the current API doesn't give any way to tell redirects on
@@ -88,23 +88,23 @@
// properly on redirect when we have the new redirect
// request-adjusting API
- return [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
+ return [super connection:con willSendRequest:newRequest redirectResponse:redirectResponse];
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
ASSERT(r);
[loader receivedResponse:r];
- [super connection:connection didReceiveResponse:r];
+ [super connection:con didReceiveResponse:r];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
[loader addData:data];
- [super connection:connection didReceiveData:data];
+ [super connection:con didReceiveData:data];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -117,10 +117,10 @@
[self release];
- [super connectionDidFinishLoading:connection];
+ [super connectionDidFinishLoading:con];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)error
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -128,7 +128,7 @@
[loader reportError];
[dataSource _removeSubresourceClient:self];
[self receivedError:error];
- [super connection:connection didFailLoadingWithError:error];
+ [super connection:con didFailLoadingWithError:error];
[self release];
}
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
index 92f8dd4..94c7dd4 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
@@ -18,7 +18,7 @@
{
@protected
WebDataSource *dataSource;
- NSURLConnection *resource;
+ NSURLConnection *connection;
NSURLRequest *request;
@private
WebView *controller;
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index c59800f..aba3b4d 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -34,8 +34,8 @@
[identifier release];
identifier = nil;
- [resource release];
- resource = nil;
+ [connection release];
+ connection = nil;
[controller release];
controller = nil;
@@ -65,19 +65,19 @@
- (void)startLoading:(NSURLRequest *)r
{
- [resource loadWithDelegate:self];
+ [connection loadWithDelegate:self];
}
- (BOOL)loadWithRequest:(NSURLRequest *)r
{
- ASSERT(resource == nil);
+ ASSERT(connection == nil);
- resource = [[NSURLConnection alloc] initWithRequest:r];
- if (!resource) {
+ connection = [[NSURLConnection alloc] initWithRequest:r];
+ if (!connection) {
return NO;
}
if (defersCallbacks) {
- [resource setDefersCallbacks:YES];
+ [connection setDefersCallbacks:YES];
}
[self startLoading:r];
@@ -88,7 +88,7 @@
- (void)setDefersCallbacks:(BOOL)defers
{
defersCallbacks = defers;
- [resource setDefersCallbacks:defers];
+ [connection setDefersCallbacks:defers];
}
- (BOOL)defersCallbacks
@@ -130,9 +130,9 @@
return downloadDelegate;
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
@@ -179,9 +179,9 @@
return request;
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[r retain];
@@ -192,17 +192,17 @@
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
@@ -213,9 +213,9 @@
[self _releaseResources];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)result
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
@@ -231,7 +231,7 @@
{
ASSERT(!reachedTerminalState);
- [resource cancel];
+ [connection cancel];
// currentURL may be nil if the request was aborted
if (currentURL)
diff --git a/WebKit/WebView.subproj/WebLoader.h b/WebKit/WebView.subproj/WebLoader.h
index 92f8dd4..94c7dd4 100644
--- a/WebKit/WebView.subproj/WebLoader.h
+++ b/WebKit/WebView.subproj/WebLoader.h
@@ -18,7 +18,7 @@
{
@protected
WebDataSource *dataSource;
- NSURLConnection *resource;
+ NSURLConnection *connection;
NSURLRequest *request;
@private
WebView *controller;
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index c59800f..aba3b4d 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -34,8 +34,8 @@
[identifier release];
identifier = nil;
- [resource release];
- resource = nil;
+ [connection release];
+ connection = nil;
[controller release];
controller = nil;
@@ -65,19 +65,19 @@
- (void)startLoading:(NSURLRequest *)r
{
- [resource loadWithDelegate:self];
+ [connection loadWithDelegate:self];
}
- (BOOL)loadWithRequest:(NSURLRequest *)r
{
- ASSERT(resource == nil);
+ ASSERT(connection == nil);
- resource = [[NSURLConnection alloc] initWithRequest:r];
- if (!resource) {
+ connection = [[NSURLConnection alloc] initWithRequest:r];
+ if (!connection) {
return NO;
}
if (defersCallbacks) {
- [resource setDefersCallbacks:YES];
+ [connection setDefersCallbacks:YES];
}
[self startLoading:r];
@@ -88,7 +88,7 @@
- (void)setDefersCallbacks:(BOOL)defers
{
defersCallbacks = defers;
- [resource setDefersCallbacks:defers];
+ [connection setDefersCallbacks:defers];
}
- (BOOL)defersCallbacks
@@ -130,9 +130,9 @@
return downloadDelegate;
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
@@ -179,9 +179,9 @@
return request;
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[r retain];
@@ -192,17 +192,17 @@
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
@@ -213,9 +213,9 @@
[self _releaseResources];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)result
{
- ASSERT(resource == connection);
+ ASSERT(con == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
@@ -231,7 +231,7 @@
{
ASSERT(!reachedTerminalState);
- [resource cancel];
+ [connection cancel];
// currentURL may be nil if the request was aborted
if (currentURL)
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index d1619ec..2a35049 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -61,7 +61,7 @@
// Calling _receivedError will likely result in a call to release, so we must retain.
[self retain];
[dataSource _receivedError:error complete:YES];
- [super connection:resource didFailLoadingWithError:error];
+ [super connection:connection didFailLoadingWithError:error];
[self release];
}
@@ -77,7 +77,7 @@
-(void)cancelWithError:(WebError *)error
{
[self cancelContentPolicy];
- [resource cancel];
+ [connection cancel];
[self receivedError:error];
}
@@ -101,7 +101,7 @@
}
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
// Note that there are no asserts here as there are for the other callbacks. This is due to the
// fact that this "callback" is sent when starting every load, and the state of callback
@@ -122,7 +122,7 @@
}
// note super will make a copy for us, so reassigning newRequest is important
- newRequest = [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
+ newRequest = [super connection:con willSendRequest:newRequest redirectResponse:redirectResponse];
// Don't set this on the first request. It is set
// when the main load was started.
@@ -154,7 +154,7 @@
case WebPolicyDownload:
[proxy setDelegate:nil];
- [WebDownload _downloadWithLoadingResource:resource
+ [WebDownload _downloadWithLoadingResource:connection
request:request
response:r
delegate:[self downloadDelegate]
@@ -172,10 +172,10 @@
ASSERT_NOT_REACHED();
}
- [super connection:resource didReceiveResponse:r];
+ [super connection:connection didReceiveResponse:r];
if ([[req URL] _web_shouldLoadAsEmptyDocument]) {
- [self connectionDidFinishLoading:resource];
+ [self connectionDidFinishLoading:connection];
}
}
@@ -202,9 +202,9 @@
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -217,7 +217,7 @@
[self checkContentPolicyForResponse:r];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
ASSERT(data);
ASSERT([data length] != 0);
@@ -232,15 +232,15 @@
fromDataSource:dataSource
complete:NO];
- [super connection:connection didReceiveData:data];
+ [super connection:con didReceiveData:data];
_bytesReceived += [data length];
LOG(Loading, "%d of %d", _bytesReceived, _contentLength);
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -253,14 +253,14 @@
[[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
- [super connectionDidFinishLoading:connection];
+ [super connectionDidFinishLoading:con];
[self release];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)error
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -272,16 +272,16 @@
- (void)startLoading:(NSURLRequest *)r
{
if ([[r URL] _web_shouldLoadAsEmptyDocument]) {
- [self connection:resource willSendRequest:r redirectResponse:nil];
+ [self connection:connection willSendRequest:r redirectResponse:nil];
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
[rsp setMIMEType:@"text/html"];
[rsp setExpectedContentLength:0];
- [self connection:resource didReceiveResponse:rsp];
+ [self connection:connection didReceiveResponse:rsp];
[rsp release];
} else {
- [resource loadWithDelegate:proxy];
+ [connection loadWithDelegate:proxy];
}
}
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index d1619ec..2a35049 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -61,7 +61,7 @@
// Calling _receivedError will likely result in a call to release, so we must retain.
[self retain];
[dataSource _receivedError:error complete:YES];
- [super connection:resource didFailLoadingWithError:error];
+ [super connection:connection didFailLoadingWithError:error];
[self release];
}
@@ -77,7 +77,7 @@
-(void)cancelWithError:(WebError *)error
{
[self cancelContentPolicy];
- [resource cancel];
+ [connection cancel];
[self receivedError:error];
}
@@ -101,7 +101,7 @@
}
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
// Note that there are no asserts here as there are for the other callbacks. This is due to the
// fact that this "callback" is sent when starting every load, and the state of callback
@@ -122,7 +122,7 @@
}
// note super will make a copy for us, so reassigning newRequest is important
- newRequest = [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
+ newRequest = [super connection:con willSendRequest:newRequest redirectResponse:redirectResponse];
// Don't set this on the first request. It is set
// when the main load was started.
@@ -154,7 +154,7 @@
case WebPolicyDownload:
[proxy setDelegate:nil];
- [WebDownload _downloadWithLoadingResource:resource
+ [WebDownload _downloadWithLoadingResource:connection
request:request
response:r
delegate:[self downloadDelegate]
@@ -172,10 +172,10 @@
ASSERT_NOT_REACHED();
}
- [super connection:resource didReceiveResponse:r];
+ [super connection:connection didReceiveResponse:r];
if ([[req URL] _web_shouldLoadAsEmptyDocument]) {
- [self connectionDidFinishLoading:resource];
+ [self connectionDidFinishLoading:connection];
}
}
@@ -202,9 +202,9 @@
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)con didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -217,7 +217,7 @@
[self checkContentPolicyForResponse:r];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
{
ASSERT(data);
ASSERT([data length] != 0);
@@ -232,15 +232,15 @@
fromDataSource:dataSource
complete:NO];
- [super connection:connection didReceiveData:data];
+ [super connection:con didReceiveData:data];
_bytesReceived += [data length];
LOG(Loading, "%d of %d", _bytesReceived, _contentLength);
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -253,14 +253,14 @@
[[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
- [super connectionDidFinishLoading:connection];
+ [super connectionDidFinishLoading:con];
[self release];
}
-- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(WebError *)error
{
- ASSERT(![connection defersCallbacks]);
+ ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -272,16 +272,16 @@
- (void)startLoading:(NSURLRequest *)r
{
if ([[r URL] _web_shouldLoadAsEmptyDocument]) {
- [self connection:resource willSendRequest:r redirectResponse:nil];
+ [self connection:connection willSendRequest:r redirectResponse:nil];
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
[rsp setMIMEType:@"text/html"];
[rsp setExpectedContentLength:0];
- [self connection:resource didReceiveResponse:rsp];
+ [self connection:connection didReceiveResponse:rsp];
[rsp release];
} else {
- [resource loadWithDelegate:proxy];
+ [connection loadWithDelegate:proxy];
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list