[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:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 98f22249749b50ae7c9961bd7d572c66bfaa4286
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 28 16:28:36 2003 +0000
Tests:
Reviewed by Darin
Changed names for URL connection callback methods to
use the API-approved names. No functional changes.
* PDFBundle/PDFView.m:
(-[PDFResourceDelegate connection:willSendRequest:redirectResponse:]):
(-[PDFResourceDelegate connection:didReceiveResponse:]):
(-[PDFResourceDelegate connection:didReceiveData:]):
(-[PDFResourceDelegate connectionDidFinishLoading:]):
(-[PDFResourceDelegate connection:didFailLoadingWithError:]):
WebFoundation:
Reviewed by Darin
Changed names for URL connection callback methods to
use the API-approved names. No functional changes.
* CacheLoader.subproj/NSURLConnection.h:
* CacheLoader.subproj/NSURLConnection.m:
(-[NSURLConnection _sendWillSendRequestCallback]):
(-[NSURLConnection _sendDidReceiveResponseCallback]):
(-[NSURLConnection _sendDidReceiveDataCallback]):
(-[NSURLConnection _sendDidFailLoadingCallback]):
(-[NSURLConnection _sendDidFinishLoadingCallback]):
* CacheLoader.subproj/WebSynchronousDelegate.m:
(-[WebSynchronousDelegate connection:willSendRequest:redirectResponse:]):
(-[WebSynchronousDelegate connectionDidFinishLoading:]):
(-[WebSynchronousDelegate connection:didReceiveResponse:]):
(-[WebSynchronousDelegate connection:didReceiveData:]):
WebKit:
Reviewed by Darin
Changed names for URL connection callback methods to
use the API-approved names. No functional changes.
* Downloads.subproj/WebDownload.h:
* Downloads.subproj/WebDownload.m:
(-[WebDownload _initWithLoadingResource:request:response:delegate:proxy:]):
(-[WebDownload connection:willSendRequest:redirectResponse:]):
(-[WebDownload connection:didReceiveResponse:]):
(-[WebDownload connection:didReceiveData:]):
(-[WebDownload connectionDidFinishLoading:]):
(-[WebDownload connection:didFailLoadingWithError:]):
* Misc.subproj/WebIconLoader.m:
(-[WebIconLoader connectionDidFinishLoading:]):
(-[WebIconLoader connection:willSendRequest:redirectResponse:]):
(-[WebIconLoader connection:didReceiveResponse:]):
(-[WebIconLoader connection:didReceiveData:]):
(-[WebIconLoader connection:didFailLoadingWithError:]):
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream connection:didReceiveResponse:]):
(-[WebNetscapePluginStream connection:didReceiveData:]):
(-[WebNetscapePluginStream connectionDidFinishLoading:]):
(-[WebNetscapePluginStream connection:didFailLoadingWithError:]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient connection:willSendRequest:redirectResponse:]):
(-[WebSubresourceClient connection:didReceiveResponse:]):
(-[WebSubresourceClient connection:didReceiveData:]):
(-[WebSubresourceClient connectionDidFinishLoading:]):
(-[WebSubresourceClient connection:didFailLoadingWithError:]):
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]):
(-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
(-[WebBaseResourceHandleDelegate connection:didReceiveData:]):
(-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
(-[WebBaseResourceHandleDelegate connection:didFailLoadingWithError:]):
* WebView.subproj/WebDefaultResourceLoadDelegate.m:
(-[WebDefaultResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient receivedError:]):
(-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
(-[WebMainResourceClient continueAfterContentPolicy:response:]):
(-[WebMainResourceClient connection:didReceiveResponse:]):
(-[WebMainResourceClient connection:didReceiveData:]):
(-[WebMainResourceClient connectionDidFinishLoading:]):
(-[WebMainResourceClient connection:didFailLoadingWithError:]):
(-[WebMainResourceClient startLoading:]):
(-[WebResourceDelegateProxy connection:willSendRequest:redirectResponse:]):
(-[WebResourceDelegateProxy connection:didReceiveResponse:]):
(-[WebResourceDelegateProxy connection:didReceiveData:]):
(-[WebResourceDelegateProxy connectionDidFinishLoading:]):
(-[WebResourceDelegateProxy connection:didFailLoadingWithError:]):
* WebView.subproj/WebResourceLoadDelegate.h:
WebBrowser:
Reviewed by Darin
Changed names for URL connection callback methods to
use the API-approved names. No functional changes.
* BugReportController.m:
(-[BugReportController connection:willSendRequest:redirectResponse:]):
(-[BugReportController connection:didReceiveResponse:]):
(-[BugReportController connection:didReceiveData:]):
(-[BugReportController connectionDidFinishLoading:]):
(-[BugReportController connection:didFailLoadingWithError:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 23822ec..5a0c406 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,61 @@
+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.
+
+ * Downloads.subproj/WebDownload.h:
+ * Downloads.subproj/WebDownload.m:
+ (-[WebDownload _initWithLoadingResource:request:response:delegate:proxy:]):
+ (-[WebDownload connection:willSendRequest:redirectResponse:]):
+ (-[WebDownload connection:didReceiveResponse:]):
+ (-[WebDownload connection:didReceiveData:]):
+ (-[WebDownload connectionDidFinishLoading:]):
+ (-[WebDownload connection:didFailLoadingWithError:]):
+ * Misc.subproj/WebIconLoader.m:
+ (-[WebIconLoader connectionDidFinishLoading:]):
+ (-[WebIconLoader connection:willSendRequest:redirectResponse:]):
+ (-[WebIconLoader connection:didReceiveResponse:]):
+ (-[WebIconLoader connection:didReceiveData:]):
+ (-[WebIconLoader connection:didFailLoadingWithError:]):
+ * Plugins.subproj/WebNetscapePluginStream.m:
+ (-[WebNetscapePluginStream connection:didReceiveResponse:]):
+ (-[WebNetscapePluginStream connection:didReceiveData:]):
+ (-[WebNetscapePluginStream connectionDidFinishLoading:]):
+ (-[WebNetscapePluginStream connection:didFailLoadingWithError:]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (-[WebSubresourceClient connection:willSendRequest:redirectResponse:]):
+ (-[WebSubresourceClient connection:didReceiveResponse:]):
+ (-[WebSubresourceClient connection:didReceiveData:]):
+ (-[WebSubresourceClient connectionDidFinishLoading:]):
+ (-[WebSubresourceClient connection:didFailLoadingWithError:]):
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]):
+ (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
+ (-[WebBaseResourceHandleDelegate connection:didReceiveData:]):
+ (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
+ (-[WebBaseResourceHandleDelegate connection:didFailLoadingWithError:]):
+ * WebView.subproj/WebDefaultResourceLoadDelegate.m:
+ (-[WebDefaultResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient receivedError:]):
+ (-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
+ (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+ (-[WebMainResourceClient connection:didReceiveResponse:]):
+ (-[WebMainResourceClient connection:didReceiveData:]):
+ (-[WebMainResourceClient connectionDidFinishLoading:]):
+ (-[WebMainResourceClient connection:didFailLoadingWithError:]):
+ (-[WebMainResourceClient startLoading:]):
+ (-[WebResourceDelegateProxy connection:willSendRequest:redirectResponse:]):
+ (-[WebResourceDelegateProxy connection:didReceiveResponse:]):
+ (-[WebResourceDelegateProxy connection:didReceiveData:]):
+ (-[WebResourceDelegateProxy connectionDidFinishLoading:]):
+ (-[WebResourceDelegateProxy connection:didFailLoadingWithError:]):
+ * WebView.subproj/WebResourceLoadDelegate.h:
+
2003-03-27 Chris Blumenberg <cblu at apple.com>
Left out a "!" in my last check-in.
diff --git a/WebKit/Downloads.subproj/WebDownload.h b/WebKit/Downloads.subproj/WebDownload.h
index f0de420..3c45264 100644
--- a/WebKit/Downloads.subproj/WebDownload.h
+++ b/WebKit/Downloads.subproj/WebDownload.h
@@ -63,7 +63,7 @@
- (void)download:(WebDownload *)download didStartFromRequest:(NSURLRequest *)request;
/*!
- @method download:willSendRequest:
+ @method download:willSendRequest:redirectResponse:
@abstract This method is called whenever the download is about to load a request or if the download
must load another request because the previous request was redirected.
@discussion This method is called with a copy of the request that was passed with
@@ -74,7 +74,7 @@
@result The request to be used; either the request parameter or a replacement. If nil is returned,
the download is cancelled.
*/
-- (NSURLRequest *)download:(WebDownload *)download willSendRequest:(NSURLRequest *)request;
+- (NSURLRequest *)download:(WebDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse;
/*!
@method download:didReceiveResponse:
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index d0fc5f6..5a02da3 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -200,8 +200,8 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
[_private->delegate download:self didStartFromRequest:_private->request];
}
- if ([_private->delegate respondsToSelector:@selector(download:willSendRequest:)]) {
- NSURLRequest *request = [_private->delegate download:self willSendRequest:_private->request];
+ 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.
[self cancel];
@@ -320,12 +320,12 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
}
}
--(NSURLRequest *)resource:(NSURLConnection *)resource willSendRequest:(NSURLRequest *)theRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)theRequest redirectResponse:(NSURLResponse *)redirectResponse
{
NSURLRequest *request = nil;
- if ([_private->delegate respondsToSelector:@selector(download:willSendRequest:)]) {
- request = [_private->delegate download:self willSendRequest:theRequest];
+ if ([_private->delegate respondsToSelector:@selector(download:willSendRequest:redirectResponse:)]) {
+ request = [_private->delegate download:self willSendRequest:theRequest redirectResponse:redirectResponse];
} else {
request = theRequest;
}
@@ -339,7 +339,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
return request;
}
--(void)resource:(NSURLConnection *)resource didReceiveResponse:(NSURLResponse *)response
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
[self _setResponse:response];
@@ -348,7 +348,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
}
}
--(void)resource:(NSURLConnection *)resource didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
if ([_private->delegate respondsToSelector:@selector(download:didReceiveDataOfLength:)]) {
[_private->delegate download:self didReceiveDataOfLength:[data length]];
@@ -360,7 +360,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
}
}
--(void)resourceDidFinishLoading:(NSURLConnection *)resource
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
WebError *error = [self _decodeData:_private->bufferedData];
[_private->bufferedData release];
@@ -379,7 +379,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
[self _closeFileAsync];
}
--(void)resource:(NSURLConnection *)resource didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
{
[self _cancelWithError:error];
}
diff --git a/WebKit/Misc.subproj/WebIconLoader.m b/WebKit/Misc.subproj/WebIconLoader.m
index 61dc131..55a73fd 100644
--- a/WebKit/Misc.subproj/WebIconLoader.m
+++ b/WebKit/Misc.subproj/WebIconLoader.m
@@ -99,7 +99,7 @@
_private->handle = nil;
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)sender
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSImage *icon = [[NSImage alloc] initWithData:_private->resourceData];
if (icon) {
@@ -109,23 +109,26 @@
}
}
--(NSURLRequest *)resource:(NSURLConnection *)resource willSendRequest:(NSURLRequest *)request
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
{
return request;
}
--(void)resource:(NSURLConnection *)resource didReceiveResponse:(NSURLResponse *)theResponse
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)theResponse
{
// no-op
+
+ // no-op
}
-- (void)resource:(NSURLConnection *)sender didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[_private->resourceData appendData:data];
}
-- (void)resource:(NSURLConnection *)sender didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
{
+
}
@end
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginStream.m b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
index 547efcb..67497b9 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
@@ -74,13 +74,13 @@
}
}
-- (void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)theResponse
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)theResponse
{
[self setResponse:theResponse];
- [super resource:h didReceiveResponse:theResponse];
+ [super connection:connection didReceiveResponse:theResponse];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
if (transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY) {
[resourceData appendData:data];
@@ -88,10 +88,10 @@
[self receivedData:data];
- [super resource:h didReceiveData:data];
+ [super connection:connection didReceiveData:data];
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
[[view controller] _finishedLoadingResourceFromDataSource:[view dataSource]];
[self finishedLoadingWithData:resourceData];
@@ -99,10 +99,10 @@
[view release];
view = nil;
- [super resourceDidFinishLoading: h];
+ [super connectionDidFinishLoading:connection];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
{
[[view controller] _receivedError:result fromDataSource:[view dataSource]];
@@ -111,7 +111,7 @@
[view release];
view = nil;
- [super resource:h didFailLoadingWithError:result];
+ [super connection:connection didFailLoadingWithError:result];
}
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 93276f3..671bf32 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -346,7 +346,7 @@
id _delegate = [c _resourceLoadDelegateForwarder];
id identifier;
- // No chance for delegate to modify request, so we don't send a willSendRequest: message.
+ // No chance for delegate to modify request, so we don't send a willSendRequest:redirectResponse: message.
if ([delegate respondsToSelector:@selector(webView:identifierForInitialRequest:fromDataSource:)])
identifier = [delegate webView:c identifierForInitialRequest: request fromDataSource: [self dataSource]];
else
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 251498c..ba4f9c0 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -78,7 +78,7 @@
[[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection 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 resource: h willSendRequest: newRequest];
+ return [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
ASSERT(r);
[loader receivedResponse:r];
- [super resource:h didReceiveResponse:r];
+ [super connection:connection didReceiveResponse:r];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[loader addData:data];
- [super resource:h didReceiveData:data];
+ [super connection:connection didReceiveData:data];
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -117,10 +117,10 @@
[self release];
- [super resourceDidFinishLoading:h];
+ [super connectionDidFinishLoading:connection];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection 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 resource:h didFailLoadingWithError:error];
+ [super connection:connection didFailLoadingWithError:error];
[self release];
}
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 251498c..ba4f9c0 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -78,7 +78,7 @@
[[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection 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 resource: h willSendRequest: newRequest];
+ return [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
ASSERT(r);
[loader receivedResponse:r];
- [super resource:h didReceiveResponse:r];
+ [super connection:connection didReceiveResponse:r];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[loader addData:data];
- [super resource:h didReceiveData:data];
+ [super connection:connection didReceiveData:data];
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
// Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
[self retain];
@@ -117,10 +117,10 @@
[self release];
- [super resourceDidFinishLoading:h];
+ [super connectionDidFinishLoading:connection];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection 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 resource:h didFailLoadingWithError:error];
+ [super connection:connection didFailLoadingWithError:error];
[self release];
}
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index b86b1fe..c59800f 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -130,9 +130,9 @@
return downloadDelegate;
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
@@ -150,10 +150,10 @@
}
if (resourceLoadDelegate) {
- if ([resourceLoadDelegate respondsToSelector: @selector(webView:resource:willSendRequest:fromDataSource:)])
- newRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ if ([resourceLoadDelegate respondsToSelector: @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:)])
+ newRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:newRequest redirectResponse:redirectResponse fromDataSource:dataSource];
else
- newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:newRequest redirectResponse:redirectResponse fromDataSource:dataSource];
}
// Store a copy of the request.
@@ -179,9 +179,9 @@
return request;
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[r retain];
@@ -192,17 +192,17 @@
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
@@ -213,9 +213,9 @@
[self _releaseResources];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
diff --git a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
index ee89173..a2a9f93 100644
--- a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
@@ -33,7 +33,7 @@ static WebDefaultResourceLoadDelegate *sharedDelegate = nil;
return [[[NSObject alloc] init] autorelease];
}
--(NSURLRequest *)webView: (WebView *)wv resource:identifier willSendRequest: (NSURLRequest *)newRequest fromDataSource:(WebDataSource *)dataSource
+-(NSURLRequest *)webView: (WebView *)wv resource:identifier willSendRequest: (NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource
{
return newRequest;
}
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index b86b1fe..c59800f 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -130,9 +130,9 @@
return downloadDelegate;
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
@@ -150,10 +150,10 @@
}
if (resourceLoadDelegate) {
- if ([resourceLoadDelegate respondsToSelector: @selector(webView:resource:willSendRequest:fromDataSource:)])
- newRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ if ([resourceLoadDelegate respondsToSelector: @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:)])
+ newRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:newRequest redirectResponse:redirectResponse fromDataSource:dataSource];
else
- newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:newRequest redirectResponse:redirectResponse fromDataSource:dataSource];
}
// Store a copy of the request.
@@ -179,9 +179,9 @@
return request;
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[r retain];
@@ -192,17 +192,17 @@
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
@@ -213,9 +213,9 @@
[self _releaseResources];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)result
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)result
{
- ASSERT(resource == h);
+ ASSERT(resource == connection);
ASSERT(!reachedTerminalState);
[[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 309c4af..d1619ec 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 resource:resource didFailLoadingWithError:error];
+ [super connection:resource didFailLoadingWithError:error];
[self release];
}
@@ -101,7 +101,7 @@
}
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection 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 resource:h willSendRequest:newRequest];
+ newRequest = [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
// Don't set this on the first request. It is set
// when the main load was started.
@@ -172,10 +172,10 @@
ASSERT_NOT_REACHED();
}
- [super resource:resource didReceiveResponse:r];
+ [super connection:resource didReceiveResponse:r];
if ([[req URL] _web_shouldLoadAsEmptyDocument]) {
- [self resourceDidFinishLoading:resource];
+ [self connectionDidFinishLoading:resource];
}
}
@@ -202,9 +202,9 @@
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -217,11 +217,11 @@
[self checkContentPolicyForResponse:r];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
ASSERT(data);
ASSERT([data length] != 0);
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -232,15 +232,15 @@
fromDataSource:dataSource
complete:NO];
- [super resource:h didReceiveData:data];
+ [super connection:connection didReceiveData:data];
_bytesReceived += [data length];
LOG(Loading, "%d of %d", _bytesReceived, _contentLength);
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -253,14 +253,14 @@
[[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
- [super resourceDidFinishLoading:h];
+ [super connectionDidFinishLoading:connection];
[self release];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -272,13 +272,13 @@
- (void)startLoading:(NSURLRequest *)r
{
if ([[r URL] _web_shouldLoadAsEmptyDocument]) {
- [self resource:resource willSendRequest:r];
+ [self connection:resource willSendRequest:r redirectResponse:nil];
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
[rsp setMIMEType:@"text/html"];
[rsp setExpectedContentLength:0];
- [self resource:resource didReceiveResponse:rsp];
+ [self connection:resource didReceiveResponse:rsp];
[rsp release];
} else {
[resource loadWithDelegate:proxy];
@@ -302,34 +302,34 @@
delegate = theDelegate;
}
-- (NSURLRequest *)resource:(NSURLConnection *)resource willSendRequest:(NSURLRequest *)request
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
{
ASSERT(delegate);
- return [delegate resource:resource willSendRequest:request];
+ return [delegate connection:connection willSendRequest:request redirectResponse:redirectResponse];
}
--(void)resource:(NSURLConnection *)resource didReceiveResponse:(NSURLResponse *)response
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
ASSERT(delegate);
- [delegate resource:resource didReceiveResponse:response];
+ [delegate connection:connection didReceiveResponse:response];
}
--(void)resource:(NSURLConnection *)resource didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
ASSERT(delegate);
- [delegate resource:resource didReceiveData:data];
+ [delegate connection:connection didReceiveData:data];
}
--(void)resourceDidFinishLoading:(NSURLConnection *)resource
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
ASSERT(delegate);
- [delegate resourceDidFinishLoading:resource];
+ [delegate connectionDidFinishLoading:connection];
}
--(void)resource:(NSURLConnection *)resource didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
{
ASSERT(delegate);
- [delegate resource:resource didFailLoadingWithError:error];
+ [delegate connection:connection didFailLoadingWithError:error];
}
@end
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 309c4af..d1619ec 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 resource:resource didFailLoadingWithError:error];
+ [super connection:resource didFailLoadingWithError:error];
[self release];
}
@@ -101,7 +101,7 @@
}
}
--(NSURLRequest *)resource:(NSURLConnection *)h willSendRequest:(NSURLRequest *)newRequest
+- (NSURLRequest *)connection:(NSURLConnection *)connection 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 resource:h willSendRequest:newRequest];
+ newRequest = [super connection:connection willSendRequest:newRequest redirectResponse:redirectResponse];
// Don't set this on the first request. It is set
// when the main load was started.
@@ -172,10 +172,10 @@
ASSERT_NOT_REACHED();
}
- [super resource:resource didReceiveResponse:r];
+ [super connection:resource didReceiveResponse:r];
if ([[req URL] _web_shouldLoadAsEmptyDocument]) {
- [self resourceDidFinishLoading:resource];
+ [self connectionDidFinishLoading:resource];
}
}
@@ -202,9 +202,9 @@
}
--(void)resource:(NSURLConnection *)h didReceiveResponse:(NSURLResponse *)r
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -217,11 +217,11 @@
[self checkContentPolicyForResponse:r];
}
-- (void)resource:(NSURLConnection *)h didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
ASSERT(data);
ASSERT([data length] != 0);
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -232,15 +232,15 @@
fromDataSource:dataSource
complete:NO];
- [super resource:h didReceiveData:data];
+ [super connection:connection didReceiveData:data];
_bytesReceived += [data length];
LOG(Loading, "%d of %d", _bytesReceived, _contentLength);
}
-- (void)resourceDidFinishLoading:(NSURLConnection *)h
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -253,14 +253,14 @@
[[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
- [super resourceDidFinishLoading:h];
+ [super connectionDidFinishLoading:connection];
[self release];
}
-- (void)resource:(NSURLConnection *)h didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
{
- ASSERT(![h defersCallbacks]);
+ ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
@@ -272,13 +272,13 @@
- (void)startLoading:(NSURLRequest *)r
{
if ([[r URL] _web_shouldLoadAsEmptyDocument]) {
- [self resource:resource willSendRequest:r];
+ [self connection:resource willSendRequest:r redirectResponse:nil];
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
[rsp setMIMEType:@"text/html"];
[rsp setExpectedContentLength:0];
- [self resource:resource didReceiveResponse:rsp];
+ [self connection:resource didReceiveResponse:rsp];
[rsp release];
} else {
[resource loadWithDelegate:proxy];
@@ -302,34 +302,34 @@
delegate = theDelegate;
}
-- (NSURLRequest *)resource:(NSURLConnection *)resource willSendRequest:(NSURLRequest *)request
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
{
ASSERT(delegate);
- return [delegate resource:resource willSendRequest:request];
+ return [delegate connection:connection willSendRequest:request redirectResponse:redirectResponse];
}
--(void)resource:(NSURLConnection *)resource didReceiveResponse:(NSURLResponse *)response
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
ASSERT(delegate);
- [delegate resource:resource didReceiveResponse:response];
+ [delegate connection:connection didReceiveResponse:response];
}
--(void)resource:(NSURLConnection *)resource didReceiveData:(NSData *)data
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
ASSERT(delegate);
- [delegate resource:resource didReceiveData:data];
+ [delegate connection:connection didReceiveData:data];
}
--(void)resourceDidFinishLoading:(NSURLConnection *)resource
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
ASSERT(delegate);
- [delegate resourceDidFinishLoading:resource];
+ [delegate connectionDidFinishLoading:connection];
}
--(void)resource:(NSURLConnection *)resource didFailLoadingWithError:(WebError *)error
+- (void)connection:(NSURLConnection *)connection didFailLoadingWithError:(WebError *)error
{
ASSERT(delegate);
- [delegate resource:resource didFailLoadingWithError:error];
+ [delegate connection:connection didFailLoadingWithError:error];
}
@end
diff --git a/WebKit/WebView.subproj/WebResourceLoadDelegate.h b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
index ec35cef..b2f0906 100644
--- a/WebKit/WebView.subproj/WebResourceLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
@@ -19,7 +19,7 @@
The various progress methods of this protocol all receive an identifier as the
parameter. This identifier can be used to track messages associated with a single
resource. For example, a single resource may generate multiple
- resource:willSendRequest:fromDataSource: messages as it's URL is redirected.
+ resource:willSendRequest:redirectResponse:fromDataSource: messages as it's URL is redirected.
*/
@interface NSObject (WebResourceLoadDelegate)
@@ -32,14 +32,14 @@
that can be used to track the load of a single resource. This identifier will be
passed as the first argument for all of the other WebResourceLoadDelegate methods. The
identifier is useful to track changes to a resources request, which will be
- provided by one or more calls to resource:willSendRequest:fromDataSource:.
+ provided by one or more calls to resource:willSendRequest:redirectResponse:fromDataSource:.
@result An identifier that will be passed back to the implementor for each callback.
The identifier will be retained.
*/
- webView:(WebView *)sender identifierForInitialRequest: (NSURLRequest *)request fromDataSource: (WebDataSource *)dataSource;
/*!
- @method resource:willSendRequest:fromDataSource:
+ @method resource:willSendRequest:redirectResponse:fromDataSource:
@discussion This message is sent before a load is initiated. The request may be modified
as necessary by the receiver.
@param webView The WebView sending the message.
@@ -50,7 +50,7 @@
@result Returns the request, which may be mutated by the implementor, although typically
will be request.
*/
--(NSURLRequest *)webView:(WebView *)sender resource:identifier willSendRequest: (NSURLRequest *)request fromDataSource:(WebDataSource *)dataSource;
+-(NSURLRequest *)webView:(WebView *)sender resource:identifier willSendRequest: (NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didReceiveResponse:fromDataSource:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list