[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 06:03:44 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1932f70e75ef221f3bda5d8b3c4dacd6a3f9422f
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 8 17:58:50 2002 +0000

    i        Added frameForView:
            Cleaned up out-of-date comments.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index cf0bd5d..2f0e5bf 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-08  Richard Williamson  <rjw at apple.com>
+
+        Added frameForView:
+        Cleaned up out-of-date comments.
+        
+	* WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+	_frameForView:fromFrame:]), (-[IFBaseWebController frameForView:]):
+	* WebView.subproj/IFWebController.h:
+
 2002-04-05  Chris Blumenberg  <cblu at apple.com>
 
 	* Plugins.subproj/IFNullPluginView.mm: (+[IFNullPluginView load]):
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index cf0bd5d..2f0e5bf 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-04-08  Richard Williamson  <rjw at apple.com>
+
+        Added frameForView:
+        Cleaned up out-of-date comments.
+        
+	* WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+	_frameForView:fromFrame:]), (-[IFBaseWebController frameForView:]):
+	* WebView.subproj/IFWebController.h:
+
 2002-04-05  Chris Blumenberg  <cblu at apple.com>
 
 	* Plugins.subproj/IFNullPluginView.mm: (+[IFNullPluginView load]):
diff --git a/WebKit/WebView.subproj/IFBaseWebController.mm b/WebKit/WebView.subproj/IFBaseWebController.mm
index 74601d3..8c86c25 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.mm
+++ b/WebKit/WebView.subproj/IFBaseWebController.mm
@@ -224,6 +224,46 @@
     return [self _frameForDataSource: dataSource fromFrame: frame];
 }
 
+
+- (IFWebFrame *)_frameForView: (NSView *)aView fromFrame: (IFWebFrame *)frame
+{
+    NSArray *frames;
+    int i, count;
+    IFWebFrame *result, *aFrame;
+    
+    if ([frame view] == aView)
+        return frame;
+        
+    frames = [[frame dataSource] children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForView: aView fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+
+    frames = [[frame provisionalDataSource] children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForView: aView fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+    
+    return nil;       
+}
+
+
+- (IFWebFrame *)frameForView: (NSView *)aView
+{
+    IFWebFrame *frame = [self mainFrame];
+    
+    return [self _frameForView: aView fromFrame: frame];
+}
+
+
 - (IFWebFrame *)_frameNamed: (NSString *)name fromFrame: (IFWebFrame *)frame
 {
     if ([[frame name] isEqual: name])
diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index 5d4659d..75fc4d6 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -21,62 +21,10 @@
     alternate views of the web pages described by IFWebDataSources.  For example, a web
     crawler may implement a IFWebController with no corresponding view.
     
-    IFDefaultWebController may be subclassed to modify the behavior of the standard
+    IFBaseWebController may be subclassed to modify the behavior of the standard
     IFWebView and IFWebDataSource.
 
    ============================================================================= 
-    
-    Changes: 
-    
-    2001-12-12
-        Changed IFConcreteWebController to IFDefaultWebController.
-        
-        Changed IFLocationChangedHandler naming, replace "loadingXXX" with
-        "locationChangeXXX".
-
-        Changed loadingStopped in IFLocationChangedHandler to locationChangeStopped:(IFError *).
-
-        Changed loadingCancelled in IFLocationChangedHandler to locationChangeCancelled:(IFError *).
-        
-        Changed loadedPageTitle in IFLocationChangedHandler to receivedPageTitle:.
-
-        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to IFLocationChangedHandler.
-        
-        Added the following two methods to IFLocationChangedHandler:
-        
-            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-            - (void)serverRedirectTo: (NSURL *)url;
-       
-        Put locationWillChangeTo: back on IFLocationChangedHandler.
-        
-        Changed XXXforLocation in IFLoadHandler to XXXforResource.
-        
-        Changed timeoutForLocation: in IFLoadHandler to receivedError:forResource:partialProgress:
-        
-        Added the following two methods to IFDefaultWebController:
-        
-            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
-            - (BOOL)directsAllLinksToSystemBrowser;
-            
-        Removed IFError.  This will be described in IFError.h.
-  
-  2001-12-13
-  
-        Removed IFFrameSetHandler, placed that functionality on IFWebDataSource.
-        
-        Changed IFLocationChangeHandler to add a parameter specifying the data source
-        that sent the message.
-
-  2001-12-14
-
-        Removed inputURL:resolvedTo: methods, per discussion with Don.
-
-        Remove IFContextMenuHandler for want of a better way to describe the
-        not-yet-existing IFDOMNode.  We can't think of any initial clients that want
-        to override the default behavior anyway.  Put it in IFGrabBag.h for now.
-
-        Simplified IFLocationChangeHandler and updated
-	IFAuthenticationHandler to use interfaces instead of structs..
 */
 
 
@@ -85,23 +33,13 @@
 @class IFWebView;
 @class IFWebFrame;
 
+
 /*
    ============================================================================= 
-
-    A frame-aware version of the the IFLocationChangeHandler
-
-    See the comments in IFWebPageView above for more description about this protocol.
+   ============================================================================= 
 */
 @protocol IFLocationChangeHandler
 
-// This API will need to be extended to support some notion of the context in which
-// a location is changing, i.e. was it initiated by a user click, by a programmatic
-// manipulation of the DOM, is the frame an iframe, or a frame.
-
-// 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 forFrame: (IFWebFrame *)frame;
 
 - (void)locationChangeStartedForFrame: (IFWebFrame *)frame;
@@ -125,6 +63,8 @@
     
     The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
+
+   ============================================================================= 
 */
 @protocol  IFLoadHandler
 
@@ -148,6 +88,7 @@
     A class that implements IFScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
+   ============================================================================= 
 */
 @protocol IFScriptContextHandler
 
@@ -172,9 +113,7 @@
     and IFWebDataSource.  See each inherited protocol for a more complete
     description.
     
-    [Don and I both agree that all these little protocols are useful to cleanly
-     describe snippets of behavior, but do we explicity reference them anywhere,
-     or do we just use the umbrella protocol?]
+   ============================================================================= 
 */
 @protocol IFWebController <IFLoadHandler, IFScriptContextHandler, IFLocationChangeHandler>
 
@@ -183,9 +122,13 @@
 // specifics of creating and initializaing a view of the appropriate class.
 - (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
 
-// Look for a frame named name recursively.
+
+// Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
 
+
+// Return the top level frame.  Note that even document that are not framesets will have a
+// mainFrame.
 - (IFWebFrame *)mainFrame;
 
 
@@ -194,6 +137,12 @@
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 
+// Return the frame associated with the view.  Traverses the
+// frame tree to find the data source.  Typically aView is
+// an IFWebView.
+- (IFWebFrame *)frameForView: (NSView *)aView;
+
+
 @end
 
 
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 5d4659d..75fc4d6 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -21,62 +21,10 @@
     alternate views of the web pages described by IFWebDataSources.  For example, a web
     crawler may implement a IFWebController with no corresponding view.
     
-    IFDefaultWebController may be subclassed to modify the behavior of the standard
+    IFBaseWebController may be subclassed to modify the behavior of the standard
     IFWebView and IFWebDataSource.
 
    ============================================================================= 
-    
-    Changes: 
-    
-    2001-12-12
-        Changed IFConcreteWebController to IFDefaultWebController.
-        
-        Changed IFLocationChangedHandler naming, replace "loadingXXX" with
-        "locationChangeXXX".
-
-        Changed loadingStopped in IFLocationChangedHandler to locationChangeStopped:(IFError *).
-
-        Changed loadingCancelled in IFLocationChangedHandler to locationChangeCancelled:(IFError *).
-        
-        Changed loadedPageTitle in IFLocationChangedHandler to receivedPageTitle:.
-
-        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to IFLocationChangedHandler.
-        
-        Added the following two methods to IFLocationChangedHandler:
-        
-            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-            - (void)serverRedirectTo: (NSURL *)url;
-       
-        Put locationWillChangeTo: back on IFLocationChangedHandler.
-        
-        Changed XXXforLocation in IFLoadHandler to XXXforResource.
-        
-        Changed timeoutForLocation: in IFLoadHandler to receivedError:forResource:partialProgress:
-        
-        Added the following two methods to IFDefaultWebController:
-        
-            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
-            - (BOOL)directsAllLinksToSystemBrowser;
-            
-        Removed IFError.  This will be described in IFError.h.
-  
-  2001-12-13
-  
-        Removed IFFrameSetHandler, placed that functionality on IFWebDataSource.
-        
-        Changed IFLocationChangeHandler to add a parameter specifying the data source
-        that sent the message.
-
-  2001-12-14
-
-        Removed inputURL:resolvedTo: methods, per discussion with Don.
-
-        Remove IFContextMenuHandler for want of a better way to describe the
-        not-yet-existing IFDOMNode.  We can't think of any initial clients that want
-        to override the default behavior anyway.  Put it in IFGrabBag.h for now.
-
-        Simplified IFLocationChangeHandler and updated
-	IFAuthenticationHandler to use interfaces instead of structs..
 */
 
 
@@ -85,23 +33,13 @@
 @class IFWebView;
 @class IFWebFrame;
 
+
 /*
    ============================================================================= 
-
-    A frame-aware version of the the IFLocationChangeHandler
-
-    See the comments in IFWebPageView above for more description about this protocol.
+   ============================================================================= 
 */
 @protocol IFLocationChangeHandler
 
-// This API will need to be extended to support some notion of the context in which
-// a location is changing, i.e. was it initiated by a user click, by a programmatic
-// manipulation of the DOM, is the frame an iframe, or a frame.
-
-// 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 forFrame: (IFWebFrame *)frame;
 
 - (void)locationChangeStartedForFrame: (IFWebFrame *)frame;
@@ -125,6 +63,8 @@
     
     The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
+
+   ============================================================================= 
 */
 @protocol  IFLoadHandler
 
@@ -148,6 +88,7 @@
     A class that implements IFScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
+   ============================================================================= 
 */
 @protocol IFScriptContextHandler
 
@@ -172,9 +113,7 @@
     and IFWebDataSource.  See each inherited protocol for a more complete
     description.
     
-    [Don and I both agree that all these little protocols are useful to cleanly
-     describe snippets of behavior, but do we explicity reference them anywhere,
-     or do we just use the umbrella protocol?]
+   ============================================================================= 
 */
 @protocol IFWebController <IFLoadHandler, IFScriptContextHandler, IFLocationChangeHandler>
 
@@ -183,9 +122,13 @@
 // specifics of creating and initializaing a view of the appropriate class.
 - (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
 
-// Look for a frame named name recursively.
+
+// Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
 
+
+// Return the top level frame.  Note that even document that are not framesets will have a
+// mainFrame.
 - (IFWebFrame *)mainFrame;
 
 
@@ -194,6 +137,12 @@
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 
+// Return the frame associated with the view.  Traverses the
+// frame tree to find the data source.  Typically aView is
+// an IFWebView.
+- (IFWebFrame *)frameForView: (NSView *)aView;
+
+
 @end
 
 
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 5d4659d..75fc4d6 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -21,62 +21,10 @@
     alternate views of the web pages described by IFWebDataSources.  For example, a web
     crawler may implement a IFWebController with no corresponding view.
     
-    IFDefaultWebController may be subclassed to modify the behavior of the standard
+    IFBaseWebController may be subclassed to modify the behavior of the standard
     IFWebView and IFWebDataSource.
 
    ============================================================================= 
-    
-    Changes: 
-    
-    2001-12-12
-        Changed IFConcreteWebController to IFDefaultWebController.
-        
-        Changed IFLocationChangedHandler naming, replace "loadingXXX" with
-        "locationChangeXXX".
-
-        Changed loadingStopped in IFLocationChangedHandler to locationChangeStopped:(IFError *).
-
-        Changed loadingCancelled in IFLocationChangedHandler to locationChangeCancelled:(IFError *).
-        
-        Changed loadedPageTitle in IFLocationChangedHandler to receivedPageTitle:.
-
-        Added inputURL:(NSURL *) resolvedTo: (NSURL *) to IFLocationChangedHandler.
-        
-        Added the following two methods to IFLocationChangedHandler:
-        
-            - (void)inputURL: (NSURL *)inputURL resolvedTo: (NSURL *)resolvedURL;
-            - (void)serverRedirectTo: (NSURL *)url;
-       
-        Put locationWillChangeTo: back on IFLocationChangedHandler.
-        
-        Changed XXXforLocation in IFLoadHandler to XXXforResource.
-        
-        Changed timeoutForLocation: in IFLoadHandler to receivedError:forResource:partialProgress:
-        
-        Added the following two methods to IFDefaultWebController:
-        
-            - setDirectsAllLinksToSystemBrowser: (BOOL)flag
-            - (BOOL)directsAllLinksToSystemBrowser;
-            
-        Removed IFError.  This will be described in IFError.h.
-  
-  2001-12-13
-  
-        Removed IFFrameSetHandler, placed that functionality on IFWebDataSource.
-        
-        Changed IFLocationChangeHandler to add a parameter specifying the data source
-        that sent the message.
-
-  2001-12-14
-
-        Removed inputURL:resolvedTo: methods, per discussion with Don.
-
-        Remove IFContextMenuHandler for want of a better way to describe the
-        not-yet-existing IFDOMNode.  We can't think of any initial clients that want
-        to override the default behavior anyway.  Put it in IFGrabBag.h for now.
-
-        Simplified IFLocationChangeHandler and updated
-	IFAuthenticationHandler to use interfaces instead of structs..
 */
 
 
@@ -85,23 +33,13 @@
 @class IFWebView;
 @class IFWebFrame;
 
+
 /*
    ============================================================================= 
-
-    A frame-aware version of the the IFLocationChangeHandler
-
-    See the comments in IFWebPageView above for more description about this protocol.
+   ============================================================================= 
 */
 @protocol IFLocationChangeHandler
 
-// This API will need to be extended to support some notion of the context in which
-// a location is changing, i.e. was it initiated by a user click, by a programmatic
-// manipulation of the DOM, is the frame an iframe, or a frame.
-
-// 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 forFrame: (IFWebFrame *)frame;
 
 - (void)locationChangeStartedForFrame: (IFWebFrame *)frame;
@@ -125,6 +63,8 @@
     
     The methods in this protocol will be called even if the data source
     is initialized with something other than a URL.
+
+   ============================================================================= 
 */
 @protocol  IFLoadHandler
 
@@ -148,6 +88,7 @@
     A class that implements IFScriptContextHandler provides all the state information
     that may be used by Javascript (AppleScript?).
     
+   ============================================================================= 
 */
 @protocol IFScriptContextHandler
 
@@ -172,9 +113,7 @@
     and IFWebDataSource.  See each inherited protocol for a more complete
     description.
     
-    [Don and I both agree that all these little protocols are useful to cleanly
-     describe snippets of behavior, but do we explicity reference them anywhere,
-     or do we just use the umbrella protocol?]
+   ============================================================================= 
 */
 @protocol IFWebController <IFLoadHandler, IFScriptContextHandler, IFLocationChangeHandler>
 
@@ -183,9 +122,13 @@
 // specifics of creating and initializaing a view of the appropriate class.
 - (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
 
-// Look for a frame named name recursively.
+
+// Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
 
+
+// Return the top level frame.  Note that even document that are not framesets will have a
+// mainFrame.
 - (IFWebFrame *)mainFrame;
 
 
@@ -194,6 +137,12 @@
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 
+// Return the frame associated with the view.  Traverses the
+// frame tree to find the data source.  Typically aView is
+// an IFWebView.
+- (IFWebFrame *)frameForView: (NSView *)aView;
+
+
 @end
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list