[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 06:58:50 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5fa22083c8534823c3a4f666782a49f6268ab753
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 11 12:49:05 2002 +0000

    WebKit:
    
    	Don't ask for the content policy any more if the previous policies
    	said to save - in effect this means to ask only if the previous
    	policies said to use the content policy. Also, remove now-useless
    	previous content policy parameter from content policy delegate.
    
            * WebView.subproj/WebControllerPolicyDelegate.h:
            * WebView.subproj/WebDataSourcePrivate.m:
    	(-[WebDataSource _setContentPolicy:]): Retain new policy before
    	releasing the old one.
            * WebView.subproj/WebDefaultPolicyDelegate.m:
            * WebView.subproj/WebMainResourceClient.m:
    	(-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
    	for content policy if the delegate already decided to save.
    
    WebBrowser:
    
    	Adjusted for WebKit API change.
    
            * BrowserWebController.m:
            (-[BrowserWebController contentPolicyForResponse:andRequest:inFrame:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index eb2e40d..5befbe5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,21 @@
 2002-11-11  Maciej Stachowiak  <mjs at apple.com>
 
+	Don't ask for the content policy any more if the previous policies
+	said to save - in effect this means to ask only if the previous
+	policies said to use the content policy. Also, remove now-useless
+	previous content policy parameter from content policy delegate.
+	
+        * WebView.subproj/WebControllerPolicyDelegate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+	(-[WebDataSource _setContentPolicy:]): Retain new policy before
+	releasing the old one.
+        * WebView.subproj/WebDefaultPolicyDelegate.m:
+        * WebView.subproj/WebMainResourceClient.m:
+	(-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
+	for content policy if the delegate already decided to save.
+
+2002-11-11  Maciej Stachowiak  <mjs at apple.com>
+
 	Added new policy delegate callback to get the filename - this
 	won't be up to the content policy any more.
 	
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index eb2e40d..5befbe5 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,21 @@
 2002-11-11  Maciej Stachowiak  <mjs at apple.com>
 
+	Don't ask for the content policy any more if the previous policies
+	said to save - in effect this means to ask only if the previous
+	policies said to use the content policy. Also, remove now-useless
+	previous content policy parameter from content policy delegate.
+	
+        * WebView.subproj/WebControllerPolicyDelegate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+	(-[WebDataSource _setContentPolicy:]): Retain new policy before
+	releasing the old one.
+        * WebView.subproj/WebDefaultPolicyDelegate.m:
+        * WebView.subproj/WebMainResourceClient.m:
+	(-[WebMainResourceClient handle:didReceiveResponse:]): Don't ask
+	for content policy if the delegate already decided to save.
+
+2002-11-11  Maciej Stachowiak  <mjs at apple.com>
+
 	Added new policy delegate callback to get the filename - this
 	won't be up to the content policy any more.
 	
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index 0c36133..f9bb2ee 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -257,12 +257,10 @@ typedef enum {
     @param response The response for the partially loaded content.
     @param request A WebResourceRequest for 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 *)contentPolicyForResponse:(WebResourceResponse *)response
                                     andRequest:(WebResourceRequest *)request
-                                       inFrame:(WebFrame *)frame
-                             withContentPolicy:(WebContentPolicy *)contentPolicy;
+                                       inFrame:(WebFrame *)frame;
 
 
 /*!
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index c490eb3..bf10e91 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -302,8 +302,9 @@
 
 - (void) _setContentPolicy:(WebContentPolicy *)policy
 {
+    [policy retain];
     [_private->contentPolicy release];
-    _private->contentPolicy = [policy retain];
+    _private->contentPolicy = policy;
     [self _commitIfReady];
 }
 
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index 3398721..d97537b 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -56,8 +56,7 @@
 
 - (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
 				    andRequest:(WebResourceRequest *)request
-                                       inFrame:(WebFrame *)frame
-                             withContentPolicy:(WebContentPolicy *)contentPolicy;
+                                       inFrame:(WebFrame *)frame;
 {
     if([WebController canShowMIMEType:[response contentType]]){
         return [WebContentPolicy webPolicyWithContentAction: WebContentPolicyShow andPath:nil];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 994a3f4..8d7dffe 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -144,12 +144,17 @@
 
     // Figure out the content policy.
     WebContentPolicy *contentPolicy = [dataSource contentPolicy];
-    contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
-                                                                            andRequest:[dataSource request]
-                                                                               inFrame:[dataSource webFrame]
-                                                                     withContentPolicy:contentPolicy];
-    NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
-    [contentPolicy _setPath:saveFilename];
+
+    if ([contentPolicy policyAction] != WebPolicySave) {
+	contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
+								  andRequest:[dataSource request]
+								  inFrame:[dataSource webFrame]];
+    }
+
+    if ([contentPolicy policyAction] == WebPolicySave) {
+	NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
+	[contentPolicy _setPath:saveFilename];
+    }
 
     [dataSource _setContentPolicy:contentPolicy];
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 994a3f4..8d7dffe 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -144,12 +144,17 @@
 
     // Figure out the content policy.
     WebContentPolicy *contentPolicy = [dataSource contentPolicy];
-    contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
-                                                                            andRequest:[dataSource request]
-                                                                               inFrame:[dataSource webFrame]
-                                                                     withContentPolicy:contentPolicy];
-    NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
-    [contentPolicy _setPath:saveFilename];
+
+    if ([contentPolicy policyAction] != WebPolicySave) {
+	contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
+								  andRequest:[dataSource request]
+								  inFrame:[dataSource webFrame]];
+    }
+
+    if ([contentPolicy policyAction] == WebPolicySave) {
+	NSString *saveFilename = [[[dataSource controller] policyDelegate] saveFilenameForResponse:r andRequest:[dataSource request]];
+	[contentPolicy _setPath:saveFilename];
+    }
 
     [dataSource _setContentPolicy:contentPolicy];
 
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index 0c36133..f9bb2ee 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -257,12 +257,10 @@ typedef enum {
     @param response The response for the partially loaded content.
     @param request A WebResourceRequest for 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 *)contentPolicyForResponse:(WebResourceResponse *)response
                                     andRequest:(WebResourceRequest *)request
-                                       inFrame:(WebFrame *)frame
-                             withContentPolicy:(WebContentPolicy *)contentPolicy;
+                                       inFrame:(WebFrame *)frame;
 
 
 /*!

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list