[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 89ba029bc6f1592b03e23975214766d7dd62f624
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 13 22:02:28 2001 +0000

    Changes to support the model being a tree of documents.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@497 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index 89d671a..0f15045 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -80,7 +80,13 @@
             - (BOOL)directsAllLinksToSystemBrowser;
             
         Removed WKError.  This will be described in WKError.h.
+  
+  2001-12-13
+  
+        Removed WKFrameSetHandler, placed that functionality on WKWebDataSource.
         
+        Changed WKLocationChangeHandler to add a parameter specifying the data source
+        that sent the message.
 */
 
 
@@ -93,13 +99,35 @@
      describe snippets of behavior, but do we explicity reference them anywhere,
      or do we just use the umbrella protocol?]
 */
- at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKFrameSetHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at 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 WKDefaultWebController : NSObject <WKWebController>
+
+- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
 
-- (void)setDataSource: (WKWebDataSource *)dataSource;
-- (WKWebDataSource *)dataSource
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
+- (void)setView: (WKWebView *)view andDataSource: (WKWebDataSource *)dataSource;
+- (WKWebView *)viewForDataSource: (WKWebDataSource *)dataSource;
+- (WKWebDataSource *)dataSourceForView: (WKWebVew *)view
+
+- (WKWebView *)mainView;
+- (WKWebDataSource *)mainDataSource;
 
-- (void)setView: (WKWebView *)view;
-- (WKWebView *)view;
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inFrameNamed: (NSString *)name;
+
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inIFrame: (id)iFrameIdentifier;
 
 @end
 
@@ -127,37 +155,49 @@
 /*
    ============================================================================= 
 
-    Is WKConcreteWebController the right name?  The name fits with the
-    scheme used by Foundation, although Foundation's concrete classes
-    typically aren't public.
+    See the comments in WKWebPageView above for more description about this protocol.
 */
- at interface WKDefaultWebController : NSObject <WKWebController>
+ at protocol WKLocationChangeHandler
 
-- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- setDirectsAllLinksToSystemBrowser: (BOOL)flag
-- (BOOL)directsAllLinksToSystemBrowser;
+- (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;
 
 @end
 
+
 /*
    ============================================================================= 
 
+    A frame-aware version of the the WKLocationChangeHandler
+
     See the comments in WKWebPageView above for more description about this protocol.
 */
 @protocol WKLocationChangeHandler
 
+// locationWillChangeTo: is required, but will it be sent by the dataSource?  More
+// likely the controller will receive a change request from the view.  That argues for
+// placing locationWillChangeTo: in a different protocol, and making it more or a complete
+// handshake.
 - (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- (void)locationChangeStarted;
-- (void)locationChangeCancelledL: (WKError *)error;
-- (void)locationChangeStopped: (WKError *)error;
-- (void)locationChangeFinished;
+- (void)locationChangeStartedByDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeCancelled: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeStopped: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeFinished byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedPageTitle: (NSString *)title;
+- (void)receivedPageTitle: (NSString *)title byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-- (void)serverRedirectTo: (NSURL *)url;
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL byDataSource: (WKWebDataSource *)dataSource;
+- (void)serverRedirectTo: (NSURL *)url byDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
@@ -195,12 +235,13 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress fromDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
+
 /*
    ============================================================================= 
 */
@@ -231,7 +272,7 @@
 
 */
 @protocol WKWebDataSourceErrorHandler
-- error: (WKError *)error;
+- error: (WKError *)error inDataSource: (WKWebDataSource *)dataSource;
 @end
 
 
@@ -245,8 +286,8 @@
 @protocol WKScriptContextHandler
 
 // setStatusText and statusText are used by Javascript's status bar text methods.
-- (void)setStatusText: (NSString *)text;
-- (NSString *)statusText;
+- (void)setStatusText: (NSString *)text forDataSource: (WKWebDataSource *)dataSource;
+- (NSString *)statusTextForDataSource: (WKWebDataSource *)dataSource;
 
 // Need API for things like window size and position, window ids,
 // screen goemetry.  Essentially all the 'view' items that are
@@ -259,18 +300,6 @@
    ============================================================================= 
 
 */
- at protocol WKFrameSetHandler
-- (NSArray *)frameNames;
-- (id <WKFrame>) findFrameNamed: (NSString *)name;
-- (BOOL)frameExists: (NSString *)name;
-- (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
- at end
-
-
-/*
-   ============================================================================= 
-
-*/
 @protocol WKFrame
 @end
 
diff --git a/WebKit/WebView.subproj/IFWebDataSource.h b/WebKit/WebView.subproj/IFWebDataSource.h
index 24de261..410e904 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.h
+++ b/WebKit/WebView.subproj/IFWebDataSource.h
@@ -33,7 +33,25 @@
     
     Added finalURL and isRedirected.
    
+    2001-12-13
+    
+        Remove setBase: and setBaseTarget:
+        
+        Changed return type of baseTarget to (NSString *)
+        
+        Added the following two methods:
+            - (WKDataSource *)parent;
+            - (NSArry *)children;
+            - (BOOL)isMainDocument;
+  
+        Added the following methods:
         
+            - (NSArray *)frameNames;
+            - (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+            - (BOOL)frameExists: (NSString *)name;
+            - (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+            - (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+                    
    ============================================================================= 
 */
    
@@ -56,8 +74,44 @@
 - initWithLoader: (WKURILoader *)loader;
 
 
+// Returns nil if this data source represents the main document.  Otherwise
+// returns the parent data source.
+- (WKDataSource *)parent;
+
+
+// Returns YES if this is the main document.  The main document is the 'top'
+// document, typically either a frameset or a normal HTML document.
+- (BOOL)isMainDocument;
+
+// Returns an array of WKWebDataSource.  The data sources in the array are
+// the data source assoicated with a frame set or iframe.  If the main document
+// is not a frameset, or has not iframes children will return nil.
+- (NSArray *)children;
+
+
+// Returns an array of NSStrings or nil.  The NSStrings corresponds to
+// frame names.  If this data source is the main document and has no
+// frames then frameNames will return nil.
+- (NSArray *)frameNames;
+
+// findDataSourceForFrameNamed: returns the child data source associated with
+// the frame named 'name', or nil. 
+- (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+
+
+- (BOOL)frameExists: (NSString *)name;
+
+
+- (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+
+
+- (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+
+
 // 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?  Perhaps the back pointers
+// can be managed externally, i.e. + controllerForDataSource: as a class method on 
+// WKDefaultWebController?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -110,10 +164,8 @@
 
 
 // URL reference point, these should probably not be public for 1.0.
-- setBase: (NSURL *)url;
 - (NSURL *)base;
-- setBaseTarget: (NSURL *)url;
-- (NSURL *)baseTarget;
+- (NSString *)baseTarget;
 
 
 - (NSString *)encoding;
diff --git a/WebKit/WebView.subproj/WKWebController.h b/WebKit/WebView.subproj/WKWebController.h
index 89d671a..0f15045 100644
--- a/WebKit/WebView.subproj/WKWebController.h
+++ b/WebKit/WebView.subproj/WKWebController.h
@@ -80,7 +80,13 @@
             - (BOOL)directsAllLinksToSystemBrowser;
             
         Removed WKError.  This will be described in WKError.h.
+  
+  2001-12-13
+  
+        Removed WKFrameSetHandler, placed that functionality on WKWebDataSource.
         
+        Changed WKLocationChangeHandler to add a parameter specifying the data source
+        that sent the message.
 */
 
 
@@ -93,13 +99,35 @@
      describe snippets of behavior, but do we explicity reference them anywhere,
      or do we just use the umbrella protocol?]
 */
- at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKFrameSetHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at 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 WKDefaultWebController : NSObject <WKWebController>
+
+- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
 
-- (void)setDataSource: (WKWebDataSource *)dataSource;
-- (WKWebDataSource *)dataSource
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
+- (void)setView: (WKWebView *)view andDataSource: (WKWebDataSource *)dataSource;
+- (WKWebView *)viewForDataSource: (WKWebDataSource *)dataSource;
+- (WKWebDataSource *)dataSourceForView: (WKWebVew *)view
+
+- (WKWebView *)mainView;
+- (WKWebDataSource *)mainDataSource;
 
-- (void)setView: (WKWebView *)view;
-- (WKWebView *)view;
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inFrameNamed: (NSString *)name;
+
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inIFrame: (id)iFrameIdentifier;
 
 @end
 
@@ -127,37 +155,49 @@
 /*
    ============================================================================= 
 
-    Is WKConcreteWebController the right name?  The name fits with the
-    scheme used by Foundation, although Foundation's concrete classes
-    typically aren't public.
+    See the comments in WKWebPageView above for more description about this protocol.
 */
- at interface WKDefaultWebController : NSObject <WKWebController>
+ at protocol WKLocationChangeHandler
 
-- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- setDirectsAllLinksToSystemBrowser: (BOOL)flag
-- (BOOL)directsAllLinksToSystemBrowser;
+- (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;
 
 @end
 
+
 /*
    ============================================================================= 
 
+    A frame-aware version of the the WKLocationChangeHandler
+
     See the comments in WKWebPageView above for more description about this protocol.
 */
 @protocol WKLocationChangeHandler
 
+// locationWillChangeTo: is required, but will it be sent by the dataSource?  More
+// likely the controller will receive a change request from the view.  That argues for
+// placing locationWillChangeTo: in a different protocol, and making it more or a complete
+// handshake.
 - (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- (void)locationChangeStarted;
-- (void)locationChangeCancelledL: (WKError *)error;
-- (void)locationChangeStopped: (WKError *)error;
-- (void)locationChangeFinished;
+- (void)locationChangeStartedByDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeCancelled: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeStopped: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeFinished byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedPageTitle: (NSString *)title;
+- (void)receivedPageTitle: (NSString *)title byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-- (void)serverRedirectTo: (NSURL *)url;
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL byDataSource: (WKWebDataSource *)dataSource;
+- (void)serverRedirectTo: (NSURL *)url byDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
@@ -195,12 +235,13 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress fromDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
+
 /*
    ============================================================================= 
 */
@@ -231,7 +272,7 @@
 
 */
 @protocol WKWebDataSourceErrorHandler
-- error: (WKError *)error;
+- error: (WKError *)error inDataSource: (WKWebDataSource *)dataSource;
 @end
 
 
@@ -245,8 +286,8 @@
 @protocol WKScriptContextHandler
 
 // setStatusText and statusText are used by Javascript's status bar text methods.
-- (void)setStatusText: (NSString *)text;
-- (NSString *)statusText;
+- (void)setStatusText: (NSString *)text forDataSource: (WKWebDataSource *)dataSource;
+- (NSString *)statusTextForDataSource: (WKWebDataSource *)dataSource;
 
 // Need API for things like window size and position, window ids,
 // screen goemetry.  Essentially all the 'view' items that are
@@ -259,18 +300,6 @@
    ============================================================================= 
 
 */
- at protocol WKFrameSetHandler
-- (NSArray *)frameNames;
-- (id <WKFrame>) findFrameNamed: (NSString *)name;
-- (BOOL)frameExists: (NSString *)name;
-- (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
- at end
-
-
-/*
-   ============================================================================= 
-
-*/
 @protocol WKFrame
 @end
 
diff --git a/WebKit/WebView.subproj/WKWebDataSource.h b/WebKit/WebView.subproj/WKWebDataSource.h
index 24de261..410e904 100644
--- a/WebKit/WebView.subproj/WKWebDataSource.h
+++ b/WebKit/WebView.subproj/WKWebDataSource.h
@@ -33,7 +33,25 @@
     
     Added finalURL and isRedirected.
    
+    2001-12-13
+    
+        Remove setBase: and setBaseTarget:
+        
+        Changed return type of baseTarget to (NSString *)
+        
+        Added the following two methods:
+            - (WKDataSource *)parent;
+            - (NSArry *)children;
+            - (BOOL)isMainDocument;
+  
+        Added the following methods:
         
+            - (NSArray *)frameNames;
+            - (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+            - (BOOL)frameExists: (NSString *)name;
+            - (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+            - (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+                    
    ============================================================================= 
 */
    
@@ -56,8 +74,44 @@
 - initWithLoader: (WKURILoader *)loader;
 
 
+// Returns nil if this data source represents the main document.  Otherwise
+// returns the parent data source.
+- (WKDataSource *)parent;
+
+
+// Returns YES if this is the main document.  The main document is the 'top'
+// document, typically either a frameset or a normal HTML document.
+- (BOOL)isMainDocument;
+
+// Returns an array of WKWebDataSource.  The data sources in the array are
+// the data source assoicated with a frame set or iframe.  If the main document
+// is not a frameset, or has not iframes children will return nil.
+- (NSArray *)children;
+
+
+// Returns an array of NSStrings or nil.  The NSStrings corresponds to
+// frame names.  If this data source is the main document and has no
+// frames then frameNames will return nil.
+- (NSArray *)frameNames;
+
+// findDataSourceForFrameNamed: returns the child data source associated with
+// the frame named 'name', or nil. 
+- (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+
+
+- (BOOL)frameExists: (NSString *)name;
+
+
+- (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+
+
+- (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+
+
 // 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?  Perhaps the back pointers
+// can be managed externally, i.e. + controllerForDataSource: as a class method on 
+// WKDefaultWebController?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -110,10 +164,8 @@
 
 
 // URL reference point, these should probably not be public for 1.0.
-- setBase: (NSURL *)url;
 - (NSURL *)base;
-- setBaseTarget: (NSURL *)url;
-- (NSURL *)baseTarget;
+- (NSString *)baseTarget;
 
 
 - (NSString *)encoding;
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 89d671a..0f15045 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -80,7 +80,13 @@
             - (BOOL)directsAllLinksToSystemBrowser;
             
         Removed WKError.  This will be described in WKError.h.
+  
+  2001-12-13
+  
+        Removed WKFrameSetHandler, placed that functionality on WKWebDataSource.
         
+        Changed WKLocationChangeHandler to add a parameter specifying the data source
+        that sent the message.
 */
 
 
@@ -93,13 +99,35 @@
      describe snippets of behavior, but do we explicity reference them anywhere,
      or do we just use the umbrella protocol?]
 */
- at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKFrameSetHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at 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 WKDefaultWebController : NSObject <WKWebController>
+
+- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
 
-- (void)setDataSource: (WKWebDataSource *)dataSource;
-- (WKWebDataSource *)dataSource
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
+- (void)setView: (WKWebView *)view andDataSource: (WKWebDataSource *)dataSource;
+- (WKWebView *)viewForDataSource: (WKWebDataSource *)dataSource;
+- (WKWebDataSource *)dataSourceForView: (WKWebVew *)view
+
+- (WKWebView *)mainView;
+- (WKWebDataSource *)mainDataSource;
 
-- (void)setView: (WKWebView *)view;
-- (WKWebView *)view;
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inFrameNamed: (NSString *)name;
+
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inIFrame: (id)iFrameIdentifier;
 
 @end
 
@@ -127,37 +155,49 @@
 /*
    ============================================================================= 
 
-    Is WKConcreteWebController the right name?  The name fits with the
-    scheme used by Foundation, although Foundation's concrete classes
-    typically aren't public.
+    See the comments in WKWebPageView above for more description about this protocol.
 */
- at interface WKDefaultWebController : NSObject <WKWebController>
+ at protocol WKLocationChangeHandler
 
-- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- setDirectsAllLinksToSystemBrowser: (BOOL)flag
-- (BOOL)directsAllLinksToSystemBrowser;
+- (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;
 
 @end
 
+
 /*
    ============================================================================= 
 
+    A frame-aware version of the the WKLocationChangeHandler
+
     See the comments in WKWebPageView above for more description about this protocol.
 */
 @protocol WKLocationChangeHandler
 
+// locationWillChangeTo: is required, but will it be sent by the dataSource?  More
+// likely the controller will receive a change request from the view.  That argues for
+// placing locationWillChangeTo: in a different protocol, and making it more or a complete
+// handshake.
 - (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- (void)locationChangeStarted;
-- (void)locationChangeCancelledL: (WKError *)error;
-- (void)locationChangeStopped: (WKError *)error;
-- (void)locationChangeFinished;
+- (void)locationChangeStartedByDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeCancelled: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeStopped: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeFinished byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedPageTitle: (NSString *)title;
+- (void)receivedPageTitle: (NSString *)title byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-- (void)serverRedirectTo: (NSURL *)url;
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL byDataSource: (WKWebDataSource *)dataSource;
+- (void)serverRedirectTo: (NSURL *)url byDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
@@ -195,12 +235,13 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress fromDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
+
 /*
    ============================================================================= 
 */
@@ -231,7 +272,7 @@
 
 */
 @protocol WKWebDataSourceErrorHandler
-- error: (WKError *)error;
+- error: (WKError *)error inDataSource: (WKWebDataSource *)dataSource;
 @end
 
 
@@ -245,8 +286,8 @@
 @protocol WKScriptContextHandler
 
 // setStatusText and statusText are used by Javascript's status bar text methods.
-- (void)setStatusText: (NSString *)text;
-- (NSString *)statusText;
+- (void)setStatusText: (NSString *)text forDataSource: (WKWebDataSource *)dataSource;
+- (NSString *)statusTextForDataSource: (WKWebDataSource *)dataSource;
 
 // Need API for things like window size and position, window ids,
 // screen goemetry.  Essentially all the 'view' items that are
@@ -259,18 +300,6 @@
    ============================================================================= 
 
 */
- at protocol WKFrameSetHandler
-- (NSArray *)frameNames;
-- (id <WKFrame>) findFrameNamed: (NSString *)name;
-- (BOOL)frameExists: (NSString *)name;
-- (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
- at end
-
-
-/*
-   ============================================================================= 
-
-*/
 @protocol WKFrame
 @end
 
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 24de261..410e904 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -33,7 +33,25 @@
     
     Added finalURL and isRedirected.
    
+    2001-12-13
+    
+        Remove setBase: and setBaseTarget:
+        
+        Changed return type of baseTarget to (NSString *)
+        
+        Added the following two methods:
+            - (WKDataSource *)parent;
+            - (NSArry *)children;
+            - (BOOL)isMainDocument;
+  
+        Added the following methods:
         
+            - (NSArray *)frameNames;
+            - (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+            - (BOOL)frameExists: (NSString *)name;
+            - (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+            - (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+                    
    ============================================================================= 
 */
    
@@ -56,8 +74,44 @@
 - initWithLoader: (WKURILoader *)loader;
 
 
+// Returns nil if this data source represents the main document.  Otherwise
+// returns the parent data source.
+- (WKDataSource *)parent;
+
+
+// Returns YES if this is the main document.  The main document is the 'top'
+// document, typically either a frameset or a normal HTML document.
+- (BOOL)isMainDocument;
+
+// Returns an array of WKWebDataSource.  The data sources in the array are
+// the data source assoicated with a frame set or iframe.  If the main document
+// is not a frameset, or has not iframes children will return nil.
+- (NSArray *)children;
+
+
+// Returns an array of NSStrings or nil.  The NSStrings corresponds to
+// frame names.  If this data source is the main document and has no
+// frames then frameNames will return nil.
+- (NSArray *)frameNames;
+
+// findDataSourceForFrameNamed: returns the child data source associated with
+// the frame named 'name', or nil. 
+- (WKWebDataSource) findDataSourceForFrameNamed: (NSString *)name;
+
+
+- (BOOL)frameExists: (NSString *)name;
+
+
+- (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+
+
+- (void)openURL: (NSURL *)url inIFrame: (id)iFrameIdentifier;
+
+
 // 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?  Perhaps the back pointers
+// can be managed externally, i.e. + controllerForDataSource: as a class method on 
+// WKDefaultWebController?
 - (void)setController: (id <WKWebController>)controller;
 - (id <WKWebController>)controller;
 
@@ -110,10 +164,8 @@
 
 
 // URL reference point, these should probably not be public for 1.0.
-- setBase: (NSURL *)url;
 - (NSURL *)base;
-- setBaseTarget: (NSURL *)url;
-- (NSURL *)baseTarget;
+- (NSString *)baseTarget;
 
 
 - (NSString *)encoding;
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 89d671a..0f15045 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -80,7 +80,13 @@
             - (BOOL)directsAllLinksToSystemBrowser;
             
         Removed WKError.  This will be described in WKError.h.
+  
+  2001-12-13
+  
+        Removed WKFrameSetHandler, placed that functionality on WKWebDataSource.
         
+        Changed WKLocationChangeHandler to add a parameter specifying the data source
+        that sent the message.
 */
 
 
@@ -93,13 +99,35 @@
      describe snippets of behavior, but do we explicity reference them anywhere,
      or do we just use the umbrella protocol?]
 */
- at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKFrameSetHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at protocol WKWebController <WKLoadHandler, WKScriptContextHandler, WKCredentialsHandler, WKLocationChangeHandler>
+ at 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 WKDefaultWebController : NSObject <WKWebController>
+
+- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
 
-- (void)setDataSource: (WKWebDataSource *)dataSource;
-- (WKWebDataSource *)dataSource
+- setDirectsAllLinksToSystemBrowser: (BOOL)flag
+- (BOOL)directsAllLinksToSystemBrowser;
+
+- (void)setView: (WKWebView *)view andDataSource: (WKWebDataSource *)dataSource;
+- (WKWebView *)viewForDataSource: (WKWebDataSource *)dataSource;
+- (WKWebDataSource *)dataSourceForView: (WKWebVew *)view
+
+- (WKWebView *)mainView;
+- (WKWebDataSource *)mainDataSource;
 
-- (void)setView: (WKWebView *)view;
-- (WKWebView *)view;
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inFrameNamed: (NSString *)name;
+
+- (void)createViewForDataSource: (WKWebDataSource *)dataSource inIFrame: (id)iFrameIdentifier;
 
 @end
 
@@ -127,37 +155,49 @@
 /*
    ============================================================================= 
 
-    Is WKConcreteWebController the right name?  The name fits with the
-    scheme used by Foundation, although Foundation's concrete classes
-    typically aren't public.
+    See the comments in WKWebPageView above for more description about this protocol.
 */
- at interface WKDefaultWebController : NSObject <WKWebController>
+ at protocol WKLocationChangeHandler
 
-- initWithView: (WKWebView *) dataSource: (WKWebDataSource *)dataSource;
+- (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- setDirectsAllLinksToSystemBrowser: (BOOL)flag
-- (BOOL)directsAllLinksToSystemBrowser;
+- (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;
 
 @end
 
+
 /*
    ============================================================================= 
 
+    A frame-aware version of the the WKLocationChangeHandler
+
     See the comments in WKWebPageView above for more description about this protocol.
 */
 @protocol WKLocationChangeHandler
 
+// locationWillChangeTo: is required, but will it be sent by the dataSource?  More
+// likely the controller will receive a change request from the view.  That argues for
+// placing locationWillChangeTo: in a different protocol, and making it more or a complete
+// handshake.
 - (BOOL)locationWillChangeTo: (NSURL *)url;
 
-- (void)locationChangeStarted;
-- (void)locationChangeCancelledL: (WKError *)error;
-- (void)locationChangeStopped: (WKError *)error;
-- (void)locationChangeFinished;
+- (void)locationChangeStartedByDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeCancelled: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeStopped: (WKError *)error byDataSource: (WKWebDataSource *)dataSource;
+- (void)locationChangeFinished byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedPageTitle: (NSString *)title;
+- (void)receivedPageTitle: (NSString *)title byDataSource: (WKWebDataSource *)dataSource;
 
-- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-- (void)serverRedirectTo: (NSURL *)url;
+- (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL byDataSource: (WKWebDataSource *)dataSource;
+- (void)serverRedirectTo: (NSURL *)url byDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
@@ -195,12 +235,13 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription;
+- (void)receivedProgress: (WKLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (WKWebDataSource *)dataSource;
 
-- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress;
+- (void)receivedError: (WKError *)error forResource: (NSString *)resourceDescription partialProgress: (WKLoadProgress *)progress fromDataSource: (WKWebDataSource *)dataSource;
 
 @end
 
+
 /*
    ============================================================================= 
 */
@@ -231,7 +272,7 @@
 
 */
 @protocol WKWebDataSourceErrorHandler
-- error: (WKError *)error;
+- error: (WKError *)error inDataSource: (WKWebDataSource *)dataSource;
 @end
 
 
@@ -245,8 +286,8 @@
 @protocol WKScriptContextHandler
 
 // setStatusText and statusText are used by Javascript's status bar text methods.
-- (void)setStatusText: (NSString *)text;
-- (NSString *)statusText;
+- (void)setStatusText: (NSString *)text forDataSource: (WKWebDataSource *)dataSource;
+- (NSString *)statusTextForDataSource: (WKWebDataSource *)dataSource;
 
 // Need API for things like window size and position, window ids,
 // screen goemetry.  Essentially all the 'view' items that are
@@ -259,18 +300,6 @@
    ============================================================================= 
 
 */
- at protocol WKFrameSetHandler
-- (NSArray *)frameNames;
-- (id <WKFrame>) findFrameNamed: (NSString *)name;
-- (BOOL)frameExists: (NSString *)name;
-- (void)openURL: (NSURL *)url inFrame: (id <WKFrame>) frame;
- at end
-
-
-/*
-   ============================================================================= 
-
-*/
 @protocol WKFrame
 @end
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list