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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:48:08 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5689a6a4ccbf297bb58e994a60745b7f5b55b69e
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 9 03:04:42 2002 +0000

    WebKit:
    
    	Make WebFrame do the entire frame hierarchy, instead of having the
    	parent and child pointers in the data source.
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge childFrames]): Get children from the frame, not the data source.
            (-[WebBridge setFrame:]): Do the setParent: call on the bridge here, instead of
    	in dataSourceChanged, since the parent relationship is now established even without
    	having the data source.
            (-[WebBridge dataSourceChanged]): Remove the setParent: call.
            (-[WebBridge loadRequest:]): Remove the parent parameter. It's already set up at
    	this point so we don't need to set it.
            (-[WebBridge loadURL:referrer:]): Don't pass a parent.
            (-[WebBridge postWithURL:referrer:data:contentType:]): Don't pass a parent.
            (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
    	Don't pass a parent.
    	(-[WebBridge addBackForwardItemWithURL:anchor:]): Get the parent frame by just calling
    	the parent method instead of the more roundabout way that it was doing it before.
    
            * WebView.subproj/WebController.m:
            (-[WebController _frameForDataSource:fromFrame:]): Get the children list from the frame,
    	no need to ask the data source. And no need to deal with the provisional data source, since
    	those can't have children any more.
            (-[WebController _frameForView:fromFrame:]): Ditto.
    
            * WebView.subproj/WebControllerPrivate.h: Change parent parameter when creating a new
    	frame to be a frame, not a data source.
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebControllerPrivate _clearControllerReferences:]): Get the children list from the frame.
            (-[WebControllerPrivate dealloc]): Rename the _reset method _controllerWillBeDeallocated
    	to be more concrete. More simplification can happen here later.
            (-[WebController createFrameNamed:for:inParent:allowsScrolling:]): Call _addChild on the
    	parent frame rather than calling addFrame on the parent data source.
    
            * WebView.subproj/WebDataSource.h: Remove the parent, children, frameNamed, frameNames, and
    	frameExists methods.
            * WebView.subproj/WebDataSource.m:
            (-[WebDataSource controller]): Remove the assertion here about parents, since we don't have
    	a parent pointer any more.
            (-[WebDataSource isLoading]): Get the list of children from the frame.
    
            * WebView.subproj/WebDataSourcePrivate.h: Remove the parent pointer and the frames dictionary,
    	also remove the _setParent: and addFrame: methods.
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSourcePrivate dealloc]): Don't release the frames list.
            (-[WebDataSource _recursiveStopLoading]): Get the frames list from the frame.
            (-[WebDataSource _layoutChildren]): Ditto.
            (-[WebDataSource _defersCallbacksChanged]): Ditto.
    
            * WebView.subproj/WebFrame.h: Add parent and children methods.
            * WebView.subproj/WebFrame.m:
            (-[WebFrame dealloc]): Call _detachFromParent.
            (-[WebFrame setProvisionalDataSource:]): Set the encoding of the data source to match
    	the encoding of the parent's data source. This used to be done in [WebDataSource _setParent:].
    	Further simplification can probably be done here.
            (-[WebFrame reload]): Remove the call to [WebDataSource _setParent:].
            (+[WebFrame _frameNamed:fromFrame:]): Get the children from the frame.
            (-[WebFrame frameNamed:]): Get the parent from the frame.
            (-[WebFrame parent]): Added.
            (-[WebFrame children]): Added.
    
            * WebView.subproj/WebFramePrivate.h: Added parent and children fields, changed reset to
    	_controllerWillBeDeallocated, changed _parentDataSourceWillBeDeallocated to _detachFromParent,
    	added _addChild method. Further simplification can probably be done here.
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFramePrivate dealloc]): Release the children array.
            (-[WebFrame _controllerWillBeDeallocated]): Renamed from reset. Now just calls _detachFromParent.
            (-[WebFrame _detachFromParent]): Does all the work that reset and _parentDataSourceWillBeDeallocated
    	used to do.
            (-[WebFrame _setDataSource:]): Call _detachFromParent on all the children and release them
    	before setting up the new data source.
            (-[WebFrame _transitionToCommitted]): Get the parent from self instead of the data source.
            (-[WebFrame _isLoadComplete]): Ditto.
            (+[WebFrame _recursiveCheckCompleteFromFrame:]): Get the children from self instead of the data source.
            (-[WebFrame _textSizeMultiplierChanged]): Ditto.
            (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]): Remove the call to [WebDataSource _setParent:].
            (-[WebFrame _addChild:]): Added. Puts the child in a children list, and also sets the override
    	encoding of the child based on our data source's override encoding.
    
    WebBrowser:
    
    	Update for the WebKit change that moved the children list to the frame
    	instead of the data source.
    
            * BrowserWebFrameExtras.h: Remove the parentFrame method, since
    	the parent method on WebFrame now does the same thing.
            * BrowserWebFrameExtras.m: (-[WebFrame _topFrame]): Use parent.
            * BrowserWebViewExtras.m: (-[WebView largestScrollableWebView]):
    	Call the children method on the frame now, not the data source.
            * LoadProgressMonitor.m:
            (-[LoadProgressMonitor _monitorProvisionalDataSourceForFrame:]):
    	Get the parent directly from the frame now, no need to go through the
    	data source.
            (-[LoadProgressMonitor titleChangedForFrame:]): Use the parent method,
    	not parentFrame.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bf021fd..6556325 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,4 +1,84 @@
- --2002-10-08  John Sullivan  <sullivan at apple.com>
+2002-10-08  Darin Adler  <darin at apple.com>
+
+	Make WebFrame do the entire frame hierarchy, instead of having the
+	parent and child pointers in the data source.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge childFrames]): Get children from the frame, not the data source.
+        (-[WebBridge setFrame:]): Do the setParent: call on the bridge here, instead of
+	in dataSourceChanged, since the parent relationship is now established even without
+	having the data source.
+        (-[WebBridge dataSourceChanged]): Remove the setParent: call.
+        (-[WebBridge loadRequest:]): Remove the parent parameter. It's already set up at
+	this point so we don't need to set it.
+        (-[WebBridge loadURL:referrer:]): Don't pass a parent.
+        (-[WebBridge postWithURL:referrer:data:contentType:]): Don't pass a parent.
+        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+	Don't pass a parent.
+	(-[WebBridge addBackForwardItemWithURL:anchor:]): Get the parent frame by just calling
+	the parent method instead of the more roundabout way that it was doing it before.
+
+        * WebView.subproj/WebController.m:
+        (-[WebController _frameForDataSource:fromFrame:]): Get the children list from the frame,
+	no need to ask the data source. And no need to deal with the provisional data source, since
+	those can't have children any more.
+        (-[WebController _frameForView:fromFrame:]): Ditto.
+
+        * WebView.subproj/WebControllerPrivate.h: Change parent parameter when creating a new
+	frame to be a frame, not a data source.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebControllerPrivate _clearControllerReferences:]): Get the children list from the frame.
+        (-[WebControllerPrivate dealloc]): Rename the _reset method _controllerWillBeDeallocated
+	to be more concrete. More simplification can happen here later.
+        (-[WebController createFrameNamed:for:inParent:allowsScrolling:]): Call _addChild on the
+	parent frame rather than calling addFrame on the parent data source.
+
+        * WebView.subproj/WebDataSource.h: Remove the parent, children, frameNamed, frameNames, and
+	frameExists methods.
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource controller]): Remove the assertion here about parents, since we don't have
+	a parent pointer any more.
+        (-[WebDataSource isLoading]): Get the list of children from the frame.
+
+        * WebView.subproj/WebDataSourcePrivate.h: Remove the parent pointer and the frames dictionary,
+	also remove the _setParent: and addFrame: methods.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]): Don't release the frames list.
+        (-[WebDataSource _recursiveStopLoading]): Get the frames list from the frame.
+        (-[WebDataSource _layoutChildren]): Ditto.
+        (-[WebDataSource _defersCallbacksChanged]): Ditto.
+
+        * WebView.subproj/WebFrame.h: Add parent and children methods.
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame dealloc]): Call _detachFromParent.
+        (-[WebFrame setProvisionalDataSource:]): Set the encoding of the data source to match
+	the encoding of the parent's data source. This used to be done in [WebDataSource _setParent:].
+	Further simplification can probably be done here.
+        (-[WebFrame reload]): Remove the call to [WebDataSource _setParent:].
+        (+[WebFrame _frameNamed:fromFrame:]): Get the children from the frame.
+        (-[WebFrame frameNamed:]): Get the parent from the frame.
+        (-[WebFrame parent]): Added.
+        (-[WebFrame children]): Added.
+
+        * WebView.subproj/WebFramePrivate.h: Added parent and children fields, changed reset to
+	_controllerWillBeDeallocated, changed _parentDataSourceWillBeDeallocated to _detachFromParent,
+	added _addChild method. Further simplification can probably be done here.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate dealloc]): Release the children array.
+        (-[WebFrame _controllerWillBeDeallocated]): Renamed from reset. Now just calls _detachFromParent.
+        (-[WebFrame _detachFromParent]): Does all the work that reset and _parentDataSourceWillBeDeallocated
+	used to do.
+        (-[WebFrame _setDataSource:]): Call _detachFromParent on all the children and release them
+	before setting up the new data source.
+        (-[WebFrame _transitionToCommitted]): Get the parent from self instead of the data source.
+        (-[WebFrame _isLoadComplete]): Ditto.
+        (+[WebFrame _recursiveCheckCompleteFromFrame:]): Get the children from self instead of the data source.
+        (-[WebFrame _textSizeMultiplierChanged]): Ditto.
+        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]): Remove the call to [WebDataSource _setParent:].
+        (-[WebFrame _addChild:]): Added. Puts the child in a children list, and also sets the override
+	encoding of the child based on our data source's override encoding.
+
+2002-10-08  John Sullivan  <sullivan at apple.com>
 
         * WebKit.pbproj/project.pbxproj:
 	Project Builder says I changed it only by setting
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index bf021fd..6556325 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,4 +1,84 @@
- --2002-10-08  John Sullivan  <sullivan at apple.com>
+2002-10-08  Darin Adler  <darin at apple.com>
+
+	Make WebFrame do the entire frame hierarchy, instead of having the
+	parent and child pointers in the data source.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge childFrames]): Get children from the frame, not the data source.
+        (-[WebBridge setFrame:]): Do the setParent: call on the bridge here, instead of
+	in dataSourceChanged, since the parent relationship is now established even without
+	having the data source.
+        (-[WebBridge dataSourceChanged]): Remove the setParent: call.
+        (-[WebBridge loadRequest:]): Remove the parent parameter. It's already set up at
+	this point so we don't need to set it.
+        (-[WebBridge loadURL:referrer:]): Don't pass a parent.
+        (-[WebBridge postWithURL:referrer:data:contentType:]): Don't pass a parent.
+        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+	Don't pass a parent.
+	(-[WebBridge addBackForwardItemWithURL:anchor:]): Get the parent frame by just calling
+	the parent method instead of the more roundabout way that it was doing it before.
+
+        * WebView.subproj/WebController.m:
+        (-[WebController _frameForDataSource:fromFrame:]): Get the children list from the frame,
+	no need to ask the data source. And no need to deal with the provisional data source, since
+	those can't have children any more.
+        (-[WebController _frameForView:fromFrame:]): Ditto.
+
+        * WebView.subproj/WebControllerPrivate.h: Change parent parameter when creating a new
+	frame to be a frame, not a data source.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebControllerPrivate _clearControllerReferences:]): Get the children list from the frame.
+        (-[WebControllerPrivate dealloc]): Rename the _reset method _controllerWillBeDeallocated
+	to be more concrete. More simplification can happen here later.
+        (-[WebController createFrameNamed:for:inParent:allowsScrolling:]): Call _addChild on the
+	parent frame rather than calling addFrame on the parent data source.
+
+        * WebView.subproj/WebDataSource.h: Remove the parent, children, frameNamed, frameNames, and
+	frameExists methods.
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource controller]): Remove the assertion here about parents, since we don't have
+	a parent pointer any more.
+        (-[WebDataSource isLoading]): Get the list of children from the frame.
+
+        * WebView.subproj/WebDataSourcePrivate.h: Remove the parent pointer and the frames dictionary,
+	also remove the _setParent: and addFrame: methods.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]): Don't release the frames list.
+        (-[WebDataSource _recursiveStopLoading]): Get the frames list from the frame.
+        (-[WebDataSource _layoutChildren]): Ditto.
+        (-[WebDataSource _defersCallbacksChanged]): Ditto.
+
+        * WebView.subproj/WebFrame.h: Add parent and children methods.
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame dealloc]): Call _detachFromParent.
+        (-[WebFrame setProvisionalDataSource:]): Set the encoding of the data source to match
+	the encoding of the parent's data source. This used to be done in [WebDataSource _setParent:].
+	Further simplification can probably be done here.
+        (-[WebFrame reload]): Remove the call to [WebDataSource _setParent:].
+        (+[WebFrame _frameNamed:fromFrame:]): Get the children from the frame.
+        (-[WebFrame frameNamed:]): Get the parent from the frame.
+        (-[WebFrame parent]): Added.
+        (-[WebFrame children]): Added.
+
+        * WebView.subproj/WebFramePrivate.h: Added parent and children fields, changed reset to
+	_controllerWillBeDeallocated, changed _parentDataSourceWillBeDeallocated to _detachFromParent,
+	added _addChild method. Further simplification can probably be done here.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate dealloc]): Release the children array.
+        (-[WebFrame _controllerWillBeDeallocated]): Renamed from reset. Now just calls _detachFromParent.
+        (-[WebFrame _detachFromParent]): Does all the work that reset and _parentDataSourceWillBeDeallocated
+	used to do.
+        (-[WebFrame _setDataSource:]): Call _detachFromParent on all the children and release them
+	before setting up the new data source.
+        (-[WebFrame _transitionToCommitted]): Get the parent from self instead of the data source.
+        (-[WebFrame _isLoadComplete]): Ditto.
+        (+[WebFrame _recursiveCheckCompleteFromFrame:]): Get the children from self instead of the data source.
+        (-[WebFrame _textSizeMultiplierChanged]): Ditto.
+        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]): Remove the call to [WebDataSource _setParent:].
+        (-[WebFrame _addChild:]): Added. Puts the child in a children list, and also sets the override
+	encoding of the child based on our data source's override encoding.
+
+2002-10-08  John Sullivan  <sullivan at apple.com>
 
         * WebKit.pbproj/project.pbxproj:
 	Project Builder says I changed it only by setting
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 81aadfa..d40c98d 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -49,7 +49,7 @@
 
 - (NSArray *)childFrames
 {
-    NSArray *frames = [[self dataSource] children];
+    NSArray *frames = [frame children];
     NSEnumerator *e = [frames objectEnumerator];
     NSMutableArray *frameBridges = [NSMutableArray arrayWithCapacity:[frames count]];
     WebFrame *childFrame;
@@ -207,6 +207,7 @@
     if (frame == nil) {
 	// FIXME: non-retained because data source owns representation owns bridge
 	frame = webFrame;
+        [self setParent:[[frame parent] _bridge]];
         [self setTextSizeMultiplier:[[frame controller] textSizeMultiplier]];
     } else {
 	ASSERT(frame == webFrame);
@@ -215,7 +216,6 @@
 
 - (void)dataSourceChanged
 {
-    [self setParent:[[[self dataSource] parent] _bridge]];
     [self openURL:[[self dataSource] URL]];
 }
 
@@ -252,10 +252,9 @@
     [[self dataSource] _setIconURL:URL withType:type];
 }
 
-- (void)loadRequest:(WebResourceRequest *)request withParent:(WebDataSource *)parent
+- (void)loadRequest:(WebResourceRequest *)request
 {
     WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
-    [newDataSource _setParent:parent];
     if ([frame setProvisionalDataSource:newDataSource]) {
         [frame startLoading];
     }
@@ -266,15 +265,7 @@
 {
     WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
     [request setReferrer:referrer];
-    [self loadRequest:request withParent:[[frame dataSource] parent]];
-    [request release];
-}
-
-- (void)loadURL:(NSURL *)URL referrer:(NSString *)referrer withParent:(WebDataSource *)parent
-{
-    WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
-    [request setReferrer:referrer];
-    [self loadRequest:request withParent:parent];
+    [self loadRequest:request];
     [request release];
 }
 
@@ -290,7 +281,7 @@
     [request setData:data];
     [request setContentType:contentType];
     [request setReferrer:referrer];
-    [self loadRequest:request withParent:[[frame dataSource] parent]];
+    [self loadRequest:request];
     [request release];
 }
 
@@ -300,7 +291,7 @@
     allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
 {
     ASSERT(frame != nil);
-    WebFrame *newFrame = [[frame controller] createFrameNamed:frameName for:nil inParent:[self dataSource] allowsScrolling:allowsScrolling];
+    WebFrame *newFrame = [[frame controller] createFrameNamed:frameName for:nil inParent:frame allowsScrolling:allowsScrolling];
     if (newFrame == nil) {
         return nil;
     }
@@ -310,7 +301,7 @@
     [[newFrame webView] _setMarginWidth:width];
     [[newFrame webView] _setMarginHeight:height];
     
-    [[newFrame _bridge] loadURL:URL referrer:referrer withParent:[self dataSource]];
+    [[newFrame _bridge] loadURL:URL referrer:referrer];
     
     // Set the load type so this load doesn't end up in the back
     // forward list.
@@ -353,10 +344,8 @@
 
 - (void)addBackForwardItemWithURL:(NSURL *)URL anchor:(NSString *)anchor;
 {
-    WebHistoryItem *backForwardItem;
-    WebFrame *parentFrame = [[frame controller] frameForDataSource:[[frame dataSource] parent]]; 
-
-    backForwardItem = [[WebHistoryItem alloc] initWithURL:URL target:[frame name] parent:[parentFrame name] title:[[frame dataSource] pageTitle]];
+    WebHistoryItem *backForwardItem = [[WebHistoryItem alloc] initWithURL:URL
+        target:[frame name] parent:[[frame parent] name] title:[[frame dataSource] pageTitle]];
     [backForwardItem setAnchor:anchor];
     [[[frame controller] backForwardList] addEntry:backForwardItem];
     [backForwardItem release];
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 06b90cb..b10de04 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -153,7 +153,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     if ([frame provisionalDataSource] == dataSource)
         return frame;
         
-    frames = [[frame dataSource] children];
+    frames = [frame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         aFrame = [frames objectAtIndex: i];
@@ -162,15 +162,6 @@ NSString *WebElementFrameKey = @"WebElementFrame";
             return result;
     }
 
-    frames = [[frame provisionalDataSource] children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-    
     return nil;       
 }
 
@@ -192,7 +183,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     if ([frame webView] == aView)
         return frame;
         
-    frames = [[frame dataSource] children];
+    frames = [frame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         aFrame = [frames objectAtIndex: i];
@@ -201,15 +192,6 @@ NSString *WebElementFrameKey = @"WebElementFrame";
             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;       
 }
 
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index b97f0b0..a3456f2 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -43,7 +43,7 @@
         Called when a data source needs to create a frame.  This method encapsulates the
         specifics of creating and initializing a view of the appropriate class.
 */    
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebDataSource *)parent allowsScrolling: (BOOL)allowsScrolling;
+- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling;
 
 
 - (id<WebContextMenuDelegate>)_defaultContextMenuDelegate;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 08effeb..11b620c 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -48,7 +48,7 @@
     [aFrame _setController: nil];
 
     // Walk the frame tree, niling the controller.
-    frames = [[aFrame dataSource] children];
+    frames = [aFrame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         nextFrame = [frames objectAtIndex: i];
@@ -59,8 +59,7 @@
 - (void)dealloc
 {
     [self _clearControllerReferences: mainFrame];
-
-    [mainFrame reset];
+    [mainFrame _controllerWillBeDeallocated];
     
     [mainFrame release];
     [backForwardList release];
@@ -79,7 +78,7 @@
 
 @implementation WebController (WebPrivate)
 
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebDataSource *)parentDataSource allowsScrolling: (BOOL)allowsScrolling
+- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling
 {
     WebView *childView;
     WebFrame *newFrame;
@@ -88,7 +87,7 @@
 
     newFrame = [[WebFrame alloc] initWithName: fname webView: childView provisionalDataSource: childDataSource controller: self];
 
-    [parentDataSource addFrame: newFrame];
+    [parent _addChild: newFrame];
     
     [newFrame release];
 
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 0044a93..af430bc 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -68,60 +68,12 @@
 - (id <WebDocumentRepresentation>)representation;
 
 /*!
-    @method parent
-    @result Returns nil if this data source represents the main document.  Otherwise
-    returns the parent data source.
-*/
-- (WebDataSource *)parent;
-
-/*!
     @method webFrame
     @result Return the frame that represents this data source.
 */
 - (WebFrame *)webFrame;
 
 /*!
-    @method children
-    @discussion The frames in the array are
-    associated with a frame set or iframe.
-    @result Returns an array of WebFrame.
-*/
-- (NSArray *)children;
-
-/*!
-    @method frameNamed:
-    @discussion Find the frame named frameName in this datasource's
-    children.  Does not recurse.
-    @param frameName The name of the frame to find.
-    @result Returns the frame named frameName, or nil.
-*/
-- (WebFrame *)frameNamed:(NSString *)frameName;
-
-/*!
-    @method frameNames
-    @discussion The NSStrings corresponds to
-    frame names.  If this data source is the main document and has no
-    frames then frameNames will return nil.
-    @result Returns an array of NSStrings or nil.
-*/
-- (NSArray *)frameNames;
-
-/*!
-    @method findDataSourceForFrameNamed:
-    @param name The name of the frame to find. Does not recurse.
-    @result Returns the child data source associated with
-    the frame named 'name', or nil. 
-*/
-- (WebDataSource *)findDataSourceForFrameNamed:(NSString *)name;
-
-/*!
-    @method frameExists:
-    @param name The name of the frame to check for existence.  Does not recurse.
-    @result Returns YES if a frame named name exists.
-*/
-- (BOOL)frameExists: (NSString *)name;
-
-/*!
     @method controller
     @result Returns the controller associated with this datasource.
 */
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index b40ed25..eab0ec4 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -91,57 +91,11 @@
     return [[self webFrame] name];    
 }
 
-// Returns nil if this data source represents the main document.  Otherwise
-// returns the parent data source.
-- (WebDataSource *)parent 
-{
-    return _private->parent;
-}
-
-
-// Returns an array of WebFrame.  The frames in the array are
-// associated with a frame set or iframe.
-- (NSArray *)children
-{
-    return [_private->frames allValues];
-}
-
-- (WebFrame *)frameNamed: (NSString *)frameName
-{
-    return (WebFrame *)[_private->frames objectForKey: frameName];
-}
-
-
-
-// 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
-{
-    return [_private->frames allKeys];
-}
-
-
-// findDataSourceForFrameNamed: returns the child data source associated with
-// the frame named 'name', or nil. 
-- (WebDataSource *) findDataSourceForFrameNamed: (NSString *)name
-{
-    return [[self frameNamed: name] dataSource];
-}
-
-
-- (BOOL)frameExists: (NSString *)name
-{
-    return [self frameNamed: name] == 0 ? NO : YES;
-}
-
-
 - (WebController *)controller
 {
     // All data sources used in a document share the same controller.
     // A single document may have many data sources corresponding to
     // frames or iframes.
-    ASSERT(_private->parent == nil || [_private->parent controller] == _private->controller);
     return _private->controller;
 }
 
@@ -202,7 +156,7 @@
     // Put in the auto-release pool because it's common to call this from a run loop source,
     // and then the entire list of frames lasts until the next autorelease.
     NSAutoreleasePool *pool = [NSAutoreleasePool new];
-    NSEnumerator *e = [[self children] objectEnumerator];
+    NSEnumerator *e = [[[self webFrame] children] objectEnumerator];
     WebFrame *childFrame;
     while ((childFrame = [e nextObject])) {
         if ([[childFrame dataSource] isLoading] || [[childFrame provisionalDataSource] isLoading]) {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 06b10d0..a4bdc31 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -26,8 +26,6 @@
 
     id <WebDocumentRepresentation> representation;
     
-    WebDataSource *parent;
-    
     WebController *controller;
     
     // The original URL as requested during initialization.
@@ -39,9 +37,6 @@
     // The original URL we may have been redirected to.
     NSURL *finalURL;
     
-    // Child frames of this frame.
-    NSMutableDictionary *frames;
-
     // Client for main resource, and corresponding handle.
     WebMainResourceClient *mainClient;
     WebResourceHandle *mainHandle;
@@ -88,7 +83,6 @@
 - (Class)_representationClass;
 - (void)_setRepresentation:(id<WebDocumentRepresentation>)representation;
 - (void)_setController:(WebController *)controller;
-- (void)_setParent:(WebDataSource *)p;
 - (void)_startLoading;
 - (void)_stopLoading;
 - (BOOL)_isStopping;
@@ -126,13 +120,4 @@
 
 - (void)_defersCallbacksChanged;
 
-/*!
-    @method addFrame:
-    @discussion Add a child frame.  This should only be called by the data source's controller
-    as a result of a createFrame:inParent:.
-    // [Should this be private?]
-*/
-- (void)addFrame: (WebFrame *)frame;
-
-
 @end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 4b5a03c..b6b140d 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -45,18 +45,11 @@
     // retained while loading, so no need to release here
     ASSERT(!loading);
     
-    NSEnumerator *e = [[frames allValues] objectEnumerator];
-    WebFrame *frame;
-    while ((frame = [e nextObject])) {
-        [frame _parentDataSourceWillBeDeallocated];
-    }
-    
     [resourceData release];
     [representation release];
     [inputURL release];
     [request release];
     [finalURL release];
-    [frames release];
     [mainClient release];
     [mainHandle release];
     [subresourceClients release];
@@ -126,17 +119,6 @@
     [self _defersCallbacksChanged];
 }
 
-- (void)_setParent: (WebDataSource *)p
-{
-    // Non-retained.
-    _private->parent = p;
-    
-    // Inherit the override encoding setting from the parent.
-    if (p) {
-        _private->overrideEncoding = p->_private->overrideEncoding;
-    }
-}
-
 - (void)_setPrimaryLoadComplete: (BOOL)flag
 {
     _private->primaryLoadComplete = flag;
@@ -240,7 +222,7 @@
 {
     [self retain];
     [self _stopLoading];
-    [[self children] makeObjectsPerformSelector:@selector(stopLoading)];
+    [[[self webFrame] children] makeObjectsPerformSelector:@selector(stopLoading)];
     [self release];
 }
 
@@ -355,8 +337,8 @@
 
 - (void)_layoutChildren
 {
-    if ([[self children] count] > 0){
-        NSArray *subFrames = [self children];
+    NSArray *subFrames = [[self webFrame] children];
+    if ([subFrames count]) {
         WebFrame *subFrame;
         unsigned int i;
         id dview;
@@ -524,19 +506,7 @@
         [[client handle] _setDefersCallbacks:defers];
     }
 
-    [[self children] makeObjectsPerformSelector:@selector(_defersCallbacksChanged)];
-}
-
-- (void)addFrame: (WebFrame *)frame
-{
-    if (_private->frames == nil)
-        _private->frames = [[NSMutableDictionary alloc] init];
-
-    // Check to make sure a duplicate frame name didn't creep in.
-    ASSERT([_private->frames objectForKey:[frame name]] == nil);
-
-    [[frame dataSource] _setParent: self];   
-    [_private->frames setObject: frame forKey: [frame name]];    
+    [[[self webFrame] children] makeObjectsPerformSelector:@selector(_defersCallbacksChanged)];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrame.h b/WebKit/WebView.subproj/WebFrame.h
index b0ed39d..14f7472 100644
--- a/WebKit/WebView.subproj/WebFrame.h
+++ b/WebKit/WebView.subproj/WebFrame.h
@@ -108,7 +108,7 @@
 /*!
     @method stopLoading
     @discussion Stop any pending loads on the frame's data source,
-    and it's children.
+    and its children.
 */
 - (void)stopLoading;
 
@@ -129,4 +129,17 @@
 */
 - (WebFrame *)frameNamed:(NSString *)name;
 
+/*!
+    @method parent
+    @result The frame containing this frame, or nil if this is a top level frame.
+*/
+- (WebFrame *)parent;
+
+/*!
+    @method children
+    @discussion The frames in the array are associated with a frame set or iframe.
+    @result Returns an array of WebFrame.
+*/
+- (NSArray *)children;
+
 @end
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index ac7b204..1094e0d 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -60,7 +60,8 @@
 - (void)dealloc
 {
     --WebFrameCount;
-    
+
+    [self _detachFromParent];
     [_private release];
     [super dealloc];
 }
@@ -70,8 +71,7 @@
     return [_private name];
 }
 
-
-- (void)setWebView: (WebView *)v
+- (void)setWebView:(WebView *)v
 {
     [_private setWebView: v];
     [v _setController: [self controller]];
@@ -110,9 +110,6 @@
 //    disallows by returning a WebURLPolicyIgnore.
 - (BOOL)setProvisionalDataSource: (WebDataSource *)newDataSource
 {
-    id <WebLocationChangeDelegate>locationChangeDelegate;
-    WebDataSource *oldDataSource;
-    
     ASSERT([self controller] != nil);
 
     // Unfortunately the view must be non-nil, this is ultimately due
@@ -131,7 +128,8 @@
             [entry setScrollPoint: point];
         }
     }
-    if ([self _state] != WebFrameStateComplete){
+
+    if ([self _state] != WebFrameStateComplete) {
         [self stopLoading];
     }
 
@@ -139,42 +137,31 @@
 
     // _shouldShowURL asks the client for the URL policies and reports errors if there are any
     // returns YES if we should show the data source
-    if([self _shouldShowURL:[newDataSource URL]]){
-        
-        locationChangeDelegate = [[self controller] locationChangeDelegate];
-        
-        oldDataSource = [self dataSource];
-        
-        // Is this the top frame?  If so set the data source's parent to nil.
-        if (self == [[self controller] mainFrame])
-            [newDataSource _setParent: nil];
-            
-        // Otherwise set the new data source's parent to the old data source's parent.
-        else if (oldDataSource && oldDataSource != newDataSource)
-            [newDataSource _setParent: [oldDataSource parent]];
-                
-        [newDataSource _setController: [self controller]];
-        
-        [_private setProvisionalDataSource: newDataSource];
-        
-        ASSERT([newDataSource webFrame] == self);
-        
-        // We tell the documentView provisionalDataSourceChanged:
-        // once it has been created by the controller.
-            
-        [self _setState: WebFrameStateProvisional];
-        
-        return YES;
+    if (![self _shouldShowURL:[newDataSource URL]]) {
+        return NO;
     }
     
-    return NO;
+    if ([self parent]) {
+        [newDataSource _setOverrideEncoding:[[[self parent] dataSource] _overrideEncoding]];
+    }
+    [newDataSource _setController:[self controller]];
+    [_private setProvisionalDataSource:newDataSource];
+    
+    ASSERT([newDataSource webFrame] == self);
+    
+    // We tell the documentView provisionalDataSourceChanged:
+    // once it has been created by the controller.
+    
+    [self _setState: WebFrameStateProvisional];
+    
+    return YES;
 }
 
 
 - (void)startLoading
 {
     if (self == [[self controller] mainFrame])
-        LOG(DocumentLoad, "loading %s", [[[[[self provisionalDataSource] request] URL] absoluteString] cString]);
+        LOG(DocumentLoad, "loading %@", [[[self provisionalDataSource] request] URL]);
 
     [_private->provisionalDataSource startLoading];
 }
@@ -201,7 +188,6 @@
     WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
     [request release];
     
-    [newDataSource _setParent:[dataSource parent]];
     [newDataSource _setOverrideEncoding:[dataSource _overrideEncoding]];
     
     if ([self setProvisionalDataSource:newDataSource]) {
@@ -222,7 +208,7 @@
     if ([[aFrame name] isEqualToString: name])
         return aFrame;
 
-    children = [[aFrame dataSource] children];
+    children = [aFrame children];
     count = [children count];
     for (i = 0; i < count; i++){
         aFrame = [children objectAtIndex: i];
@@ -241,33 +227,37 @@
 - (WebFrame *)frameNamed:(NSString *)name
 {
     // First, deal with 'special' names.
-    if([name isEqualToString:@"_self"] || [name isEqualToString:@"_current"]){
+    if ([name isEqualToString:@"_self"] || [name isEqualToString:@"_current"]){
         return self;
     }
     
-    else if([name isEqualToString:@"_top"]) {
+    if ([name isEqualToString:@"_top"]) {
         return [[self controller] mainFrame];
     }
     
-    else if([name isEqualToString:@"_parent"]){
-        WebDataSource *parent = [[self dataSource] parent];
-        if(parent){
-            return [parent webFrame];
-        }
-        else{
-            return self;
-        }
+    if ([name isEqualToString:@"_parent"]) {
+        WebFrame *parent = [self parent];
+        return parent ? parent : self;
     }
     
-    else if ([name isEqualToString:@"_blank"]){
+    if ([name isEqualToString:@"_blank"]) {
         WebController *newController = [[[self controller] windowOperationsDelegate] openNewWindowWithURL:nil referrer:nil behind:NO];
 	[[[[newController windowOperationsDelegate] window] windowController] showWindow:nil];
-
         return [newController mainFrame];
     }
     
-    // Now search the namespace associated with this frame's controller.
-    return [WebFrame _frameNamed: name fromFrame: [[self controller] mainFrame]];
+    // Now search the name space associated with this frame's controller.
+    return [WebFrame _frameNamed:name fromFrame:[[self controller] mainFrame]];
+}
+
+- (WebFrame *)parent
+{
+    return [[_private->parent retain] autorelease];
+}
+
+- (NSArray *)children
+{
+    return [[_private->children copy] autorelease];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 6301ae6..eabf826 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -55,34 +55,30 @@ typedef enum {
     WebFrameState state;
     NSTimer *scheduledLayoutTimer;
     WebFrameLoadType loadType;
+    WebFrame *parent;
+    NSMutableArray *children;
 }
 
-- (void)setName: (NSString *)n;
+- (void)setName:(NSString *)name;
 - (NSString *)name;
-- (void)setController: (WebController *)c;
+- (void)setController:(WebController *)c;
 - (WebController *)controller;
-- (void)setWebView: (WebView *)v;
+- (void)setWebView:(WebView *)v;
 - (WebView *)webView;
-- (void)setDataSource: (WebDataSource *)d;
+- (void)setDataSource:(WebDataSource *)d;
 - (WebDataSource *)dataSource;
-- (void)setProvisionalDataSource: (WebDataSource *)d;
+- (void)setProvisionalDataSource:(WebDataSource *)d;
 - (WebDataSource *)provisionalDataSource;
 - (WebFrameLoadType)loadType;
-- (void)setLoadType: (WebFrameLoadType)loadType;
+- (void)setLoadType:(WebFrameLoadType)loadType;
 
 @end
 
 @interface WebFrame (WebPrivate)
 
-/*!
-    @method reset
-    @discussioin This method removes references the underlying resources.
-    FIXME:  I think this should be private.
-*/
-- (void)reset;
-
+- (void)_controllerWillBeDeallocated;
+- (void)_detachFromParent;
 
-- (void)_parentDataSourceWillBeDeallocated;
 - (void)_setController: (WebController *)controller;
 - (void)_setDataSource: (WebDataSource *)d;
 - (void)_transitionToCommitted;
@@ -107,4 +103,6 @@ typedef enum {
 
 - (void)_reloadAllowingStaleDataWithOverrideEncoding:(NSString *)encoding;
 
+- (void)_addChild:(WebFrame *)child;
+
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 6149417..42fb6f9 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -58,15 +58,16 @@ static const char * const stateNames[] = {
     [scheduledLayoutTimer invalidate];
     [scheduledLayoutTimer release];
     
-    [webView _setController: nil];
-    [dataSource _setController: nil];
-    [provisionalDataSource _setController: nil];
+    [webView _setController:nil];
+    [dataSource _setController:nil];
+    [provisionalDataSource _setController:nil];
 
     [bridge release];
     [name release];
     [webView release];
     [dataSource release];
     [provisionalDataSource release];
+    [children release];
     
     [super dealloc];
 }
@@ -120,8 +121,20 @@ static const char * const stateNames[] = {
 
 @implementation WebFrame (WebPrivate)
 
-- (void)reset
+- (void)_controllerWillBeDeallocated
 {
+    [self _detachFromParent];
+}
+
+- (void)_detachFromParent
+{
+    [[self children] makeObjectsPerformSelector:@selector(_detachFromParent)];
+    
+    [_private setController:nil];
+    [_private->webView _setController:nil];
+    [_private->dataSource _setController:nil];
+    [_private->provisionalDataSource _setController:nil];
+
     [_private setDataSource:nil];
     [_private setWebView:nil];
 
@@ -130,27 +143,25 @@ static const char * const stateNames[] = {
     _private->scheduledLayoutTimer = nil;
 }
 
-
-- (void)_parentDataSourceWillBeDeallocated
-{
-    [_private setController:nil];
-    [_private->dataSource _setParent:nil];
-    [_private->provisionalDataSource _setParent:nil];
-}
-
 - (void)_setController: (WebController *)controller
 {
-    [_private setController: controller];
+    [_private setController:controller];
 }
 
-- (void)_setDataSource: (WebDataSource *)ds
+- (void)_setDataSource:(WebDataSource *)ds
 {
+    ASSERT(ds != _private->dataSource);
+    
     if ([_private->dataSource isDocumentHTML] && ![ds isDocumentHTML]) {
         [[self _bridge] removeFromFrame];
     }
 
-    [_private setDataSource: ds];
-    [ds _setController: [self controller]];
+    [[self children] makeObjectsPerformSelector:@selector(_detachFromParent)];
+    [_private->children release];
+    _private->children = nil;
+    
+    [_private setDataSource:ds];
+    [ds _setController:[self controller]];
 }
 
 - (void)_setLoadType: (WebFrameLoadType)t
@@ -158,7 +169,6 @@ static const char * const stateNames[] = {
     [_private setLoadType: t];
 }
 
-
 - (WebFrameLoadType)_loadType
 {
     return [_private loadType];
@@ -279,11 +289,9 @@ static const char * const stateNames[] = {
 	    ASSERT(documentView != nil);
 
             // Set the committed data source on the frame.
-            [self _setDataSource: _private->provisionalDataSource];
-
-            // Now that the provisional data source is committed, release it.
+            [self _setDataSource:_private->provisionalDataSource];
             [_private setProvisionalDataSource: nil];
-        
+
             [self _setState: WebFrameStateCommittedPage];
         
             // Handle adding the URL to the back/forward list.
@@ -317,7 +325,7 @@ static const char * const stateNames[] = {
                         [entry setTitle: ptitle];
                 
                     // Add item to back/forward list.
-                    parentFrame = [[self controller] frameForDataSource: [[self dataSource] parent]]; 
+                    parentFrame = [self parent]; 
                     backForwardItem = [[WebHistoryItem alloc] initWithURL:[[[self dataSource] request] URL]
                                                                    target:[self name]
                                                                    parent:[parentFrame name]
@@ -450,9 +458,9 @@ static const char * const stateNames[] = {
                 // Unfortunately we have to get our parent to adjust the frames in this
                 // frameset so this frame's geometry is set correctly.  This should
                 // be a reasonably inexpensive operation.
-                id parentDS = [[[ds parent] webFrame] dataSource];
+                id parentDS = [[self parent] dataSource];
                 if ([[parentDS _bridge] isFrameSet]){
-                    id parentWebView = [[[ds parent] webFrame] webView];
+                    id parentWebView = [[self parent] webView];
                     if ([parentWebView isDocumentHTML])
                         [[parentWebView documentView] _adjustFrames];
                 }
@@ -545,7 +553,7 @@ static const char * const stateNames[] = {
     int i, count;
     NSArray *childFrames;
     
-    childFrames = [[fromFrame dataSource] children];
+    childFrames = [fromFrame children];
     count = [childFrames count];
     for (i = 0; i < count; i++) {
         WebFrame *childFrame;
@@ -745,7 +753,7 @@ static const char * const stateNames[] = {
 - (void)_textSizeMultiplierChanged
 {
     [[self _bridge] setTextSizeMultiplier:[[self controller] textSizeMultiplier]];
-    [[[self dataSource] children] makeObjectsPerformSelector:@selector(_textSizeMultiplierChanged)];
+    [[self children] makeObjectsPerformSelector:@selector(_textSizeMultiplierChanged)];
 }
 
 - (void)_defersCallbacksChanged
@@ -766,7 +774,6 @@ static const char * const stateNames[] = {
     WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
     [request release];
     
-    [newDataSource _setParent:[dataSource parent]];
     [newDataSource _setOverrideEncoding:encoding];
     
     if ([self setProvisionalDataSource:newDataSource]) {
@@ -777,4 +784,14 @@ static const char * const stateNames[] = {
     [newDataSource release];
 }
 
+- (void)_addChild:(WebFrame *)child
+{
+    if (_private->children == nil)
+        _private->children = [[NSMutableArray alloc] init];
+    [_private->children addObject:child];
+
+    child->_private->parent = self;
+    [[child dataSource] _setOverrideEncoding:[[self dataSource] _overrideEncoding]];   
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 06b90cb..b10de04 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -153,7 +153,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     if ([frame provisionalDataSource] == dataSource)
         return frame;
         
-    frames = [[frame dataSource] children];
+    frames = [frame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         aFrame = [frames objectAtIndex: i];
@@ -162,15 +162,6 @@ NSString *WebElementFrameKey = @"WebElementFrame";
             return result;
     }
 
-    frames = [[frame provisionalDataSource] children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-    
     return nil;       
 }
 
@@ -192,7 +183,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     if ([frame webView] == aView)
         return frame;
         
-    frames = [[frame dataSource] children];
+    frames = [frame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         aFrame = [frames objectAtIndex: i];
@@ -201,15 +192,6 @@ NSString *WebElementFrameKey = @"WebElementFrame";
             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;       
 }
 
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index b97f0b0..a3456f2 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -43,7 +43,7 @@
         Called when a data source needs to create a frame.  This method encapsulates the
         specifics of creating and initializing a view of the appropriate class.
 */    
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebDataSource *)parent allowsScrolling: (BOOL)allowsScrolling;
+- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling;
 
 
 - (id<WebContextMenuDelegate>)_defaultContextMenuDelegate;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 08effeb..11b620c 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -48,7 +48,7 @@
     [aFrame _setController: nil];
 
     // Walk the frame tree, niling the controller.
-    frames = [[aFrame dataSource] children];
+    frames = [aFrame children];
     count = [frames count];
     for (i = 0; i < count; i++){
         nextFrame = [frames objectAtIndex: i];
@@ -59,8 +59,7 @@
 - (void)dealloc
 {
     [self _clearControllerReferences: mainFrame];
-
-    [mainFrame reset];
+    [mainFrame _controllerWillBeDeallocated];
     
     [mainFrame release];
     [backForwardList release];
@@ -79,7 +78,7 @@
 
 @implementation WebController (WebPrivate)
 
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebDataSource *)parentDataSource allowsScrolling: (BOOL)allowsScrolling
+- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling
 {
     WebView *childView;
     WebFrame *newFrame;
@@ -88,7 +87,7 @@
 
     newFrame = [[WebFrame alloc] initWithName: fname webView: childView provisionalDataSource: childDataSource controller: self];
 
-    [parentDataSource addFrame: newFrame];
+    [parent _addChild: newFrame];
     
     [newFrame release];
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list