[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:14:23 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6c698857d75a6962e254972242ad57564787b707
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 21 00:53:22 2003 +0000
Reviewed by Darin.
- fixed 3487201 - Implement abort for XMLHttpRequest async loads
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge startLoadingResource:withURL:postData:]):
* WebCoreSupport.subproj/WebSubresourceClient.h:
* WebCoreSupport.subproj/WebSubresourceClient.m:
(+[WebSubresourceClient startLoadingResource:withRequest:referrer:forDataSource:]):
(+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
(+[WebSubresourceClient startLoadingResource:withURL:postData:referrer:forDataSource:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 4806d28..ad14413 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2003-11-20 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3487201 - Implement abort for XMLHttpRequest async loads
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge startLoadingResource:withURL:postData:]):
+ * WebCoreSupport.subproj/WebSubresourceClient.h:
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (+[WebSubresourceClient startLoadingResource:withRequest:referrer:forDataSource:]):
+ (+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
+ (+[WebSubresourceClient startLoadingResource:withURL:postData:referrer:forDataSource:]):
+
2003-11-20 Chris Blumenberg <cblu at apple.com>
Fixed: <rdar://problem/3491229>: Need UI and localized strings for <KEYGEN> support
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 19ad229..57d78c2 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -377,6 +377,21 @@
forDataSource:[self dataSource]];
}
+- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL postData:(NSData *)data
+{
+ // If we are no longer attached to a WebView, this must be an attempted load from an
+ // onUnload handler, so let's just block it.
+ if ([[self dataSource] _webView] == nil) {
+ return nil;
+ }
+
+ return [WebSubresourceClient startLoadingResource:resourceLoader
+ withURL:URL
+ postData:data
+ referrer:[self referrer]
+ forDataSource:[self dataSource]];
+}
+
- (void)objectLoadedFromCacheWithURL:(NSURL *)URL response: response size:(unsigned)bytes
{
ASSERT(_frame != nil);
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h
index e4cb20e..b27f663 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.h
@@ -20,4 +20,7 @@
+ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source;
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL postData:(NSData *)data referrer:(NSString *)referrer forDataSource:(WebDataSource *)source;
+
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 2276261..4aad3c5 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -40,22 +40,22 @@
}
+ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
- withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+ withRequest:(NSMutableURLRequest *)newRequest
+ referrer:(NSString *)referrer
+ forDataSource:(WebDataSource *)source
{
WebSubresourceClient *client = [[[self alloc] initWithLoader:rLoader dataSource:source] autorelease];
[source _addSubresourceClient:client];
- NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
[newRequest setCachePolicy:[[source request] cachePolicy]];
[newRequest setHTTPReferrer:referrer];
WebView *_webView = [source _webView];
[newRequest setMainDocumentURL:[[[[_webView mainFrame] dataSource] request] URL]];
- [newRequest setHTTPUserAgent:[_webView userAgentForURL:URL]];
+ [newRequest setHTTPUserAgent:[_webView userAgentForURL:[newRequest URL]]];
BOOL succeeded = [client loadWithRequest:newRequest];
- [newRequest release];
if (!succeeded) {
[source _removeSubresourceClient:client];
@@ -64,7 +64,7 @@
NSError *badURLError = [[NSError alloc] _webKitErrorWithDomain:NSURLErrorDomain
code:NSURLErrorBadURL
- URL:URL];
+ URL:[newRequest URL]];
[_webView _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
@@ -73,6 +73,29 @@
return client;
}
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+{
+ NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
+ WebSubresourceClient *client = [self startLoadingResource:rLoader withRequest:newRequest referrer:referrer forDataSource:source];
+ [newRequest release];
+
+ return client;
+}
+
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL postData:(NSData *)data referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+{
+ NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
+ [newRequest setHTTPMethod:@"POST"];
+ [newRequest setHTTPBody:data];
+ WebSubresourceClient *client = [self startLoadingResource:rLoader withRequest:newRequest referrer:referrer forDataSource:source];
+ [newRequest release];
+
+ return client;
+
+}
+
- (void)receivedError:(NSError *)error
{
[[dataSource _webView] _receivedError:error fromDataSource:dataSource];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
index e4cb20e..b27f663 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
@@ -20,4 +20,7 @@
+ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source;
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL postData:(NSData *)data referrer:(NSString *)referrer forDataSource:(WebDataSource *)source;
+
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 2276261..4aad3c5 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -40,22 +40,22 @@
}
+ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
- withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+ withRequest:(NSMutableURLRequest *)newRequest
+ referrer:(NSString *)referrer
+ forDataSource:(WebDataSource *)source
{
WebSubresourceClient *client = [[[self alloc] initWithLoader:rLoader dataSource:source] autorelease];
[source _addSubresourceClient:client];
- NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
[newRequest setCachePolicy:[[source request] cachePolicy]];
[newRequest setHTTPReferrer:referrer];
WebView *_webView = [source _webView];
[newRequest setMainDocumentURL:[[[[_webView mainFrame] dataSource] request] URL]];
- [newRequest setHTTPUserAgent:[_webView userAgentForURL:URL]];
+ [newRequest setHTTPUserAgent:[_webView userAgentForURL:[newRequest URL]]];
BOOL succeeded = [client loadWithRequest:newRequest];
- [newRequest release];
if (!succeeded) {
[source _removeSubresourceClient:client];
@@ -64,7 +64,7 @@
NSError *badURLError = [[NSError alloc] _webKitErrorWithDomain:NSURLErrorDomain
code:NSURLErrorBadURL
- URL:URL];
+ URL:[newRequest URL]];
[_webView _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
@@ -73,6 +73,29 @@
return client;
}
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+{
+ NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
+ WebSubresourceClient *client = [self startLoadingResource:rLoader withRequest:newRequest referrer:referrer forDataSource:source];
+ [newRequest release];
+
+ return client;
+}
+
++ (WebSubresourceClient *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
+ withURL:(NSURL *)URL postData:(NSData *)data referrer:(NSString *)referrer forDataSource:(WebDataSource *)source
+{
+ NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
+ [newRequest setHTTPMethod:@"POST"];
+ [newRequest setHTTPBody:data];
+ WebSubresourceClient *client = [self startLoadingResource:rLoader withRequest:newRequest referrer:referrer forDataSource:source];
+ [newRequest release];
+
+ return client;
+
+}
+
- (void)receivedError:(NSError *)error
{
[[dataSource _webView] _receivedError:error fromDataSource:dataSource];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list