[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:03 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1090d08a932048f89f0cf00f014a101f21689e31
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 22 02:40:19 2002 +0000
Stop supprt.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index da814cf..dbc60b7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-02-21 Richard Williamson <rjw at apple.com>
+
+ Sop mostly working.
+
+ * WebView.subproj/IFBaseWebController.h:
+ * WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+ _frameForDataSource:fromFrame:]), (-[IFBaseWebController frameForDataSource:]):
+ * WebView.subproj/IFWebController.h:
+ * WebView.subproj/IFWebDataSource.h:
+ * WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource frame]),
+ (-[IFWebDataSource frameName]), (-[IFWebDataSource stopLoading]):
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate dealloc]),
+ (-[IFWebDataSource _addURLHandle:]), (-[IFWebDataSource _removeURLHandle:]),
+ (-[IFWebDataSource _stopLoading]), (-[IFWebDataSource
+ _recursiveStopLoadingfromDataSource:]):
+ * WebView.subproj/IFWebFrame.mm: (-[IFWebFrame setDataSource:]):
+
2002-02-20 Richard Williamson <rjw at apple.com>
Some groundwork to bring WebFoundation callbacks up to
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index da814cf..dbc60b7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-02-21 Richard Williamson <rjw at apple.com>
+
+ Sop mostly working.
+
+ * WebView.subproj/IFBaseWebController.h:
+ * WebView.subproj/IFBaseWebController.mm: (-[IFBaseWebController
+ _frameForDataSource:fromFrame:]), (-[IFBaseWebController frameForDataSource:]):
+ * WebView.subproj/IFWebController.h:
+ * WebView.subproj/IFWebDataSource.h:
+ * WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource frame]),
+ (-[IFWebDataSource frameName]), (-[IFWebDataSource stopLoading]):
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate dealloc]),
+ (-[IFWebDataSource _addURLHandle:]), (-[IFWebDataSource _removeURLHandle:]),
+ (-[IFWebDataSource _stopLoading]), (-[IFWebDataSource
+ _recursiveStopLoadingfromDataSource:]):
+ * WebView.subproj/IFWebFrame.mm: (-[IFWebFrame setDataSource:]):
+
2002-02-20 Richard Williamson <rjw at apple.com>
Some groundwork to bring WebFoundation callbacks up to
diff --git a/WebKit/Plugins.subproj/IFPluginView.h b/WebKit/Plugins.subproj/IFPluginView.h
index d37d5e8..b0d27e4 100644
--- a/WebKit/Plugins.subproj/IFPluginView.h
+++ b/WebKit/Plugins.subproj/IFPluginView.h
@@ -4,7 +4,6 @@
*/
#import <AppKit/AppKit.h>
-#import <IFCarbonWindowView.h>
#import <WCPlugin.h>
#include <qwidget.h>
#include <npapi.h>
diff --git a/WebKit/Plugins.subproj/WebPluginView.h b/WebKit/Plugins.subproj/WebPluginView.h
index d37d5e8..b0d27e4 100644
--- a/WebKit/Plugins.subproj/WebPluginView.h
+++ b/WebKit/Plugins.subproj/WebPluginView.h
@@ -4,7 +4,6 @@
*/
#import <AppKit/AppKit.h>
-#import <IFCarbonWindowView.h>
#import <WCPlugin.h>
#include <qwidget.h>
#include <npapi.h>
diff --git a/WebKit/WebView.subproj/IFBaseWebController.h b/WebKit/WebView.subproj/IFBaseWebController.h
index 7cde8c7..73036dc 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.h
+++ b/WebKit/WebView.subproj/IFBaseWebController.h
@@ -44,6 +44,4 @@
- (IFWebDataSource *)mainDataSource;
-- (IFWebFrame *)mainFrame;
-
@end
diff --git a/WebKit/WebView.subproj/IFBaseWebController.mm b/WebKit/WebView.subproj/IFBaseWebController.mm
index a19c848..5798285 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.mm
+++ b/WebKit/WebView.subproj/IFBaseWebController.mm
@@ -322,5 +322,34 @@
[NSException raise:IFMethodNotYetImplemented format:@"IFBaseWebController::serverRedirectTo:forDataSource: is not implemented"];
}
+- (IFWebFrame *)_frameForDataSource: (IFWebDataSource *)dataSource fromFrame: (IFWebFrame *)frame
+{
+ NSArray *frames;
+ int i, count;
+ IFWebFrame *result;
+
+ if ([frame dataSource] == dataSource)
+ return frame;
+
+ frames = [[frame dataSource] children];
+ count = [frames count];
+ for (i = 0; i < count; i++){
+ frame = [frames objectAtIndex: i];
+ result = [self _frameForDataSource: dataSource fromFrame: frame];
+ if (result)
+ return result;
+ }
+ return nil;
+}
+
+
+- (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource
+{
+ IFWebFrame *frame = [self mainFrame];
+
+ return [self _frameForDataSource: dataSource fromFrame: frame];
+}
+
+
@end
diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index 80bbb54..a66af3b 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -124,7 +124,8 @@
typedef enum {
IF_LOAD_TYPE_CSS = 1,
IF_LOAD_TYPE_IMAGE = 2,
- IF_LOAD_TYPE_SCRIPT = 3
+ IF_LOAD_TYPE_SCRIPT = 3,
+ IF_LOAD_TYPE_HTML = 4
} IF_LOAD_TYPE;
@@ -255,6 +256,14 @@ typedef enum {
// specifics of creating and initializaing a view of the appropriate class.
- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent;
+- (IFWebFrame *)mainFrame;
+
+
+// Return the frame associated with the data source. Traverses the
+// frame tree to find the data source.
+- (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
+
+
@end
diff --git a/WebKit/WebView.subproj/IFWebDataSource.h b/WebKit/WebView.subproj/IFWebDataSource.h
index 51bcf82..287276e 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.h
+++ b/WebKit/WebView.subproj/IFWebDataSource.h
@@ -100,7 +100,7 @@
// Set the frame that represents this data source.
-- (void)setFrame: (IFWebFrame *)f;
+//- (void)setFrame: (IFWebFrame *)f;
// Return the frame that represents this data source.
diff --git a/WebKit/WebView.subproj/IFWebDataSource.mm b/WebKit/WebView.subproj/IFWebDataSource.mm
index b5f5278..6eebb03 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.mm
+++ b/WebKit/WebView.subproj/IFWebDataSource.mm
@@ -61,28 +61,10 @@
- initWithLoader: (IFLoader *)loader;
#endif
-
-- (void)setFrame: (IFWebFrame *)f
-{
- // FIXME! Remove. This back pointer isn't necessary and introduces a
- // messy cycle between IFWebFrame and IFWebDataSource.
- if (((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame == f)
- return;
-
- [((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame autorelease];
-
- ((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame = [f retain];
-
- [f setDataSource: self];
-}
-
-
- (IFWebFrame *)frame
{
- // FIXME! Implement traversing the frame tree, starting with
- // the main frame. That will remove messy frame<->datasource
- // cycle.
- return ((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame;
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ return [data->controller frameForDataSource: self];
}
@@ -90,7 +72,7 @@
// if the data source is not in a frame set.
- (NSString *)frameName
{
- return [((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame name];
+ return [[self frame] name];
}
@@ -227,11 +209,12 @@
// Cancels any pending loads. A data source is conceptually only ever loading
// one document at a time, although one document may have many related
-// resources. stopLoading will stop all loads related to the data source.
+// resources. stopLoading will stop all loads related to the data source. This
+// method will also stop loads that may be loading in child frames.
// Returns NO if the data source is not currently loading.
- (void)stopLoading
{
- [self _part]->closeURL ();
+ [self _recursiveStopLoading];
}
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index 5f424d2..1b13065 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -7,6 +7,8 @@
*/
#import <Cocoa/Cocoa.h>
+#import <WebFoundation/IFURLHandle.h>
+
#import <WebKit/IFWebDataSource.h>
// includes from kde
@@ -19,9 +21,12 @@
id <IFWebController>controller;
NSURL *inputURL;
KHTMLPart *part;
- IFWebFrame *frame;
+
// Child frames of this frame.
NSMutableDictionary *frames;
+
+ // Active IFURLHandles.
+ NSMutableArray *urlHandles;
}
- init;
@@ -34,4 +39,9 @@
- (KHTMLPart *)_part;
- (void)_setParent: (IFWebDataSource *)p;
- (void)_startLoading: (BOOL)forceRefresh initiatedByUserEvent: (BOOL)flag;
+
+- (void)_stopLoading;
+- (void)_recursiveStopLoading;
+- (void)_addURLHandle: (IFURLHandle *)handle;
+- (void)_removeURLHandle: (IFURLHandle *)handle;
@end
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 2f8019a..0ab3c3d 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -7,6 +7,7 @@
*/
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFException.h>
+#import <WebKit/WebKitDebug.h>
@@ -31,8 +32,8 @@
// a reference to their view and main data source.
[parent release];
[frames release];
- [frame release];
[inputURL release];
+ [urlHandles release];
delete part;
@@ -70,4 +71,60 @@
[[self controller] locationChangeStartedForFrame: [self frame] initiatedByUserEvent: byUserEvent];
}
+
+- (void)_addURLHandle: (IFURLHandle *)handle
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ if (data->urlHandles == nil)
+ data->urlHandles = [[NSMutableArray alloc] init];
+ [data->urlHandles addObject: handle];
+}
+
+- (void)_removeURLHandle: (IFURLHandle *)handle
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ [data->urlHandles removeObject: handle];
+}
+
+- (void)_stopLoading
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ int i, count;
+ IFURLHandle *handle;
+
+ // Tell all handles to stop loading.
+ count = [data->urlHandles count];
+ for (i = 0; i < count; i++) {
+ handle = [data->urlHandles objectAtIndex: i];
+ WEBKITDEBUGLEVEL1 (0x2000, "canceling %s\n", [[[handle url] absoluteString] cString] );
+ [[data->urlHandles objectAtIndex: i] cancelLoadInBackground];
+ }
+
+ [self _part]->closeURL ();
+}
+
+
+- (void)_recursiveStopLoading
+{
+ NSArray *frames;
+ IFWebFrame *nextFrame;
+ int i, count;
+ IFWebDataSource *childDataSource, *childProvisionalDataSource;
+
+ [self _stopLoading];
+
+ frames = [self children];
+ count = [frames count];
+ for (i = 0; i < count; i++){
+ nextFrame = [frames objectAtIndex: i];
+ childDataSource = [nextFrame dataSource];
+ [childDataSource _recursiveStopLoading];
+ childProvisionalDataSource = [nextFrame provisionalDataSource];
+ [childProvisionalDataSource _recursiveStopLoading];
+ }
+}
+
+
@end
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index b5fb5c9..4b157b5 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -73,7 +73,7 @@
return;
[data setDataSource: ds];
- [[data dataSource] setFrame: self];
+ //[[data dataSource] setFrame: self];
}
// Required to break retain cycle between frame and data source,
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 80bbb54..a66af3b 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -124,7 +124,8 @@
typedef enum {
IF_LOAD_TYPE_CSS = 1,
IF_LOAD_TYPE_IMAGE = 2,
- IF_LOAD_TYPE_SCRIPT = 3
+ IF_LOAD_TYPE_SCRIPT = 3,
+ IF_LOAD_TYPE_HTML = 4
} IF_LOAD_TYPE;
@@ -255,6 +256,14 @@ typedef enum {
// specifics of creating and initializaing a view of the appropriate class.
- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent;
+- (IFWebFrame *)mainFrame;
+
+
+// Return the frame associated with the data source. Traverses the
+// frame tree to find the data source.
+- (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
+
+
@end
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 51bcf82..287276e 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -100,7 +100,7 @@
// Set the frame that represents this data source.
-- (void)setFrame: (IFWebFrame *)f;
+//- (void)setFrame: (IFWebFrame *)f;
// Return the frame that represents this data source.
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index b5f5278..6eebb03 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -61,28 +61,10 @@
- initWithLoader: (IFLoader *)loader;
#endif
-
-- (void)setFrame: (IFWebFrame *)f
-{
- // FIXME! Remove. This back pointer isn't necessary and introduces a
- // messy cycle between IFWebFrame and IFWebDataSource.
- if (((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame == f)
- return;
-
- [((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame autorelease];
-
- ((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame = [f retain];
-
- [f setDataSource: self];
-}
-
-
- (IFWebFrame *)frame
{
- // FIXME! Implement traversing the frame tree, starting with
- // the main frame. That will remove messy frame<->datasource
- // cycle.
- return ((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame;
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ return [data->controller frameForDataSource: self];
}
@@ -90,7 +72,7 @@
// if the data source is not in a frame set.
- (NSString *)frameName
{
- return [((IFWebDataSourcePrivate *)_dataSourcePrivate)->frame name];
+ return [[self frame] name];
}
@@ -227,11 +209,12 @@
// Cancels any pending loads. A data source is conceptually only ever loading
// one document at a time, although one document may have many related
-// resources. stopLoading will stop all loads related to the data source.
+// resources. stopLoading will stop all loads related to the data source. This
+// method will also stop loads that may be loading in child frames.
// Returns NO if the data source is not currently loading.
- (void)stopLoading
{
- [self _part]->closeURL ();
+ [self _recursiveStopLoading];
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 5f424d2..1b13065 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -7,6 +7,8 @@
*/
#import <Cocoa/Cocoa.h>
+#import <WebFoundation/IFURLHandle.h>
+
#import <WebKit/IFWebDataSource.h>
// includes from kde
@@ -19,9 +21,12 @@
id <IFWebController>controller;
NSURL *inputURL;
KHTMLPart *part;
- IFWebFrame *frame;
+
// Child frames of this frame.
NSMutableDictionary *frames;
+
+ // Active IFURLHandles.
+ NSMutableArray *urlHandles;
}
- init;
@@ -34,4 +39,9 @@
- (KHTMLPart *)_part;
- (void)_setParent: (IFWebDataSource *)p;
- (void)_startLoading: (BOOL)forceRefresh initiatedByUserEvent: (BOOL)flag;
+
+- (void)_stopLoading;
+- (void)_recursiveStopLoading;
+- (void)_addURLHandle: (IFURLHandle *)handle;
+- (void)_removeURLHandle: (IFURLHandle *)handle;
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 2f8019a..0ab3c3d 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -7,6 +7,7 @@
*/
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFException.h>
+#import <WebKit/WebKitDebug.h>
@@ -31,8 +32,8 @@
// a reference to their view and main data source.
[parent release];
[frames release];
- [frame release];
[inputURL release];
+ [urlHandles release];
delete part;
@@ -70,4 +71,60 @@
[[self controller] locationChangeStartedForFrame: [self frame] initiatedByUserEvent: byUserEvent];
}
+
+- (void)_addURLHandle: (IFURLHandle *)handle
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ if (data->urlHandles == nil)
+ data->urlHandles = [[NSMutableArray alloc] init];
+ [data->urlHandles addObject: handle];
+}
+
+- (void)_removeURLHandle: (IFURLHandle *)handle
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ [data->urlHandles removeObject: handle];
+}
+
+- (void)_stopLoading
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ int i, count;
+ IFURLHandle *handle;
+
+ // Tell all handles to stop loading.
+ count = [data->urlHandles count];
+ for (i = 0; i < count; i++) {
+ handle = [data->urlHandles objectAtIndex: i];
+ WEBKITDEBUGLEVEL1 (0x2000, "canceling %s\n", [[[handle url] absoluteString] cString] );
+ [[data->urlHandles objectAtIndex: i] cancelLoadInBackground];
+ }
+
+ [self _part]->closeURL ();
+}
+
+
+- (void)_recursiveStopLoading
+{
+ NSArray *frames;
+ IFWebFrame *nextFrame;
+ int i, count;
+ IFWebDataSource *childDataSource, *childProvisionalDataSource;
+
+ [self _stopLoading];
+
+ frames = [self children];
+ count = [frames count];
+ for (i = 0; i < count; i++){
+ nextFrame = [frames objectAtIndex: i];
+ childDataSource = [nextFrame dataSource];
+ [childDataSource _recursiveStopLoading];
+ childProvisionalDataSource = [nextFrame provisionalDataSource];
+ [childProvisionalDataSource _recursiveStopLoading];
+ }
+}
+
+
@end
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index b5fb5c9..4b157b5 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -73,7 +73,7 @@
return;
[data setDataSource: ds];
- [[data dataSource] setFrame: self];
+ //[[data dataSource] setFrame: self];
}
// Required to break retain cycle between frame and data source,
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 80bbb54..a66af3b 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -124,7 +124,8 @@
typedef enum {
IF_LOAD_TYPE_CSS = 1,
IF_LOAD_TYPE_IMAGE = 2,
- IF_LOAD_TYPE_SCRIPT = 3
+ IF_LOAD_TYPE_SCRIPT = 3,
+ IF_LOAD_TYPE_HTML = 4
} IF_LOAD_TYPE;
@@ -255,6 +256,14 @@ typedef enum {
// specifics of creating and initializaing a view of the appropriate class.
- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent;
+- (IFWebFrame *)mainFrame;
+
+
+// Return the frame associated with the data source. Traverses the
+// frame tree to find the data source.
+- (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
+
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list