[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:51:58 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 67548f16c76a56173d022e3a191a98cab8282cc5
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 21 21:19:17 2002 +0000
WebFoundation:
Partial fix for 2968124 - file misnamed on download
- added the "filename" method to response so that the logic for getting the correct filename for a resource is in one easy place.
- obey the "Content-Disposition" header. Not totally fixed because the parsing doesn't totally work.
* CacheLoader.subproj/WebResourceResponse.h:
* CacheLoader.subproj/WebResourceResponse.m:
(-[WebResourceResponse filename]): new, filename by using "Content-Disposition" and MIME type.
(-[WebResourceResponse _setContentType:]): no changes, but I added _setFilename
* CacheLoader.subproj/WebResourceResponsePrivate.h:
* Misc.subproj/WebFileTypeMappings.h: remove unused method
* Misc.subproj/WebFileTypeMappings.m: remove unused method
* ProtocolHandlers.subproj/WebHTTPProtocolHandler.m:
(-[WebHTTPProtocolHandler setResponseMetadata:]): call _setFilename for the "Content-Disposition"
WebKit:
Changed content policy API to pass a response instead of MIME type so client can get the mime type and filename from one class.
* WebView.subproj/WebControllerPolicyDelegate.h:
* WebView.subproj/WebDefaultPolicyDelegate.m:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient handle:didReceiveResponse:]):
WebBrowser:
Changed content policy API to pass a response instead of MIME type so client can get the mime type and filename from one class.
* BrowserWebController.m:
(-[BrowserWebController contentPolicyForResponse:andURL:inFrame:withContentPolicy:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f8ff458..a540ded 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-10-21 Chris Blumenberg <cblu at apple.com>
+
+ Changed content policy API to pass a response instead of MIME type so client can get the mime type and filename from one class.
+
+ * WebView.subproj/WebControllerPolicyDelegate.h:
+ * WebView.subproj/WebDefaultPolicyDelegate.m:
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:didReceiveResponse:]):
+
2002-10-21 Darin Adler <darin at apple.com>
- fixed 3080512 -- REGRESSION: moving from old page to new one, we get blank white
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index f8ff458..a540ded 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-10-21 Chris Blumenberg <cblu at apple.com>
+
+ Changed content policy API to pass a response instead of MIME type so client can get the mime type and filename from one class.
+
+ * WebView.subproj/WebControllerPolicyDelegate.h:
+ * WebView.subproj/WebDefaultPolicyDelegate.m:
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient handle:didReceiveResponse:]):
+
2002-10-21 Darin Adler <darin at apple.com>
- fixed 3080512 -- REGRESSION: moving from old page to new one, we get blank white
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index ade64fa..c8b80c4 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -7,9 +7,10 @@
#import <Cocoa/Cocoa.h>
- at class WebPolicyPrivate;
- at class WebFrame;
@class WebError;
+ at class WebFrame;
+ at class WebPolicyPrivate;
+ at class WebResourceResponse;
/*!
@enum WebPolicyAction
@@ -233,16 +234,16 @@ typedef enum {
- (WebFileURLPolicy *)fileURLPolicyForMIMEType: (NSString *)type inFrame:(WebFrame *)frame isDirectory: (BOOL)isDirectory;
/*!
- @method contentPolicyForMIMEType:URL:inFrame:
+ @method contentPolicyForResponse:andURL:inFrame:withContentPolicy:
@discussion Returns the policy for content which has been partially loaded. Sent after locationChangeStarted.
Implementations typically call haveContentPolicy:forLocationChangeHandler: on WebController
after determining the appropriate policy, perhaps by presenting a non-blocking dialog to the user.
- @param type MIME type of the partially loaded content.
+ @param response of the partially loaded content.
@param URL URL of the partially loaded content.
@param frame The frame which is loading the URL.
@param content policy if one was determined before the load started. nil if none was predetermined.
*/
-- (WebContentPolicy *)contentPolicyForMIMEType:(NSString *)type
+- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
andURL:(NSURL *)URL
inFrame:(WebFrame *)frame
withContentPolicy:(WebContentPolicy *)contentPolicy;
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index c33d40a..9a9deca 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -9,6 +9,7 @@
#import <WebKit/WebFrame.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
@implementation WebDefaultPolicyDelegate
@@ -50,12 +51,12 @@
}
-- (WebContentPolicy *)contentPolicyForMIMEType:(NSString *)type
+- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
andURL:(NSURL *)URL
inFrame:(WebFrame *)frame
withContentPolicy:(WebContentPolicy *)contentPolicy;
{
- if([WebController canShowMIMEType:type]){
+ if([WebController canShowMIMEType:[response contentType]]){
return [WebContentPolicy webPolicyWithContentAction: WebContentPolicyShow andPath:nil];
}
else{
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index b4e5a81..ce5e13f 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -221,15 +221,13 @@
-(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)r
{
- NSString *contentType = [r contentType];
-
ASSERT (response == nil);
response = [r retain];
[dataSource _setResponse:response];
- LOG(Download, "main content type: %@", contentType);
+ LOG(Download, "main content type: %@", [response contentType]);
// Retain the downloadProgressDelegate just in case this is a download.
// Alexander releases the WebController if no window is created for it.
@@ -238,7 +236,7 @@
// Figure out the content policy.
WebContentPolicy *contentPolicy = [dataSource contentPolicy];
- contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForMIMEType:contentType
+ contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:response
andURL:currentURL
inFrame:[dataSource webFrame]
withContentPolicy:contentPolicy];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index b4e5a81..ce5e13f 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -221,15 +221,13 @@
-(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)r
{
- NSString *contentType = [r contentType];
-
ASSERT (response == nil);
response = [r retain];
[dataSource _setResponse:response];
- LOG(Download, "main content type: %@", contentType);
+ LOG(Download, "main content type: %@", [response contentType]);
// Retain the downloadProgressDelegate just in case this is a download.
// Alexander releases the WebController if no window is created for it.
@@ -238,7 +236,7 @@
// Figure out the content policy.
WebContentPolicy *contentPolicy = [dataSource contentPolicy];
- contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForMIMEType:contentType
+ contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:response
andURL:currentURL
inFrame:[dataSource webFrame]
withContentPolicy:contentPolicy];
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index ade64fa..c8b80c4 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -7,9 +7,10 @@
#import <Cocoa/Cocoa.h>
- at class WebPolicyPrivate;
- at class WebFrame;
@class WebError;
+ at class WebFrame;
+ at class WebPolicyPrivate;
+ at class WebResourceResponse;
/*!
@enum WebPolicyAction
@@ -233,16 +234,16 @@ typedef enum {
- (WebFileURLPolicy *)fileURLPolicyForMIMEType: (NSString *)type inFrame:(WebFrame *)frame isDirectory: (BOOL)isDirectory;
/*!
- @method contentPolicyForMIMEType:URL:inFrame:
+ @method contentPolicyForResponse:andURL:inFrame:withContentPolicy:
@discussion Returns the policy for content which has been partially loaded. Sent after locationChangeStarted.
Implementations typically call haveContentPolicy:forLocationChangeHandler: on WebController
after determining the appropriate policy, perhaps by presenting a non-blocking dialog to the user.
- @param type MIME type of the partially loaded content.
+ @param response of the partially loaded content.
@param URL URL of the partially loaded content.
@param frame The frame which is loading the URL.
@param content policy if one was determined before the load started. nil if none was predetermined.
*/
-- (WebContentPolicy *)contentPolicyForMIMEType:(NSString *)type
+- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
andURL:(NSURL *)URL
inFrame:(WebFrame *)frame
withContentPolicy:(WebContentPolicy *)contentPolicy;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list