[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:56:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit dd7353ebba1fe480de2c90cb81ecfd5e988620cf
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 1 19:59:23 2002 +0000

            Fixed a potentially large leak in frames.  View associated w/
            frame was not being released.
    
            Added scaffolding for correct frame by frame load complete check.
    
            Moved private IFWebBaseController method implementations to
            IFWebBaseControllerPrivate.mm.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b08fa19..f2914c6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2002-03-01  Richard Williamson  <rjw at apple.com>
+
+        Fixed a potentially large leak in frames.  View associated w/
+        frame was not being released.
+        
+        Added scaffolding for correct frame by frame load complete check.
+        
+        Moved private IFWebBaseController method implementations to 
+        IFWebBaseControllerPrivate.mm.
+        
+	* WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+	createFrameNamed:for:inParent:]), (-[IFBaseWebController
+	receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	receivedError:forResource:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFBaseWebControllerPrivate.h:
+	* WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebControllerPrivate
+	dealloc]), (-[IFBaseWebController _changeLocationTo:forFrame:parent:]),
+	(-[IFBaseWebController _changeFrame:dataSource:]), (-[IFBaseWebController
+	_checkLoadCompleteForDataSource:]):
+	* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate init]):
+	* WebView.subproj/IFWebView.mm: (-[IFWebView dataSourceChanged:]):
+
 2002-02-27  Kenneth Kocienda  <kocienda at apple.com>
 
         I have changed the way that WebCore is glued to WebFoundation and WebKit. 
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b08fa19..f2914c6 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-03-01  Richard Williamson  <rjw at apple.com>
+
+        Fixed a potentially large leak in frames.  View associated w/
+        frame was not being released.
+        
+        Added scaffolding for correct frame by frame load complete check.
+        
+        Moved private IFWebBaseController method implementations to 
+        IFWebBaseControllerPrivate.mm.
+        
+	* WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+	createFrameNamed:for:inParent:]), (-[IFBaseWebController
+	receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	receivedError:forResource:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFBaseWebControllerPrivate.h:
+	* WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebControllerPrivate
+	dealloc]), (-[IFBaseWebController _changeLocationTo:forFrame:parent:]),
+	(-[IFBaseWebController _changeFrame:dataSource:]), (-[IFBaseWebController
+	_checkLoadCompleteForDataSource:]):
+	* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate init]):
+	* WebView.subproj/IFWebView.mm: (-[IFWebView dataSourceChanged:]):
+
 2002-02-27  Kenneth Kocienda  <kocienda at apple.com>
 
         I have changed the way that WebCore is glued to WebFoundation and WebKit. 
diff --git a/WebKit/WebView.subproj/IFBaseWebController.mm b/WebKit/WebView.subproj/IFBaseWebController.mm
index bfc148d..b478e05 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.mm
+++ b/WebKit/WebView.subproj/IFBaseWebController.mm
@@ -10,9 +10,7 @@
 #import <WebKit/IFWebFramePrivate.h>
 #import <WebKit/IFException.h>
 
-#include <KWQKHTMLPart.h>
 #include <WCLoadProgress.h>
-#include <rendering/render_frames.h>
 
 
 // IFObjectHolder holds objects as keys in dictionaries without
@@ -157,7 +155,7 @@ static id IFLoadProgressMake()
     IFWebFrame *newFrame;
     IFDynamicScrollBarsView *scrollView;
 
-    childView = [[IFWebView alloc] initWithFrame: NSMakeRect (0,0,0,0)];
+    childView = [[[IFWebView alloc] initWithFrame: NSMakeRect (0,0,0,0)] autorelease];
 
     newFrame = [[[IFWebFrame alloc] initWithName: fname view: childView dataSource: childDataSource controller: self] autorelease];
 
@@ -207,8 +205,6 @@ static id IFLoadProgressMake()
 
 
 
-
-
 // ---------------------------------------------------------------------
 // IFScriptContextHandler
 // ---------------------------------------------------------------------
@@ -240,14 +236,16 @@ static id IFLoadProgressMake()
 // ---------------------------------------------------------------------
 - (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
 {
-    // Do nothing.
+    // Check if the load is complete for this data source.
+    if (progress->bytesSoFar == progress->totalToLoad)
+        [self _checkLoadCompleteForDataSource: dataSource];
 }
 
 
 
 - (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
-    // FIXME?
+    [self _checkLoadCompleteForDataSource: dataSource];
 }
 
 
@@ -260,45 +258,6 @@ static id IFLoadProgressMake()
 }
 
 
-- (BOOL)_changeLocationTo: (NSURL *)url forFrame: (IFWebFrame *)frame parent: (IFWebDataSource *)parent
-{
-    if ([self locationWillChangeTo: url forFrame: frame]){
-        IFWebDataSource *dataSource = [[[IFWebDataSource alloc] initWithURL: url] autorelease];
-        
-        [dataSource _setParent: parent];
-        [self _changeFrame: frame dataSource: dataSource];
-        return YES;
-    }
-    return NO;
-}
-
-
-- (void)_changeFrame: (IFWebFrame *)frame dataSource: (IFWebDataSource *)newDataSource
-{
-    IFBaseWebControllerPrivate *data = ((IFBaseWebControllerPrivate *)_controllerPrivate);
-    IFWebDataSource *oldDataSource;
-
-    oldDataSource = [frame dataSource];
-    if (frame == data->mainFrame)
-        [newDataSource _setParent: nil];
-    else if (oldDataSource && oldDataSource != newDataSource)
-        [newDataSource _setParent: [oldDataSource parent]];
-            
-    [newDataSource _setController: self];
-    [frame _setDataSource: newDataSource];
-    
-    // dataSourceChanged: will reset the view and begin trying to
-    // display the new new datasource.
-    [[frame view] dataSourceChanged: newDataSource];
-
-    // This introduces a nasty dependency on the view.
-    khtml::RenderPart *renderPartFrame = [frame _renderFramePart];
-    id view = [frame view];
-    if (renderPartFrame && [view isKindOfClass: NSClassFromString(@"IFWebView")])
-        renderPartFrame->setWidget ([[frame view] _widget]);
-}
-
-
 - (void)locationChangeStartedForFrame: (IFWebFrame *)frame initiatedByUserEvent: (BOOL)flag;
 {
     // Do nothing.
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
index ed3bd30..08ac21a 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
@@ -17,4 +17,5 @@
 @interface IFBaseWebController (IFPrivate);
 - (BOOL)_changeLocationTo: (NSURL *)url forFrame: (IFWebFrame *)frame parent: (IFWebDataSource *)parent;
 - (void)_changeFrame: (IFWebFrame *)frame dataSource: (IFWebDataSource *)newDataSource;
+- (void)_checkLoadCompleteForDataSource: (IFWebDataSource *)dataSource;
 @end
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
index 0a3397b..2b37efd 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
@@ -3,8 +3,12 @@
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
 #import <WebKit/IFBaseWebControllerPrivate.h>
-#import <WebKit/IFWebDataSource.h>
-#import <WebKit/IFWebView.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebViewPrivate.h>
+#import <WebKit/IFWebFramePrivate.h>
+
+#include <KWQKHTMLPart.h>
+#include <rendering/render_frames.h>
 
 
 @implementation IFBaseWebControllerPrivate
@@ -23,3 +27,53 @@
 }
 
 @end
+
+
+ at implementation IFBaseWebController (IFPrivate)
+
+- (BOOL)_changeLocationTo: (NSURL *)url forFrame: (IFWebFrame *)frame parent: (IFWebDataSource *)parent
+{
+    if ([self locationWillChangeTo: url forFrame: frame]){
+        IFWebDataSource *dataSource = [[[IFWebDataSource alloc] initWithURL: url] autorelease];
+        
+        [dataSource _setParent: parent];
+        [self _changeFrame: frame dataSource: dataSource];
+        return YES;
+    }
+    return NO;
+}
+
+
+- (void)_changeFrame: (IFWebFrame *)frame dataSource: (IFWebDataSource *)newDataSource
+{
+    IFBaseWebControllerPrivate *data = ((IFBaseWebControllerPrivate *)_controllerPrivate);
+    IFWebDataSource *oldDataSource;
+
+    oldDataSource = [frame dataSource];
+    if (frame == data->mainFrame)
+        [newDataSource _setParent: nil];
+    else if (oldDataSource && oldDataSource != newDataSource)
+        [newDataSource _setParent: [oldDataSource parent]];
+            
+    [newDataSource _setController: self];
+    [frame _setDataSource: newDataSource];
+    
+    // dataSourceChanged: will reset the view and begin trying to
+    // display the new new datasource.
+    [[frame view] dataSourceChanged: newDataSource];
+
+    // This introduces a nasty dependency on the view.
+    khtml::RenderPart *renderPartFrame = [frame _renderFramePart];
+    id view = [frame view];
+    if (renderPartFrame && [view isKindOfClass: NSClassFromString(@"IFWebView")])
+        renderPartFrame->setWidget ([[frame view] _widget]);
+}
+
+- (void)_checkLoadCompleteForDataSource: (IFWebDataSource *)dataSource
+{
+    // Check that all handle clients have been removed,
+    // and that all descendent data sources are done
+    // loading.  Then call locationChangeDone:forFrame:
+}
+
+ at end
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index ebe542b..5f5c9b1 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -15,6 +15,7 @@
 
 - init
 {
+    // Unnecessary, but I like to know that these ivars should be nil.
     parent = nil;
     frames = nil;
     controller = nil;
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 1382946..01674dc 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -77,14 +77,18 @@
     
     data->widget->resize (r.size.width,r.size.height);
 
+    // Remove any remnants, i.e. form widgets, from the
+    // previous page.
     [self _resetView];
+    
+    // Force a layout.
     [self layout];
 }
 
 
 
 // This method should not be public until we have a more completely
-// understood way to subclass IFWebView.
+// understood how IFWebView will be subclassed.
 - (void)layout
 {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index ebe542b..5f5c9b1 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -15,6 +15,7 @@
 
 - init
 {
+    // Unnecessary, but I like to know that these ivars should be nil.
     parent = nil;
     frames = nil;
     controller = nil;
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 1382946..01674dc 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -77,14 +77,18 @@
     
     data->widget->resize (r.size.width,r.size.height);
 
+    // Remove any remnants, i.e. form widgets, from the
+    // previous page.
     [self _resetView];
+    
+    // Force a layout.
     [self layout];
 }
 
 
 
 // This method should not be public until we have a more completely
-// understood way to subclass IFWebView.
+// understood how IFWebView will be subclassed.
 - (void)layout
 {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list