[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:53:11 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit fa2c813746c5363c81ae7225d5c1bf0e29157fae
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 13 01:36:32 2001 +0000

    More changes and notes based on our API discussion meetings.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index 1ff1569..89d671a 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -9,6 +9,8 @@
 #ifdef READY_FOR_PRIMETIME
 
 /*
+   ============================================================================= 
+
     WKWebController manages the interaction between WKWebView and WKWebDataSource.
     Intances of WKWebController retain their view and data source.
     
@@ -42,6 +44,43 @@
     
     WKConcreteWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
+
+   ============================================================================= 
+    
+    Changes: 
+    
+    2001-12-12
+        Changed WKConcreteWebController to WKDefaultWebController.
+        
+        Changed WKLocationChangedHandler naming, replace "loadingXXX" with
+        "locationChangeXXX".
+
+        Changed loadingStopped in WKLocationChangedHandler to locationChangeStopped:(WKError *).
+
+        Changed loadingCancelled in WKLocationChangedHandler to locationChangeCancelled:(WKError *).
+        
+        Changed loadedPageTitle in WKLocationChangedHandler to receivedPageTitle:.
+
+        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to WKLocationChangedHandler.
+        
+        Added the following two methods to WKLocationChangedHandler:
+        
+            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+            - (void)serverRedirectTo: (NSURL *)url;
+       
+        Put locationWillChangeTo: back on WKLocationChangedHandler.
+        
+        Changed XXXforLocation in WKLoadHandler to XXXforResource.
+        
+        Changed timeoutForLocation: in WKLoadHandler to receivedError:forResource:partialProgress:
+        
+        Added the following two methods to WKDefaultWebController:
+        
+            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
+            - (BOOL)directsAllLinksToSystemBrowser;
+            
+        Removed WKError.  This will be described in WKError.h.
+        
 */
 
 
@@ -66,6 +105,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebViewDelegates implement protocols that modify the behavior of
     WKWebViews.  A WKWebView does not require a delegate.
 */
@@ -74,6 +115,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebDataSourceDelegate implement protocols that modify the behavior of
     WKWebDataSources.  A WKWebDataSources does not require a delegate.
 */
@@ -81,52 +124,67 @@
 @end
 
 
-// Is WKConcreteWebController the right name?  The name fits with the
-// scheme used by Foundation, although Foundation's concrete classes
-// typically aren't public.
- at interface WKConcreteWebController : NSObject <WKWebController>
+/*
+   ============================================================================= 
+
+    Is WKConcreteWebController the right name?  The name fits with the
+    scheme used by Foundation, although Foundation's concrete classes
+    typically aren't public.
+*/
+ at interface WKDefaultWebController : NSObject <WKWebController>
+
 - initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
 @end
 
+/*
+   ============================================================================= 
 
-// See the comments in WKWebPageView above for more description about this protocol.
+    See the comments in WKWebPageView above for more description about this protocol.
+*/
 @protocol WKLocationChangeHandler
 
-- (void)loadingStarted;
-- (void)loadingCancelled;
-- (void)loadingStopped;
-- (void)loadingFinished;
-
-- (void)loadedPageTitle: (NSString *)title;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
- at end
+- (void)locationChangeStarted;
+- (void)locationChangeCancelledL: (WKError *)error;
+- (void)locationChangeStopped: (WKError *)error;
+- (void)locationChangeFinished;
 
+- (void)receivedPageTitle: (NSString *)title;
 
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+- (void)serverRedirectTo: (NSURL *)url;
 
- at protocol WKContextMenuHandler
-// Returns the array of menu items for this node that will be displayed in the context menu.
-// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
-// after making any desired changes or additions.
-- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
+   ============================================================================= 
+
+    A WKLoadProgress capture the state associated with a load progress
+    indication.  Should we use a struct?
 */
- at protocol WKCredentialsHandler
-// Ken will come up with a proposal for this.  We decided not to have a generic API,
-// rather we'll have an API that explicitly knows about the authentication
-// attributes needed.
-// Client should use this API to collect information necessary to authenticate,
-// usually by putting up a dialog.
-// Do we provide a default dialog?
+ at interface WKLoadProgress 
+{
+    int bytesSoFar;	// 0 if this is the start of load
+    int totalToLoad;	// -1 if this is not known.
+                        // bytesSoFar == totalLoaded when complete
+    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
+}
 @end
 
 
 /*
+   ============================================================================= 
+
     Implementors of this protocol will receive messages indicating
-    data as it arrives.
+    data has been received.
     
-    This method will be called even if the data source
+    The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
 */
 @protocol  WKLoadHandler
@@ -137,50 +195,49 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forLocation: (NSString *)lcoation;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
 
-- (void)timeoutForLocation: (NSString *)location partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
 
 @end
 
-
-
 /*
-    A WKLoadProgress capture the state associated with a load progress
-    indication.  Should we use a struct?
+   ============================================================================= 
 */
- at interface WKLoadProgress 
-{
-    int bytesSoFar;	// 0 if this is the start of load
-    int totalToLoad;	// -1 if this is not known.
-                        // bytesSoFar == totalLoaded when complete
-    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
-}
+ at protocol WKContextMenuHandler
+// Returns the array of menu items for this node that will be displayed in the context menu.
+// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
+// after making any desired changes or additions.
+- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
-   Error handling:
-        error conditions:
-            timeout
-            unrecognized/handled mime-type
-            javascript errors
-            invalid url
-            parsing errors
-            
+   ============================================================================= 
+
 */
- at interface WKError
-{
-    NSString *description;
-    int code;
-}
+ at protocol WKCredentialsHandler
+// Ken will come up with a proposal for this.  We decided not to have a generic API,
+// rather we'll have an API that explicitly knows about the authentication
+// attributes needed.
+// Client should use this API to collect information necessary to authenticate,
+// usually by putting up a dialog.
+// Do we provide a default dialog?
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
 @protocol WKWebDataSourceErrorHandler
 - error: (WKError *)error;
 @end
 
 
 /*
+   ============================================================================= 
+
     A class that implements WKScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
@@ -199,6 +256,8 @@
 
 
 /*
+   ============================================================================= 
+
 */
 @protocol WKFrameSetHandler
 - (NSArray *)frameNames;
@@ -207,5 +266,13 @@
 - (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
+ at protocol WKFrame
+ at end
+
 #endif
 
diff --git a/WebKit/WebView.subproj/IFWebDataSource.h b/WebKit/WebView.subproj/IFWebDataSource.h
index 6d3f53b..24de261 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.h
+++ b/WebKit/WebView.subproj/IFWebDataSource.h
@@ -8,7 +8,9 @@
 
 #import <WebKit/WKWebController.h>
 
-/*
+/* 
+   =============================================================================
+   
     A WKWebDataSource represents all the state associated
     with a web page.  It is typicallly initialized with a URL, but
     may also be initialized with an NSString or NSData that hold
@@ -19,9 +21,22 @@
     WKWebDataSource *dataSource = [[WKWebDataSource alloc] initWithURL: url];
     id <WKWebController>myController = [[MyControllerClass alloc] init];
     [myController setDataSource: dataSource];
+
+   Changes:
+   
+   2001-12-12
+    
+    After group discussion we decided to classify API as :
+        Tier 1:  Needed by our browser (or Sherlock).
+        Tier 2:  Nedded by Apple internal clients (Mail, Help, PB, other TBD).
+        Tier 3:  Third party software vendors.
+    
+    Added finalURL and isRedirected.
+   
         
+   ============================================================================= 
 */
-
+   
 #ifdef READY_FOR_PRIMETIME
 
 @interface WKWebDataSource : NSObject
@@ -42,8 +57,7 @@
 
 
 // Set the controller for this data source.  NOTE:  The controller is not retained by the
-// data source.
-// Perhaps setController: should be private?
+// data source.  Perhaps setController: should be private?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -53,14 +67,23 @@
 
 
 // The inputURL may resolve to a different URL as a result of
-// either a client side refresh <META HTTP-EQUIV="refresh" ...> or
-// a DNS redirect.  Both of these implicit actions should not
-// require a new data source.  The resolvedURL is the URL that is
-// ultimately used to fetch page data.
-// [We need more brain cells applied to this issue.]  
+// a DNS redirect.  May return nil if the URL has not yet been
+// resolved.  <WKLocationChangedHandler> includes a message
+// that is sent after the URL has been resolved.
 - (NSURL *)resolvedURL;
 
 
+// finalURL returns the URL that was actually used.  The final URL
+// may be different than the resolvedURL if the server redirects.
+// <WKLocationChangedHandler> includes a message that is sent after
+// the URL has been resolved.
+- (NSURL *)finalURL;
+
+
+// Returns true if the resolvedURL has been redirected by the server,
+// i.e. resolvedURL != finalURL.
+- (BOOL)isRedirected;
+
 // Start actually getting (if initialized with a URL) and parsing data. If the data source
 // is still performing a previous load it will be stopped.
 // If forceRefresh is YES the document will load from the net, not the cache.
@@ -124,6 +147,8 @@
 
 
 /*
+   ============================================================================= 
+
     This class provides a cover for URL-based preference items. 
 */
 @interface WKPreferences
diff --git a/WebKit/WebView.subproj/IFWebView.h b/WebKit/WebView.subproj/IFWebView.h
index 1a113ad..5174a2c 100644
--- a/WebKit/WebView.subproj/IFWebView.h
+++ b/WebKit/WebView.subproj/IFWebView.h
@@ -11,6 +11,8 @@
 
 #ifdef READY_FOR_PRIMETIME
 /*
+   ============================================================================= 
+
     Typical usage of a WKWebView.
     
     NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
@@ -61,6 +63,7 @@
             resources have been loaded.  Controllers should terminate progress indicators at 
             this point.
                     
+    ============================================================================= 
 */
 @interface WKWebView : NSView
 {
@@ -129,7 +132,7 @@
 - (NSRange)selectedRange;
 
 
-// MCJ thinks we need high level find API on view.
+// Maciej thinks we need high level find API on view.
 
 @end
 
diff --git a/WebKit/WebView.subproj/WKWebController.h b/WebKit/WebView.subproj/WKWebController.h
index 1ff1569..89d671a 100644
--- a/WebKit/WebView.subproj/WKWebController.h
+++ b/WebKit/WebView.subproj/WKWebController.h
@@ -9,6 +9,8 @@
 #ifdef READY_FOR_PRIMETIME
 
 /*
+   ============================================================================= 
+
     WKWebController manages the interaction between WKWebView and WKWebDataSource.
     Intances of WKWebController retain their view and data source.
     
@@ -42,6 +44,43 @@
     
     WKConcreteWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
+
+   ============================================================================= 
+    
+    Changes: 
+    
+    2001-12-12
+        Changed WKConcreteWebController to WKDefaultWebController.
+        
+        Changed WKLocationChangedHandler naming, replace "loadingXXX" with
+        "locationChangeXXX".
+
+        Changed loadingStopped in WKLocationChangedHandler to locationChangeStopped:(WKError *).
+
+        Changed loadingCancelled in WKLocationChangedHandler to locationChangeCancelled:(WKError *).
+        
+        Changed loadedPageTitle in WKLocationChangedHandler to receivedPageTitle:.
+
+        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to WKLocationChangedHandler.
+        
+        Added the following two methods to WKLocationChangedHandler:
+        
+            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+            - (void)serverRedirectTo: (NSURL *)url;
+       
+        Put locationWillChangeTo: back on WKLocationChangedHandler.
+        
+        Changed XXXforLocation in WKLoadHandler to XXXforResource.
+        
+        Changed timeoutForLocation: in WKLoadHandler to receivedError:forResource:partialProgress:
+        
+        Added the following two methods to WKDefaultWebController:
+        
+            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
+            - (BOOL)directsAllLinksToSystemBrowser;
+            
+        Removed WKError.  This will be described in WKError.h.
+        
 */
 
 
@@ -66,6 +105,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebViewDelegates implement protocols that modify the behavior of
     WKWebViews.  A WKWebView does not require a delegate.
 */
@@ -74,6 +115,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebDataSourceDelegate implement protocols that modify the behavior of
     WKWebDataSources.  A WKWebDataSources does not require a delegate.
 */
@@ -81,52 +124,67 @@
 @end
 
 
-// Is WKConcreteWebController the right name?  The name fits with the
-// scheme used by Foundation, although Foundation's concrete classes
-// typically aren't public.
- at interface WKConcreteWebController : NSObject <WKWebController>
+/*
+   ============================================================================= 
+
+    Is WKConcreteWebController the right name?  The name fits with the
+    scheme used by Foundation, although Foundation's concrete classes
+    typically aren't public.
+*/
+ at interface WKDefaultWebController : NSObject <WKWebController>
+
 - initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
 @end
 
+/*
+   ============================================================================= 
 
-// See the comments in WKWebPageView above for more description about this protocol.
+    See the comments in WKWebPageView above for more description about this protocol.
+*/
 @protocol WKLocationChangeHandler
 
-- (void)loadingStarted;
-- (void)loadingCancelled;
-- (void)loadingStopped;
-- (void)loadingFinished;
-
-- (void)loadedPageTitle: (NSString *)title;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
- at end
+- (void)locationChangeStarted;
+- (void)locationChangeCancelledL: (WKError *)error;
+- (void)locationChangeStopped: (WKError *)error;
+- (void)locationChangeFinished;
 
+- (void)receivedPageTitle: (NSString *)title;
 
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+- (void)serverRedirectTo: (NSURL *)url;
 
- at protocol WKContextMenuHandler
-// Returns the array of menu items for this node that will be displayed in the context menu.
-// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
-// after making any desired changes or additions.
-- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
+   ============================================================================= 
+
+    A WKLoadProgress capture the state associated with a load progress
+    indication.  Should we use a struct?
 */
- at protocol WKCredentialsHandler
-// Ken will come up with a proposal for this.  We decided not to have a generic API,
-// rather we'll have an API that explicitly knows about the authentication
-// attributes needed.
-// Client should use this API to collect information necessary to authenticate,
-// usually by putting up a dialog.
-// Do we provide a default dialog?
+ at interface WKLoadProgress 
+{
+    int bytesSoFar;	// 0 if this is the start of load
+    int totalToLoad;	// -1 if this is not known.
+                        // bytesSoFar == totalLoaded when complete
+    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
+}
 @end
 
 
 /*
+   ============================================================================= 
+
     Implementors of this protocol will receive messages indicating
-    data as it arrives.
+    data has been received.
     
-    This method will be called even if the data source
+    The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
 */
 @protocol  WKLoadHandler
@@ -137,50 +195,49 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forLocation: (NSString *)lcoation;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
 
-- (void)timeoutForLocation: (NSString *)location partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
 
 @end
 
-
-
 /*
-    A WKLoadProgress capture the state associated with a load progress
-    indication.  Should we use a struct?
+   ============================================================================= 
 */
- at interface WKLoadProgress 
-{
-    int bytesSoFar;	// 0 if this is the start of load
-    int totalToLoad;	// -1 if this is not known.
-                        // bytesSoFar == totalLoaded when complete
-    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
-}
+ at protocol WKContextMenuHandler
+// Returns the array of menu items for this node that will be displayed in the context menu.
+// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
+// after making any desired changes or additions.
+- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
-   Error handling:
-        error conditions:
-            timeout
-            unrecognized/handled mime-type
-            javascript errors
-            invalid url
-            parsing errors
-            
+   ============================================================================= 
+
 */
- at interface WKError
-{
-    NSString *description;
-    int code;
-}
+ at protocol WKCredentialsHandler
+// Ken will come up with a proposal for this.  We decided not to have a generic API,
+// rather we'll have an API that explicitly knows about the authentication
+// attributes needed.
+// Client should use this API to collect information necessary to authenticate,
+// usually by putting up a dialog.
+// Do we provide a default dialog?
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
 @protocol WKWebDataSourceErrorHandler
 - error: (WKError *)error;
 @end
 
 
 /*
+   ============================================================================= 
+
     A class that implements WKScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
@@ -199,6 +256,8 @@
 
 
 /*
+   ============================================================================= 
+
 */
 @protocol WKFrameSetHandler
 - (NSArray *)frameNames;
@@ -207,5 +266,13 @@
 - (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
+ at protocol WKFrame
+ at end
+
 #endif
 
diff --git a/WebKit/WebView.subproj/WKWebDataSource.h b/WebKit/WebView.subproj/WKWebDataSource.h
index 6d3f53b..24de261 100644
--- a/WebKit/WebView.subproj/WKWebDataSource.h
+++ b/WebKit/WebView.subproj/WKWebDataSource.h
@@ -8,7 +8,9 @@
 
 #import <WebKit/WKWebController.h>
 
-/*
+/* 
+   =============================================================================
+   
     A WKWebDataSource represents all the state associated
     with a web page.  It is typicallly initialized with a URL, but
     may also be initialized with an NSString or NSData that hold
@@ -19,9 +21,22 @@
     WKWebDataSource *dataSource = [[WKWebDataSource alloc] initWithURL: url];
     id <WKWebController>myController = [[MyControllerClass alloc] init];
     [myController setDataSource: dataSource];
+
+   Changes:
+   
+   2001-12-12
+    
+    After group discussion we decided to classify API as :
+        Tier 1:  Needed by our browser (or Sherlock).
+        Tier 2:  Nedded by Apple internal clients (Mail, Help, PB, other TBD).
+        Tier 3:  Third party software vendors.
+    
+    Added finalURL and isRedirected.
+   
         
+   ============================================================================= 
 */
-
+   
 #ifdef READY_FOR_PRIMETIME
 
 @interface WKWebDataSource : NSObject
@@ -42,8 +57,7 @@
 
 
 // Set the controller for this data source.  NOTE:  The controller is not retained by the
-// data source.
-// Perhaps setController: should be private?
+// data source.  Perhaps setController: should be private?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -53,14 +67,23 @@
 
 
 // The inputURL may resolve to a different URL as a result of
-// either a client side refresh <META HTTP-EQUIV="refresh" ...> or
-// a DNS redirect.  Both of these implicit actions should not
-// require a new data source.  The resolvedURL is the URL that is
-// ultimately used to fetch page data.
-// [We need more brain cells applied to this issue.]  
+// a DNS redirect.  May return nil if the URL has not yet been
+// resolved.  <WKLocationChangedHandler> includes a message
+// that is sent after the URL has been resolved.
 - (NSURL *)resolvedURL;
 
 
+// finalURL returns the URL that was actually used.  The final URL
+// may be different than the resolvedURL if the server redirects.
+// <WKLocationChangedHandler> includes a message that is sent after
+// the URL has been resolved.
+- (NSURL *)finalURL;
+
+
+// Returns true if the resolvedURL has been redirected by the server,
+// i.e. resolvedURL != finalURL.
+- (BOOL)isRedirected;
+
 // Start actually getting (if initialized with a URL) and parsing data. If the data source
 // is still performing a previous load it will be stopped.
 // If forceRefresh is YES the document will load from the net, not the cache.
@@ -124,6 +147,8 @@
 
 
 /*
+   ============================================================================= 
+
     This class provides a cover for URL-based preference items. 
 */
 @interface WKPreferences
diff --git a/WebKit/WebView.subproj/WKWebView.h b/WebKit/WebView.subproj/WKWebView.h
index 1a113ad..5174a2c 100644
--- a/WebKit/WebView.subproj/WKWebView.h
+++ b/WebKit/WebView.subproj/WKWebView.h
@@ -11,6 +11,8 @@
 
 #ifdef READY_FOR_PRIMETIME
 /*
+   ============================================================================= 
+
     Typical usage of a WKWebView.
     
     NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
@@ -61,6 +63,7 @@
             resources have been loaded.  Controllers should terminate progress indicators at 
             this point.
                     
+    ============================================================================= 
 */
 @interface WKWebView : NSView
 {
@@ -129,7 +132,7 @@
 - (NSRange)selectedRange;
 
 
-// MCJ thinks we need high level find API on view.
+// Maciej thinks we need high level find API on view.
 
 @end
 
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 1ff1569..89d671a 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -9,6 +9,8 @@
 #ifdef READY_FOR_PRIMETIME
 
 /*
+   ============================================================================= 
+
     WKWebController manages the interaction between WKWebView and WKWebDataSource.
     Intances of WKWebController retain their view and data source.
     
@@ -42,6 +44,43 @@
     
     WKConcreteWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
+
+   ============================================================================= 
+    
+    Changes: 
+    
+    2001-12-12
+        Changed WKConcreteWebController to WKDefaultWebController.
+        
+        Changed WKLocationChangedHandler naming, replace "loadingXXX" with
+        "locationChangeXXX".
+
+        Changed loadingStopped in WKLocationChangedHandler to locationChangeStopped:(WKError *).
+
+        Changed loadingCancelled in WKLocationChangedHandler to locationChangeCancelled:(WKError *).
+        
+        Changed loadedPageTitle in WKLocationChangedHandler to receivedPageTitle:.
+
+        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to WKLocationChangedHandler.
+        
+        Added the following two methods to WKLocationChangedHandler:
+        
+            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+            - (void)serverRedirectTo: (NSURL *)url;
+       
+        Put locationWillChangeTo: back on WKLocationChangedHandler.
+        
+        Changed XXXforLocation in WKLoadHandler to XXXforResource.
+        
+        Changed timeoutForLocation: in WKLoadHandler to receivedError:forResource:partialProgress:
+        
+        Added the following two methods to WKDefaultWebController:
+        
+            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
+            - (BOOL)directsAllLinksToSystemBrowser;
+            
+        Removed WKError.  This will be described in WKError.h.
+        
 */
 
 
@@ -66,6 +105,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebViewDelegates implement protocols that modify the behavior of
     WKWebViews.  A WKWebView does not require a delegate.
 */
@@ -74,6 +115,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebDataSourceDelegate implement protocols that modify the behavior of
     WKWebDataSources.  A WKWebDataSources does not require a delegate.
 */
@@ -81,52 +124,67 @@
 @end
 
 
-// Is WKConcreteWebController the right name?  The name fits with the
-// scheme used by Foundation, although Foundation's concrete classes
-// typically aren't public.
- at interface WKConcreteWebController : NSObject <WKWebController>
+/*
+   ============================================================================= 
+
+    Is WKConcreteWebController the right name?  The name fits with the
+    scheme used by Foundation, although Foundation's concrete classes
+    typically aren't public.
+*/
+ at interface WKDefaultWebController : NSObject <WKWebController>
+
 - initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
 @end
 
+/*
+   ============================================================================= 
 
-// See the comments in WKWebPageView above for more description about this protocol.
+    See the comments in WKWebPageView above for more description about this protocol.
+*/
 @protocol WKLocationChangeHandler
 
-- (void)loadingStarted;
-- (void)loadingCancelled;
-- (void)loadingStopped;
-- (void)loadingFinished;
-
-- (void)loadedPageTitle: (NSString *)title;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
- at end
+- (void)locationChangeStarted;
+- (void)locationChangeCancelledL: (WKError *)error;
+- (void)locationChangeStopped: (WKError *)error;
+- (void)locationChangeFinished;
 
+- (void)receivedPageTitle: (NSString *)title;
 
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+- (void)serverRedirectTo: (NSURL *)url;
 
- at protocol WKContextMenuHandler
-// Returns the array of menu items for this node that will be displayed in the context menu.
-// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
-// after making any desired changes or additions.
-- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
+   ============================================================================= 
+
+    A WKLoadProgress capture the state associated with a load progress
+    indication.  Should we use a struct?
 */
- at protocol WKCredentialsHandler
-// Ken will come up with a proposal for this.  We decided not to have a generic API,
-// rather we'll have an API that explicitly knows about the authentication
-// attributes needed.
-// Client should use this API to collect information necessary to authenticate,
-// usually by putting up a dialog.
-// Do we provide a default dialog?
+ at interface WKLoadProgress 
+{
+    int bytesSoFar;	// 0 if this is the start of load
+    int totalToLoad;	// -1 if this is not known.
+                        // bytesSoFar == totalLoaded when complete
+    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
+}
 @end
 
 
 /*
+   ============================================================================= 
+
     Implementors of this protocol will receive messages indicating
-    data as it arrives.
+    data has been received.
     
-    This method will be called even if the data source
+    The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
 */
 @protocol  WKLoadHandler
@@ -137,50 +195,49 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forLocation: (NSString *)lcoation;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
 
-- (void)timeoutForLocation: (NSString *)location partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
 
 @end
 
-
-
 /*
-    A WKLoadProgress capture the state associated with a load progress
-    indication.  Should we use a struct?
+   ============================================================================= 
 */
- at interface WKLoadProgress 
-{
-    int bytesSoFar;	// 0 if this is the start of load
-    int totalToLoad;	// -1 if this is not known.
-                        // bytesSoFar == totalLoaded when complete
-    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
-}
+ at protocol WKContextMenuHandler
+// Returns the array of menu items for this node that will be displayed in the context menu.
+// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
+// after making any desired changes or additions.
+- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
-   Error handling:
-        error conditions:
-            timeout
-            unrecognized/handled mime-type
-            javascript errors
-            invalid url
-            parsing errors
-            
+   ============================================================================= 
+
 */
- at interface WKError
-{
-    NSString *description;
-    int code;
-}
+ at protocol WKCredentialsHandler
+// Ken will come up with a proposal for this.  We decided not to have a generic API,
+// rather we'll have an API that explicitly knows about the authentication
+// attributes needed.
+// Client should use this API to collect information necessary to authenticate,
+// usually by putting up a dialog.
+// Do we provide a default dialog?
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
 @protocol WKWebDataSourceErrorHandler
 - error: (WKError *)error;
 @end
 
 
 /*
+   ============================================================================= 
+
     A class that implements WKScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
@@ -199,6 +256,8 @@
 
 
 /*
+   ============================================================================= 
+
 */
 @protocol WKFrameSetHandler
 - (NSArray *)frameNames;
@@ -207,5 +266,13 @@
 - (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
+ at protocol WKFrame
+ at end
+
 #endif
 
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 6d3f53b..24de261 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -8,7 +8,9 @@
 
 #import <WebKit/WKWebController.h>
 
-/*
+/* 
+   =============================================================================
+   
     A WKWebDataSource represents all the state associated
     with a web page.  It is typicallly initialized with a URL, but
     may also be initialized with an NSString or NSData that hold
@@ -19,9 +21,22 @@
     WKWebDataSource *dataSource = [[WKWebDataSource alloc] initWithURL: url];
     id <WKWebController>myController = [[MyControllerClass alloc] init];
     [myController setDataSource: dataSource];
+
+   Changes:
+   
+   2001-12-12
+    
+    After group discussion we decided to classify API as :
+        Tier 1:  Needed by our browser (or Sherlock).
+        Tier 2:  Nedded by Apple internal clients (Mail, Help, PB, other TBD).
+        Tier 3:  Third party software vendors.
+    
+    Added finalURL and isRedirected.
+   
         
+   ============================================================================= 
 */
-
+   
 #ifdef READY_FOR_PRIMETIME
 
 @interface WKWebDataSource : NSObject
@@ -42,8 +57,7 @@
 
 
 // Set the controller for this data source.  NOTE:  The controller is not retained by the
-// data source.
-// Perhaps setController: should be private?
+// data source.  Perhaps setController: should be private?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -53,14 +67,23 @@
 
 
 // The inputURL may resolve to a different URL as a result of
-// either a client side refresh <META HTTP-EQUIV="refresh" ...> or
-// a DNS redirect.  Both of these implicit actions should not
-// require a new data source.  The resolvedURL is the URL that is
-// ultimately used to fetch page data.
-// [We need more brain cells applied to this issue.]  
+// a DNS redirect.  May return nil if the URL has not yet been
+// resolved.  <WKLocationChangedHandler> includes a message
+// that is sent after the URL has been resolved.
 - (NSURL *)resolvedURL;
 
 
+// finalURL returns the URL that was actually used.  The final URL
+// may be different than the resolvedURL if the server redirects.
+// <WKLocationChangedHandler> includes a message that is sent after
+// the URL has been resolved.
+- (NSURL *)finalURL;
+
+
+// Returns true if the resolvedURL has been redirected by the server,
+// i.e. resolvedURL != finalURL.
+- (BOOL)isRedirected;
+
 // Start actually getting (if initialized with a URL) and parsing data. If the data source
 // is still performing a previous load it will be stopped.
 // If forceRefresh is YES the document will load from the net, not the cache.
@@ -124,6 +147,8 @@
 
 
 /*
+   ============================================================================= 
+
     This class provides a cover for URL-based preference items. 
 */
 @interface WKPreferences
diff --git a/WebKit/WebView.subproj/WebFrameView.h b/WebKit/WebView.subproj/WebFrameView.h
index 1a113ad..5174a2c 100644
--- a/WebKit/WebView.subproj/WebFrameView.h
+++ b/WebKit/WebView.subproj/WebFrameView.h
@@ -11,6 +11,8 @@
 
 #ifdef READY_FOR_PRIMETIME
 /*
+   ============================================================================= 
+
     Typical usage of a WKWebView.
     
     NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
@@ -61,6 +63,7 @@
             resources have been loaded.  Controllers should terminate progress indicators at 
             this point.
                     
+    ============================================================================= 
 */
 @interface WKWebView : NSView
 {
@@ -129,7 +132,7 @@
 - (NSRange)selectedRange;
 
 
-// MCJ thinks we need high level find API on view.
+// Maciej thinks we need high level find API on view.
 
 @end
 
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 1ff1569..89d671a 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -9,6 +9,8 @@
 #ifdef READY_FOR_PRIMETIME
 
 /*
+   ============================================================================= 
+
     WKWebController manages the interaction between WKWebView and WKWebDataSource.
     Intances of WKWebController retain their view and data source.
     
@@ -42,6 +44,43 @@
     
     WKConcreteWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
+
+   ============================================================================= 
+    
+    Changes: 
+    
+    2001-12-12
+        Changed WKConcreteWebController to WKDefaultWebController.
+        
+        Changed WKLocationChangedHandler naming, replace "loadingXXX" with
+        "locationChangeXXX".
+
+        Changed loadingStopped in WKLocationChangedHandler to locationChangeStopped:(WKError *).
+
+        Changed loadingCancelled in WKLocationChangedHandler to locationChangeCancelled:(WKError *).
+        
+        Changed loadedPageTitle in WKLocationChangedHandler to receivedPageTitle:.
+
+        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to WKLocationChangedHandler.
+        
+        Added the following two methods to WKLocationChangedHandler:
+        
+            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+            - (void)serverRedirectTo: (NSURL *)url;
+       
+        Put locationWillChangeTo: back on WKLocationChangedHandler.
+        
+        Changed XXXforLocation in WKLoadHandler to XXXforResource.
+        
+        Changed timeoutForLocation: in WKLoadHandler to receivedError:forResource:partialProgress:
+        
+        Added the following two methods to WKDefaultWebController:
+        
+            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
+            - (BOOL)directsAllLinksToSystemBrowser;
+            
+        Removed WKError.  This will be described in WKError.h.
+        
 */
 
 
@@ -66,6 +105,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebViewDelegates implement protocols that modify the behavior of
     WKWebViews.  A WKWebView does not require a delegate.
 */
@@ -74,6 +115,8 @@
 
 
 /*
+   ============================================================================= 
+
     WKWebDataSourceDelegate implement protocols that modify the behavior of
     WKWebDataSources.  A WKWebDataSources does not require a delegate.
 */
@@ -81,52 +124,67 @@
 @end
 
 
-// Is WKConcreteWebController the right name?  The name fits with the
-// scheme used by Foundation, although Foundation's concrete classes
-// typically aren't public.
- at interface WKConcreteWebController : NSObject <WKWebController>
+/*
+   ============================================================================= 
+
+    Is WKConcreteWebController the right name?  The name fits with the
+    scheme used by Foundation, although Foundation's concrete classes
+    typically aren't public.
+*/
+ at interface WKDefaultWebController : NSObject <WKWebController>
+
 - initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
 @end
 
+/*
+   ============================================================================= 
 
-// See the comments in WKWebPageView above for more description about this protocol.
+    See the comments in WKWebPageView above for more description about this protocol.
+*/
 @protocol WKLocationChangeHandler
 
-- (void)loadingStarted;
-- (void)loadingCancelled;
-- (void)loadingStopped;
-- (void)loadingFinished;
-
-- (void)loadedPageTitle: (NSString *)title;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
- at end
+- (void)locationChangeStarted;
+- (void)locationChangeCancelledL: (WKError *)error;
+- (void)locationChangeStopped: (WKError *)error;
+- (void)locationChangeFinished;
 
+- (void)receivedPageTitle: (NSString *)title;
 
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
+- (void)serverRedirectTo: (NSURL *)url;
 
- at protocol WKContextMenuHandler
-// Returns the array of menu items for this node that will be displayed in the context menu.
-// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
-// after making any desired changes or additions.
-- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
+   ============================================================================= 
+
+    A WKLoadProgress capture the state associated with a load progress
+    indication.  Should we use a struct?
 */
- at protocol WKCredentialsHandler
-// Ken will come up with a proposal for this.  We decided not to have a generic API,
-// rather we'll have an API that explicitly knows about the authentication
-// attributes needed.
-// Client should use this API to collect information necessary to authenticate,
-// usually by putting up a dialog.
-// Do we provide a default dialog?
+ at interface WKLoadProgress 
+{
+    int bytesSoFar;	// 0 if this is the start of load
+    int totalToLoad;	// -1 if this is not known.
+                        // bytesSoFar == totalLoaded when complete
+    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
+}
 @end
 
 
 /*
+   ============================================================================= 
+
     Implementors of this protocol will receive messages indicating
-    data as it arrives.
+    data has been received.
     
-    This method will be called even if the data source
+    The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
 */
 @protocol  WKLoadHandler
@@ -137,50 +195,49 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forLocation: (NSString *)lcoation;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
 
-- (void)timeoutForLocation: (NSString *)location partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
 
 @end
 
-
-
 /*
-    A WKLoadProgress capture the state associated with a load progress
-    indication.  Should we use a struct?
+   ============================================================================= 
 */
- at interface WKLoadProgress 
-{
-    int bytesSoFar;	// 0 if this is the start of load
-    int totalToLoad;	// -1 if this is not known.
-                        // bytesSoFar == totalLoaded when complete
-    WK_LOAD_TYPES type;	// load types, either image, css, jscript, or html
-}
+ at protocol WKContextMenuHandler
+// Returns the array of menu items for this node that will be displayed in the context menu.
+// Typically this would be implemented by returning the results of WKWebView defaultContextMenuItemsForNode:
+// after making any desired changes or additions.
+- (NSArray *)contextMenuItemsForNode: (WKDOMNode *);
 @end
 
+
 /*
-   Error handling:
-        error conditions:
-            timeout
-            unrecognized/handled mime-type
-            javascript errors
-            invalid url
-            parsing errors
-            
+   ============================================================================= 
+
 */
- at interface WKError
-{
-    NSString *description;
-    int code;
-}
+ at protocol WKCredentialsHandler
+// Ken will come up with a proposal for this.  We decided not to have a generic API,
+// rather we'll have an API that explicitly knows about the authentication
+// attributes needed.
+// Client should use this API to collect information necessary to authenticate,
+// usually by putting up a dialog.
+// Do we provide a default dialog?
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
 @protocol WKWebDataSourceErrorHandler
 - error: (WKError *)error;
 @end
 
 
 /*
+   ============================================================================= 
+
     A class that implements WKScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
@@ -199,6 +256,8 @@
 
 
 /*
+   ============================================================================= 
+
 */
 @protocol WKFrameSetHandler
 - (NSArray *)frameNames;
@@ -207,5 +266,13 @@
 - (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
 @end
 
+
+/*
+   ============================================================================= 
+
+*/
+ at protocol WKFrame
+ at end
+
 #endif
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list