[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:59:17 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ee9af3e5016157a2b1b72a8108e0f72bfbdafc8c
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 13 00:54:12 2002 +0000

    WebKit:
    
    	Removed policy classes and instead use the policy enums directly,
    	since we no longer hold the path in the enum.
    
            * Downloads.subproj/WebDownloadHandler.m:
            * WebKit.exp:
            * WebKit.pbproj/project.pbxproj:
            * WebView.subproj/WebControllerPolicyDelegate.h:
            * WebView.subproj/WebControllerPolicyDelegate.m:
            * WebView.subproj/WebControllerPolicyDelegatePrivate.h: Removed.
            * WebView.subproj/WebControllerPrivate.m:
            * WebView.subproj/WebDefaultPolicyDelegate.h:
            * WebView.subproj/WebDefaultPolicyDelegate.m:
            (+[WebDefaultPolicyDelegate defaultURLPolicyForRequest:]):
            (-[WebDefaultPolicyDelegate URLPolicyForRequest:inFrame:]):
            (-[WebDefaultPolicyDelegate fileURLPolicyForMIMEType:andRequest:inFrame:]):
            (-[WebDefaultPolicyDelegate unableToImplementPolicy:error:forURL:inFrame:]):
            (-[WebDefaultPolicyDelegate clickPolicyForAction:andRequest:inFrame:]):
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame handleUnimplementablePolicy:errorCode:forURL:]):
            (-[WebFrame _shouldShowRequest:]):
            (-[WebFrame _continueAfterClickPolicyForEvent:request:]):
            * WebView.subproj/WebMainResourceClient.m:
            (-[WebMainResourceClient handle:didReceiveResponse:]):
    
    WebBrowser:
    
    	Adjusted for WebKit API changes.
    
            * BrowserDocument.m:
            (-[BrowserDocument goToRequest:]):
            * BrowserWebController.m:
            (-[BrowserWebController URLPolicyForRequest:inFrame:]):
            (-[BrowserWebController unableToImplementPolicy:error:forURL:inFrame:]):
            (-[BrowserWebController fileURLPolicyForMIMEType:andRequest:inFrame:]):
            (-[BrowserWebController contentPolicyForResponse:andRequest:inFrame:]):
            (-[BrowserWebController clickPolicyForAction:andRequest:inFrame:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2638 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 50b0a49..9584915 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,31 @@
 2002-11-12  Maciej Stachowiak  <mjs at apple.com>
 
+	Removed policy classes and instead use the policy enums directly,
+	since we no longer hold the path in the enum.
+	
+        * Downloads.subproj/WebDownloadHandler.m:
+        * WebKit.exp:
+        * WebKit.pbproj/project.pbxproj:
+        * WebView.subproj/WebControllerPolicyDelegate.h:
+        * WebView.subproj/WebControllerPolicyDelegate.m:
+        * WebView.subproj/WebControllerPolicyDelegatePrivate.h: Removed.
+        * WebView.subproj/WebControllerPrivate.m:
+        * WebView.subproj/WebDefaultPolicyDelegate.h:
+        * WebView.subproj/WebDefaultPolicyDelegate.m:
+        (+[WebDefaultPolicyDelegate defaultURLPolicyForRequest:]):
+        (-[WebDefaultPolicyDelegate URLPolicyForRequest:inFrame:]):
+        (-[WebDefaultPolicyDelegate fileURLPolicyForMIMEType:andRequest:inFrame:]):
+        (-[WebDefaultPolicyDelegate unableToImplementPolicy:error:forURL:inFrame:]):
+        (-[WebDefaultPolicyDelegate clickPolicyForAction:andRequest:inFrame:]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame handleUnimplementablePolicy:errorCode:forURL:]):
+        (-[WebFrame _shouldShowRequest:]):
+        (-[WebFrame _continueAfterClickPolicyForEvent:request:]):
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient handle:didReceiveResponse:]):
+
+2002-11-12  Maciej Stachowiak  <mjs at apple.com>
+
 	Keep the triggering event around on the data source, so it can be
 	used with redirects.
 
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 50b0a49..9584915 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,31 @@
 2002-11-12  Maciej Stachowiak  <mjs at apple.com>
 
+	Removed policy classes and instead use the policy enums directly,
+	since we no longer hold the path in the enum.
+	
+        * Downloads.subproj/WebDownloadHandler.m:
+        * WebKit.exp:
+        * WebKit.pbproj/project.pbxproj:
+        * WebView.subproj/WebControllerPolicyDelegate.h:
+        * WebView.subproj/WebControllerPolicyDelegate.m:
+        * WebView.subproj/WebControllerPolicyDelegatePrivate.h: Removed.
+        * WebView.subproj/WebControllerPrivate.m:
+        * WebView.subproj/WebDefaultPolicyDelegate.h:
+        * WebView.subproj/WebDefaultPolicyDelegate.m:
+        (+[WebDefaultPolicyDelegate defaultURLPolicyForRequest:]):
+        (-[WebDefaultPolicyDelegate URLPolicyForRequest:inFrame:]):
+        (-[WebDefaultPolicyDelegate fileURLPolicyForMIMEType:andRequest:inFrame:]):
+        (-[WebDefaultPolicyDelegate unableToImplementPolicy:error:forURL:inFrame:]):
+        (-[WebDefaultPolicyDelegate clickPolicyForAction:andRequest:inFrame:]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame handleUnimplementablePolicy:errorCode:forURL:]):
+        (-[WebFrame _shouldShowRequest:]):
+        (-[WebFrame _continueAfterClickPolicyForEvent:request:]):
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient handle:didReceiveResponse:]):
+
+2002-11-12  Maciej Stachowiak  <mjs at apple.com>
+
 	Keep the triggering event around on the data source, so it can be
 	used with redirects.
 
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 83dea20..7bc9edb 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -9,7 +9,6 @@
 #import <WebKit/WebDownloadHandler.h>
 
 #import <WebKit/WebBinHexDecoder.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDownloadDecoder.h>
 #import <WebKit/WebKitErrors.h>
diff --git a/WebKit/Downloads.subproj/WebDownloadHandler.m b/WebKit/Downloads.subproj/WebDownloadHandler.m
index 83dea20..7bc9edb 100644
--- a/WebKit/Downloads.subproj/WebDownloadHandler.m
+++ b/WebKit/Downloads.subproj/WebDownloadHandler.m
@@ -9,7 +9,6 @@
 #import <WebKit/WebDownloadHandler.h>
 
 #import <WebKit/WebBinHexDecoder.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDownloadDecoder.h>
 #import <WebKit/WebKitErrors.h>
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index 812798d..77a8249 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -1,14 +1,11 @@
 .objc_class_name_WebBookmark
 .objc_class_name_WebBookmarkGroup
-.objc_class_name_WebClickPolicy
-.objc_class_name_WebContentPolicy
 .objc_class_name_WebController
 .objc_class_name_WebCoreStatistics
 .objc_class_name_WebDataSource
 .objc_class_name_WebDebugDOMNode
 .objc_class_name_WebDefaultContextMenuDelegate
 .objc_class_name_WebDefaultPolicyDelegate
-.objc_class_name_WebFileURLPolicy
 .objc_class_name_WebFrame
 .objc_class_name_WebHTMLView
 .objc_class_name_WebHistory
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 6ae43e8..bbba680 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -265,7 +265,6 @@
 				6523FAD1032DA06B005EFCFF,
 				5152FAD6033FC43400CA2ACD,
 				5152FADA033FC44A00CA2ACD,
-				5152FADC033FC44A00CA2ACD,
 				3944608F020F50ED0ECA1767,
 				39446090020F50ED0ECA1767,
 				65490EC003666DF4000CED4B,
@@ -1148,13 +1147,6 @@
 			path = WebView.subproj/WebControllerPolicyDelegate.m;
 			refType = 2;
 		};
-		5152FAD9033FC44A00CA2ACD = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			name = WebControllerPolicyDelegatePrivate.h;
-			path = WebView.subproj/WebControllerPolicyDelegatePrivate.h;
-			refType = 2;
-		};
 		5152FADA033FC44A00CA2ACD = {
 			fileRef = 5152FAD7033FC44A00CA2ACD;
 			isa = PBXBuildFile;
@@ -1170,12 +1162,6 @@
 			settings = {
 			};
 		};
-		5152FADC033FC44A00CA2ACD = {
-			fileRef = 5152FAD9033FC44A00CA2ACD;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
 		5152FADD033FC50400CA2ACD = {
 			fileEncoding = 4;
 			isa = PBXFileReference;
@@ -2134,7 +2120,6 @@
 				6523FAD0032DA06B005EFCFF,
 				5152FAD7033FC44A00CA2ACD,
 				5152FAD8033FC44A00CA2ACD,
-				5152FAD9033FC44A00CA2ACD,
 				5152FADD033FC50400CA2ACD,
 				5152FADE033FC50400CA2ACD,
 				5152FADF033FC50400CA2ACD,
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index 1d2c928..bd00db8 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -115,81 +115,6 @@ typedef enum {
 } WebContentAction;
 
 
-/*!
-    @class WebPolicy
-    Base class that describes the action that should take place when the WebControllerPolicyDelegate
-    is asked for the policy for a URL, file, clicked URL or loaded content.
-*/
- at interface WebPolicy : NSObject
-{
- at private
-    WebPolicyPrivate *_private;
-}
-
-/*!
-    @method policyAction
-    @abstract The policy action of the WebPolicy.
-*/
-- (WebPolicyAction)policyAction;
-
- at end
-
-
-/*!
-    @class WebURLPolicy
-    Describes the action for a URL that WebKit has been asked to load.
-*/
- at interface WebURLPolicy : WebPolicy
-/*!
-    @method webPolicyWithURLAction:
-    @abstract WebURLPolicy constructor.
-    @param action The policy action of the WebURLPolicy.
-*/
-+ webPolicyWithURLAction: (WebURLAction)action;
- at end
-
-
-/*!
-    @class WebFileURLPolicy
-    Describes the action for a file that WebKit has been asked to load.
-*/
- at interface WebFileURLPolicy : WebPolicy
-/*!
-    @method webPolicyWithFileAction:
-    @abstract WebFileURLPolicy constructor
-    @param action The policy action of the WebFileURLPolicy.
-*/
-+ webPolicyWithFileAction: (WebFileAction)action;
- at end
-
-
-/*!
-    @class WebContentPolicy
-    Describes the action for content which has been partially loaded.
-*/
- at interface WebContentPolicy : WebPolicy
-/*!
-    @method webPolicyWithContentAction:
-    @abstract WebContentPolicy constructor
-    @param action The policy action of the WebContentPolicy.
-*/
-+ webPolicyWithContentAction: (WebContentAction)action;
- at end
-
-
-/*!
-    @class WebClickPolicy
-    Describes the action for content which has been partially loaded.
-*/
- at interface WebClickPolicy : WebPolicy
-/*!
-    @method webPolicyWithClickAction:
-    @abstract WebClickPolicy constructor
-    @param action The policy action of the WebClickPolicy.
-*/
-+ webPolicyWithClickAction: (WebClickAction)action;
- at end
-
 
 /*!
     @protocol WebControllerPolicyDelegate
@@ -212,7 +137,7 @@ typedef enum {
      @param modifierFlags The modifier flags as described in NSEvent.h.
      @result The WebClickPolicy for WebKit to implement
 */
-- (WebClickPolicy *)clickPolicyForAction:(NSDictionary *)actionInformation
+- (WebClickAction)clickPolicyForAction:(NSDictionary *)actionInformation
                               andRequest:(WebResourceRequest *)request
                                  inFrame:(WebFrame *)frame;
 
@@ -225,7 +150,7 @@ typedef enum {
     @param URL The URL that WebKit has been asked to load.
     @param frame The frame which will load the URL.
 */
-- (WebURLPolicy *)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame;
+- (WebURLAction)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame;
 
 /*!
      @method fileURLPolicyForMIMEType:inFrame:isDirectory:
@@ -235,9 +160,9 @@ typedef enum {
      @param request WebResourceRequest to be used to load the item
      @param frame The frame which will load the file.
 */
-- (WebFileURLPolicy *)fileURLPolicyForMIMEType:(NSString *)type
-                                    andRequest:(WebResourceRequest *)request
-                                       inFrame:(WebFrame *)frame;
+- (WebFileAction)fileURLPolicyForMIMEType:(NSString *)type
+                               andRequest:(WebResourceRequest *)request
+                                  inFrame:(WebFrame *)frame;
 
 /*!
     @method contentPolicyForResponse:andRequest:inFrame:withContentPolicy:
@@ -246,7 +171,7 @@ typedef enum {
     @param request A WebResourceRequest for the partially loaded content.
     @param frame The frame which is loading the URL.
 */
-- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
+- (WebContentAction)contentPolicyForResponse:(WebResourceResponse *)response
                                     andRequest:(WebResourceRequest *)request
                                        inFrame:(WebFrame *)frame;
 
@@ -268,7 +193,7 @@ typedef enum {
     @param error The error that caused the policy to not be implemented.
     @param frame The frame in the which the policy could not be implemented.
 */
-- (void)unableToImplementPolicy:(WebPolicy *)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
+- (void)unableToImplementPolicy:(WebPolicyAction)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
 
 @end
 
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.m b/WebKit/WebView.subproj/WebControllerPolicyDelegate.m
index be83a74..d6fbebc 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.m
@@ -10,84 +10,3 @@ NSString *WebActionElementKey = @"WebActionNavigationTypeKey";
 NSString *WebActionButtonKey = @"WebActionButtonKey"; 
 NSString *WebActionModifierFlagsKey = @"WebActionModifierFlagsKey";
 
-
- at interface WebPolicyPrivate : NSObject
-{
- at public
-    WebPolicyAction policyAction;
-}
- at end
-
- at implementation WebPolicyPrivate
-
-- (void)dealloc
-{
-    [super dealloc];
-}
-
- at end
-
- at implementation WebPolicy
-
-- initWithPolicyAction: (WebPolicyAction)action;
-{
-    [super init];
-    _private = [[WebPolicyPrivate alloc] init];
-    _private->policyAction = action;
-    return self;
-}
-
-- (void)_setPolicyAction:(WebPolicyAction)policyAction
-{
-    _private->policyAction = policyAction;
-}
-
-- (WebPolicyAction)policyAction
-{
-    return _private->policyAction;
-}
-
-- (void)dealloc
-{
-    [_private release];
-    [super dealloc];
-}
-
- at end
-
- at implementation WebURLPolicy
-
-+ webPolicyWithURLAction: (WebURLAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
-
- at implementation WebFileURLPolicy
-
-+ webPolicyWithFileAction: (WebFileAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
-
- at implementation WebContentPolicy
-
-+ webPolicyWithContentAction: (WebContentAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
-
- at end
-
- at implementation WebClickPolicy
-
-+ webPolicyWithClickAction: (WebClickAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegatePrivate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegatePrivate.h
deleted file mode 100644
index b54d72c..0000000
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegatePrivate.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-        WebControllerPolicyDelegatePrivate.h
-        Copyright 2002, Apple, Inc. All rights reserved.
-*/
-
-#import <Cocoa/Cocoa.h>
-
-#import <WebKit/WebControllerPolicyDelegate.h>
-
- at interface WebPolicy (WebPrivate)
-
-- (void)_setPolicyAction:(WebPolicyAction)policyAction;
-
- at end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index f08d769..c10e3ff 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -6,7 +6,6 @@
 #import <WebKit/WebBackForwardList.h>
 #import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebControllerSets.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDefaultContextMenuDelegate.h>
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
index 91481d9..6e03a79 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
@@ -7,7 +7,6 @@
 #import <Foundation/Foundation.h>
 
 @class WebController;
- at class WebURLPolicy;
 
 /*!
     @class WebDefaultPolicyDelegate
@@ -27,7 +26,7 @@
     @param Request use this request to determine an appropriate policy
     @result The WebURLPolicy to use for the request.
 */    
-+ (WebURLPolicy *)defaultURLPolicyForRequest:(WebResourceRequest *)request;
++ (WebURLAction)defaultURLPolicyForRequest:(WebResourceRequest *)request;
 
 
 /*!
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index 5d95bb3..5cd72ad 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -14,12 +14,12 @@
 
 @implementation WebDefaultPolicyDelegate
 
-+ (WebURLPolicy *)defaultURLPolicyForRequest: (WebResourceRequest *)request
++ (WebURLAction)defaultURLPolicyForRequest: (WebResourceRequest *)request
 {
     if([WebResourceHandle canInitWithRequest:request]){
-        return [WebURLPolicy webPolicyWithURLAction:WebURLPolicyUseContentPolicy];
+        return WebURLPolicyUseContentPolicy;
     }else{
-        return [WebURLPolicy webPolicyWithURLAction:WebURLPolicyOpenExternally];
+        return WebURLPolicyOpenExternally;
     }
 }
 
@@ -31,37 +31,37 @@
     return self;
 }
 
-- (WebURLPolicy *)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame
+- (WebURLAction)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame
 {
     return [WebDefaultPolicyDelegate defaultURLPolicyForRequest:request];
 }
 
-- (WebFileURLPolicy *)fileURLPolicyForMIMEType:(NSString *)type andRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame
+- (WebFileAction)fileURLPolicyForMIMEType:(NSString *)type andRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame
 {
     BOOL isDirectory;
     [[NSFileManager defaultManager] fileExistsAtPath:[[request URL] path] isDirectory:&isDirectory];
 
     if(isDirectory)
-        return [WebFileURLPolicy webPolicyWithFileAction:WebFileURLPolicyIgnore];
+        return WebFileURLPolicyIgnore;
     if([WebController canShowMIMEType:type])
-        return [WebFileURLPolicy webPolicyWithFileAction:WebFileURLPolicyUseContentPolicy];
-    return [WebFileURLPolicy webPolicyWithFileAction:WebFileURLPolicyIgnore];
+        return WebFileURLPolicyUseContentPolicy;
+    return WebFileURLPolicyIgnore;
 }
 
-- (void)unableToImplementPolicy:(WebPolicy *)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame
+- (void)unableToImplementPolicy:(WebPolicyAction)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame
 {
     NSLog (@"called unableToImplementPolicy:%derror:%@:inFrame:%@", policy, error, frame);
 }
 
 
-- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
+- (WebPolicyAction)contentPolicyForResponse:(WebResourceResponse *)response
 				    andRequest:(WebResourceRequest *)request
                                        inFrame:(WebFrame *)frame;
 {
     if ([WebController canShowMIMEType:[response contentType]]) {
-        return [WebContentPolicy webPolicyWithContentAction:WebContentPolicyShow];
+        return WebContentPolicyShow;
     } else {
-        return [WebContentPolicy webPolicyWithContentAction:WebContentPolicyIgnore];
+        return WebContentPolicyIgnore;
     }
 }
 
@@ -71,11 +71,11 @@
     return nil;
 }
 
-- (WebClickPolicy *)clickPolicyForAction:(NSDictionary *)actionInformation 
+- (WebClickAction)clickPolicyForAction:(NSDictionary *)actionInformation 
 			      andRequest:(WebResourceRequest *)request
 				 inFrame:(WebFrame *)frame
 {
-    return [WebClickPolicy webPolicyWithClickAction:WebClickPolicyShow];
+    return [WebDefaultPolicyDelegate defaultURLPolicyForRequest:request];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index f2a40e3..9d20305 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -714,7 +714,7 @@ static const char * const stateNames[] = {
     return _private->bridge;
 }
 
-- (void)handleUnimplementablePolicy:(WebPolicy *)policy errorCode:(int)code forURL:(NSURL *)URL
+- (void)handleUnimplementablePolicy:(WebPolicyAction)policy errorCode:(int)code forURL:(NSURL *)URL
 {
     WebError *error = [WebError errorWithCode:code
                                      inDomain:WebErrorDomainWebKit
@@ -725,9 +725,9 @@ static const char * const stateNames[] = {
 - (BOOL)_shouldShowRequest:(WebResourceRequest *)request
 {
     id <WebControllerPolicyDelegate> policyDelegate = [[self controller] policyDelegate];
-    WebURLPolicy *URLPolicy = [policyDelegate URLPolicyForRequest:request inFrame:self];
+    WebURLAction URLPolicy = [policyDelegate URLPolicyForRequest:request inFrame:self];
 
-    switch ([URLPolicy policyAction]) {
+    switch (URLPolicy) {
         case WebURLPolicyIgnore:
             return NO;
 
@@ -750,9 +750,9 @@ static const char * const stateNames[] = {
                 NSFileManager *fileManager = [NSFileManager defaultManager];
                 NSString *path = [[request URL] path];
                 NSString *type = [WebController _MIMETypeForFile: path];
-                WebFileURLPolicy *fileURLPolicy = [policyDelegate fileURLPolicyForMIMEType:type andRequest:request inFrame:self];
+                WebFileAction fileURLPolicy = [policyDelegate fileURLPolicyForMIMEType:type andRequest:request inFrame:self];
 
-                if([fileURLPolicy policyAction] == WebFileURLPolicyIgnore)
+                if(fileURLPolicy == WebFileURLPolicyIgnore)
                     return NO;
 
 		BOOL isDirectory;
@@ -768,7 +768,7 @@ static const char * const stateNames[] = {
                     return NO;
                 }
 
-                switch ([fileURLPolicy policyAction]) {
+                switch (fileURLPolicy) {
                     case WebFileURLPolicyUseContentPolicy:
                         if (isDirectory) {
                             [self handleUnimplementablePolicy:fileURLPolicy errorCode:WebErrorCannotShowDirectory forURL:[request URL]];
@@ -793,7 +793,7 @@ static const char * const stateNames[] = {
 
                     default:
                         [NSException raise:NSInvalidArgumentException format:
-                @"fileURLPolicyForMIMEType:inFrame:isDirectory: returned WebFileURLPolicy with invalid action %d", [fileURLPolicy policyAction]];
+                @"fileURLPolicyForMIMEType:inFrame:isDirectory: returned WebFileURLPolicy with invalid action %d", fileURLPolicy];
                         return NO;
                 }
             }
@@ -1008,15 +1008,13 @@ static const char * const stateNames[] = {
 -(BOOL)_continueAfterClickPolicyForEvent:(NSEvent *)event request:(WebResourceRequest *)request
 {
     WebController *controller = [self controller];
-    WebClickPolicy *clickPolicy;
+    WebClickAction clickPolicy;
 
     clickPolicy = [[controller policyDelegate] clickPolicyForAction:[self _actionInformationForNavigationType:WebNavigationTypeLinkClicked event:event]
 					       andRequest:request
 					       inFrame:self];
 
-    WebPolicyAction clickAction = [clickPolicy policyAction];
-
-    switch (clickAction) {
+    switch (clickPolicy) {
     case WebClickPolicyShow:
 	return YES;
     case WebClickPolicyOpenExternally:
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index d38dbc4..4346d82 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -16,7 +16,6 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDocument.h>
@@ -140,7 +139,7 @@
 
     LOG(Download, "main content type: %@", [r contentType]);
 
-    WebContentPolicy *contentPolicy;
+    WebContentAction contentPolicy;
 
     // Figure out the content policy.
     if (![dataSource isDownloading]) {
@@ -148,12 +147,10 @@
 								  andRequest:[dataSource request]
 								  inFrame:[dataSource webFrame]];
     } else {
-	contentPolicy = [WebContentPolicy webPolicyWithContentAction:WebContentPolicySave];
+	contentPolicy = WebContentPolicySave;
     }
 
-    policyAction = [contentPolicy policyAction];
-
-    switch (policyAction) {
+    switch (contentPolicy) {
     case WebContentPolicyShow:
         break;
         
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index d38dbc4..4346d82 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -16,7 +16,6 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDocument.h>
@@ -140,7 +139,7 @@
 
     LOG(Download, "main content type: %@", [r contentType]);
 
-    WebContentPolicy *contentPolicy;
+    WebContentAction contentPolicy;
 
     // Figure out the content policy.
     if (![dataSource isDownloading]) {
@@ -148,12 +147,10 @@
 								  andRequest:[dataSource request]
 								  inFrame:[dataSource webFrame]];
     } else {
-	contentPolicy = [WebContentPolicy webPolicyWithContentAction:WebContentPolicySave];
+	contentPolicy = WebContentPolicySave;
     }
 
-    policyAction = [contentPolicy policyAction];
-
-    switch (policyAction) {
+    switch (contentPolicy) {
     case WebContentPolicyShow:
         break;
         
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index 1d2c928..bd00db8 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -115,81 +115,6 @@ typedef enum {
 } WebContentAction;
 
 
-/*!
-    @class WebPolicy
-    Base class that describes the action that should take place when the WebControllerPolicyDelegate
-    is asked for the policy for a URL, file, clicked URL or loaded content.
-*/
- at interface WebPolicy : NSObject
-{
- at private
-    WebPolicyPrivate *_private;
-}
-
-/*!
-    @method policyAction
-    @abstract The policy action of the WebPolicy.
-*/
-- (WebPolicyAction)policyAction;
-
- at end
-
-
-/*!
-    @class WebURLPolicy
-    Describes the action for a URL that WebKit has been asked to load.
-*/
- at interface WebURLPolicy : WebPolicy
-/*!
-    @method webPolicyWithURLAction:
-    @abstract WebURLPolicy constructor.
-    @param action The policy action of the WebURLPolicy.
-*/
-+ webPolicyWithURLAction: (WebURLAction)action;
- at end
-
-
-/*!
-    @class WebFileURLPolicy
-    Describes the action for a file that WebKit has been asked to load.
-*/
- at interface WebFileURLPolicy : WebPolicy
-/*!
-    @method webPolicyWithFileAction:
-    @abstract WebFileURLPolicy constructor
-    @param action The policy action of the WebFileURLPolicy.
-*/
-+ webPolicyWithFileAction: (WebFileAction)action;
- at end
-
-
-/*!
-    @class WebContentPolicy
-    Describes the action for content which has been partially loaded.
-*/
- at interface WebContentPolicy : WebPolicy
-/*!
-    @method webPolicyWithContentAction:
-    @abstract WebContentPolicy constructor
-    @param action The policy action of the WebContentPolicy.
-*/
-+ webPolicyWithContentAction: (WebContentAction)action;
- at end
-
-
-/*!
-    @class WebClickPolicy
-    Describes the action for content which has been partially loaded.
-*/
- at interface WebClickPolicy : WebPolicy
-/*!
-    @method webPolicyWithClickAction:
-    @abstract WebClickPolicy constructor
-    @param action The policy action of the WebClickPolicy.
-*/
-+ webPolicyWithClickAction: (WebClickAction)action;
- at end
-
 
 /*!
     @protocol WebControllerPolicyDelegate
@@ -212,7 +137,7 @@ typedef enum {
      @param modifierFlags The modifier flags as described in NSEvent.h.
      @result The WebClickPolicy for WebKit to implement
 */
-- (WebClickPolicy *)clickPolicyForAction:(NSDictionary *)actionInformation
+- (WebClickAction)clickPolicyForAction:(NSDictionary *)actionInformation
                               andRequest:(WebResourceRequest *)request
                                  inFrame:(WebFrame *)frame;
 
@@ -225,7 +150,7 @@ typedef enum {
     @param URL The URL that WebKit has been asked to load.
     @param frame The frame which will load the URL.
 */
-- (WebURLPolicy *)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame;
+- (WebURLAction)URLPolicyForRequest:(WebResourceRequest *)request inFrame:(WebFrame *)frame;
 
 /*!
      @method fileURLPolicyForMIMEType:inFrame:isDirectory:
@@ -235,9 +160,9 @@ typedef enum {
      @param request WebResourceRequest to be used to load the item
      @param frame The frame which will load the file.
 */
-- (WebFileURLPolicy *)fileURLPolicyForMIMEType:(NSString *)type
-                                    andRequest:(WebResourceRequest *)request
-                                       inFrame:(WebFrame *)frame;
+- (WebFileAction)fileURLPolicyForMIMEType:(NSString *)type
+                               andRequest:(WebResourceRequest *)request
+                                  inFrame:(WebFrame *)frame;
 
 /*!
     @method contentPolicyForResponse:andRequest:inFrame:withContentPolicy:
@@ -246,7 +171,7 @@ typedef enum {
     @param request A WebResourceRequest for the partially loaded content.
     @param frame The frame which is loading the URL.
 */
-- (WebContentPolicy *)contentPolicyForResponse:(WebResourceResponse *)response
+- (WebContentAction)contentPolicyForResponse:(WebResourceResponse *)response
                                     andRequest:(WebResourceRequest *)request
                                        inFrame:(WebFrame *)frame;
 
@@ -268,7 +193,7 @@ typedef enum {
     @param error The error that caused the policy to not be implemented.
     @param frame The frame in the which the policy could not be implemented.
 */
-- (void)unableToImplementPolicy:(WebPolicy *)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
+- (void)unableToImplementPolicy:(WebPolicyAction)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
 
 @end
 
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.m b/WebKit/WebView.subproj/WebPolicyDelegate.m
index be83a74..d6fbebc 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.m
@@ -10,84 +10,3 @@ NSString *WebActionElementKey = @"WebActionNavigationTypeKey";
 NSString *WebActionButtonKey = @"WebActionButtonKey"; 
 NSString *WebActionModifierFlagsKey = @"WebActionModifierFlagsKey";
 
-
- at interface WebPolicyPrivate : NSObject
-{
- at public
-    WebPolicyAction policyAction;
-}
- at end
-
- at implementation WebPolicyPrivate
-
-- (void)dealloc
-{
-    [super dealloc];
-}
-
- at end
-
- at implementation WebPolicy
-
-- initWithPolicyAction: (WebPolicyAction)action;
-{
-    [super init];
-    _private = [[WebPolicyPrivate alloc] init];
-    _private->policyAction = action;
-    return self;
-}
-
-- (void)_setPolicyAction:(WebPolicyAction)policyAction
-{
-    _private->policyAction = policyAction;
-}
-
-- (WebPolicyAction)policyAction
-{
-    return _private->policyAction;
-}
-
-- (void)dealloc
-{
-    [_private release];
-    [super dealloc];
-}
-
- at end
-
- at implementation WebURLPolicy
-
-+ webPolicyWithURLAction: (WebURLAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
-
- at implementation WebFileURLPolicy
-
-+ webPolicyWithFileAction: (WebFileAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
-
- at implementation WebContentPolicy
-
-+ webPolicyWithContentAction: (WebContentAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
-
- at end
-
- at implementation WebClickPolicy
-
-+ webPolicyWithClickAction: (WebClickAction)action
-{
-    return [[[WebPolicy alloc] initWithPolicyAction:action] autorelease];
-}
-
- at end
diff --git a/WebKit/WebView.subproj/WebPolicyDelegatePrivate.h b/WebKit/WebView.subproj/WebPolicyDelegatePrivate.h
deleted file mode 100644
index b54d72c..0000000
--- a/WebKit/WebView.subproj/WebPolicyDelegatePrivate.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-        WebControllerPolicyDelegatePrivate.h
-        Copyright 2002, Apple, Inc. All rights reserved.
-*/
-
-#import <Cocoa/Cocoa.h>
-
-#import <WebKit/WebControllerPolicyDelegate.h>
-
- at interface WebPolicy (WebPrivate)
-
-- (void)_setPolicyAction:(WebPolicyAction)policyAction;
-
- at end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index f08d769..c10e3ff 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -6,7 +6,6 @@
 #import <WebKit/WebBackForwardList.h>
 #import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebControllerPolicyDelegatePrivate.h>
 #import <WebKit/WebControllerSets.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDefaultContextMenuDelegate.h>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list