[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 07:39:32 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 32b286c20b38b8fe2ded9bd7c6a4c28be881d85b
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Apr 30 22:48:37 2003 +0000

    WebFoundation:
    
            Reviewed by Darin.
    
    	Converted download code to use an
    	NSURLDownloadAuthenticationChallenge rather than a vanilla
    	NSURLAuthenticationChallenge.
    
            * AuthenticationManager.subproj/NSURLCredential.h:
            * AuthenticationManager.subproj/NSURLCredential.m:
            (-[NSURLCredential initWithUser:password:persistence:]):
            (-[NSURLCredential dealloc]):
            (-[NSURLCredential user]):
            (-[NSURLCredential password]):
            (-[NSURLCredential hasPassword]):
            (-[NSURLCredential persistence]):
            (-[NSURLCredential description]):
            * AuthenticationManager.subproj/NSURLDownloadAuthenticationChallenge.h:
            * AuthenticationManager.subproj/NSURLDownloadAuthenticationChallenge.m: Added.
            (-[NSURLDownloadAuthenticationChallengeInternal initWithDownload:]):
            (-[NSURLDownloadAuthenticationChallengeInternal dealloc]):
            (-[NSURLDownloadAuthenticationChallenge _initWithAuthenticationChallenge:download:]):
            (-[NSURLDownloadAuthenticationChallenge dealloc]):
            (-[NSURLDownloadAuthenticationChallenge download]):
            * AuthenticationManager.subproj/NSURLDownloadAuthenticationChallengeInternal.h: Added.
            * FileTransfer.subproj/NSURLDownload.m:
            (-[NSURLDownload connection:didReceiveAuthenticationChallenge:]):
            (-[NSURLDownload connection:didCancelAuthenticationChallenge:]):
            (-[NSURLDownload useCredential:forAuthenticationChallenge:]):
            (-[NSURLDownload continueWithoutCredentialForAuthenticationChallenge:]):
            (-[NSURLDownload _cancelWithError:]):
            * WebFoundation-base.exp:
            * WebFoundation.pbproj/project.pbxproj:
    
    WebKit:
    
            Reviewed by Darin.
    
    	Converted download code to use an
    	NSURLDownloadAuthenticationChallenge rather than a vanilla
    	NSURLAuthenticationChallenge.
    
            * Misc.subproj/WebDownload.m:
            (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
            (-[WebDownloadInternal download:didCancelAuthenticationChallenge:]):
            * Panels.subproj/WebPanelAuthenticationHandler.h:
            * Panels.subproj/WebPanelAuthenticationHandler.m:
            (-[WebPanelAuthenticationHandler startAuthentication:window:]):
            (-[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4225 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1d816b7..1de31f8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2003-04-30  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+	
+	Converted download code to use an
+	NSURLDownloadAuthenticationChallenge rather than a vanilla
+	NSURLAuthenticationChallenge.
+
+        * Misc.subproj/WebDownload.m:
+        (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
+        (-[WebDownloadInternal download:didCancelAuthenticationChallenge:]):
+        * Panels.subproj/WebPanelAuthenticationHandler.h:
+        * Panels.subproj/WebPanelAuthenticationHandler.m:
+        (-[WebPanelAuthenticationHandler startAuthentication:window:]):
+        (-[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]):
+
 2003-04-30  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Richard
diff --git a/WebKit/Misc.subproj/WebDownload.m b/WebKit/Misc.subproj/WebDownload.m
index dbce13e..e750ef6 100644
--- a/WebKit/Misc.subproj/WebDownload.m
+++ b/WebKit/Misc.subproj/WebDownload.m
@@ -5,6 +5,7 @@
 #import <WebKit/WebDownload.h>
 
 #import <WebFoundation/NSURLDownload.h>
+#import <WebFoundation/NSURLDownloadAuthenticationChallenge.h>
 #import <WebFoundation/NSURLDownloadPrivate.h>
 #import <WebKit/WebPanelAuthenticationHandler.h>
 
@@ -82,7 +83,7 @@
 	    window = [realDelegate downloadWindowForAuthenticationSheet:webDownload];
 	}
 
-	[[WebPanelAuthenticationHandler sharedHandler] startAuthentication:(NSURLConnectionAuthenticationChallenge *)challenge window:window];
+	[[WebPanelAuthenticationHandler sharedHandler] startAuthentication:challenge window:window];
     }
 }
 
@@ -91,7 +92,7 @@
     if ([realDelegate respondsToSelector:@selector(download:didCancelAuthenticationChallenge:)]) {
 	[realDelegate download:download didCancelAuthenticationChallenge:challenge];
     } else {
-	// cancel auth
+	[[WebPanelAuthenticationHandler sharedHandler] cancelAuthentication:challenge];
     }
 }
 
diff --git a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h
index 65230d2..c887a52 100644
--- a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h
+++ b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h
@@ -7,7 +7,7 @@
 #import <Foundation/Foundation.h>
 #import <WebFoundation/NSURLCredentialStorage.h>
 
- at class NSURLConnectionAuthenticationChallenge;
+ at class NSURLAuthenticationChallenge;
 
 @interface WebPanelAuthenticationHandler : NSObject
 {
@@ -16,7 +16,7 @@
 }
 
 + (id)sharedHandler;
-- (void)startAuthentication:(NSURLConnectionAuthenticationChallenge *)challenge window:(NSWindow *)w;
-- (void)cancelAuthentication:(NSURLConnectionAuthenticationChallenge *)challenge;
+- (void)startAuthentication:(NSURLAuthenticationChallenge *)challenge window:(NSWindow *)w;
+- (void)cancelAuthentication:(NSURLAuthenticationChallenge *)challenge;
 
 @end
diff --git a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
index 0f00ea9..bf62585 100644
--- a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
+++ b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
@@ -7,8 +7,10 @@
 
 #import <WebKit/WebPanelAuthenticationHandler.h>
 #import <WebKit/WebAuthenticationPanel.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSDictionaryExtras.h>
 #import <WebFoundation/NSURLConnectionAuthenticationChallenge.h>
+#import <WebFoundation/NSURLDownloadAuthenticationChallenge.h>
 
 static NSString *WebModalDialogPretendWindow = @"WebModalDialogPretendWindow";
 
@@ -42,8 +44,11 @@ WebPanelAuthenticationHandler *sharedHandler;
     [super dealloc];
 }
 
--(void)startAuthentication:(NSURLConnectionAuthenticationChallenge *)challenge window:(NSWindow *)w
+-(void)startAuthentication:(NSURLAuthenticationChallenge *)challenge window:(NSWindow *)w
 {
+    ASSERT([challenge isKindOfClass:[NSURLConnectionAuthenticationChallenge class]] ||
+	   [challenge isKindOfClass:[NSURLDownloadAuthenticationChallenge class]]);
+
     if ([w attachedSheet] != nil) {
 	w = nil;
     }
@@ -51,7 +56,15 @@ WebPanelAuthenticationHandler *sharedHandler;
     id window = w ? (id)w : (id)WebModalDialogPretendWindow;
 
     if ([windowToPanel objectForKey:window] != nil) {
-        [[challenge connection] cancel];
+	if ([challenge isKindOfClass:[NSURLConnectionAuthenticationChallenge class]]) {
+	    NSURLConnectionAuthenticationChallenge *connectionChallenge = (NSURLConnectionAuthenticationChallenge *)challenge;
+	    [[connectionChallenge connection] cancel];
+	} else if ([challenge isKindOfClass:[NSURLDownloadAuthenticationChallenge class]]) {
+	    NSURLDownloadAuthenticationChallenge *downloadChallenge = (NSURLDownloadAuthenticationChallenge *)challenge;
+	    [[downloadChallenge download] cancel];
+	} else {
+	    ASSERT_NOT_REACHED();
+	}
         return;
     }
 
@@ -84,7 +97,25 @@ WebPanelAuthenticationHandler *sharedHandler;
         [challengeToWindow removeObjectForKey:challenge];
     }
 
-    [[challenge connection] useCredential:credential forAuthenticationChallenge:challenge];
+    if ([challenge isKindOfClass:[NSURLConnectionAuthenticationChallenge class]]) {
+	NSURLConnectionAuthenticationChallenge *connectionChallenge = (NSURLConnectionAuthenticationChallenge *)challenge;
+
+	if (credential == nil) {
+	    [[connectionChallenge connection] cancel];
+	} else {
+	    [[connectionChallenge connection] useCredential:credential forAuthenticationChallenge:connectionChallenge];
+	}
+    } else if ([challenge isKindOfClass:[NSURLDownloadAuthenticationChallenge class]]) {
+	NSURLDownloadAuthenticationChallenge *downloadChallenge = (NSURLDownloadAuthenticationChallenge *)challenge;
+
+	if (credential == nil) {
+	    [[downloadChallenge download] cancel];
+	} else {
+	    [[downloadChallenge download] useCredential:credential forAuthenticationChallenge:downloadChallenge];
+	}
+    } else {
+	ASSERT_NOT_REACHED();
+    }
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list