[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:26:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b1453817fa0ce4f26400c7b9bec4773b479ef355
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 22 11:45:34 2002 +0000
Change WebBridge to hold on to a WebFrame instead of a
WebDataSource. Since we will no longer ever have a bridge for a
provisional data source, we'll just bind the bridge to a
frame. Which means we can merge the bridge and the frame bridge
next.
* WebCoreSupport.subproj/WebBridge.h:
* WebCoreSupport.subproj/WebBridge.m: Changed below methods to work
with direct knowledge of the frame but not the bridge (mostly a
simplification).
(-[WebBridge frame]):
(-[WebBridge parent]):
(-[WebBridge childFrames]):
(-[WebBridge descendantFrameNamed:]):
(-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
(-[WebBridge openNewWindowWithURL:]):
(-[WebBridge areToolbarsVisible]):
(-[WebBridge setToolbarsVisible:]):
(-[WebBridge areScrollbarsVisible]):
(-[WebBridge setScrollbarsVisible:]):
(-[WebBridge isStatusBarVisible]):
(-[WebBridge setStatusBarVisible:]):
(-[WebBridge setWindowFrame:]):
(-[WebBridge window]):
(-[WebBridge setStatusText:]):
(-[WebBridge mainFrame]):
(-[WebBridge frameNamed:]):
(-[WebBridge receivedData:withDataSource:]):
(-[WebBridge objectLoadedFromCache:size:]):
(-[WebBridge setFrame:]):
(-[WebBridge dataSourceChanged]):
(-[WebBridge dataSource]):
(-[WebBridge openedByScript]):
(-[WebBridge setOpenedByScript:]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _commitIfReady]): Set bridge's frame and notify
that the data source changed.
* WebView.subproj/WebFrame.m:
(-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Set
bridge's frame.
* WebView.subproj/WebFramePrivate.h, WebView.subproj/WebFramePrivate.m:
(-[WebFrame _bridge]): Method to get the bridge.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index fe436dd..0097b77 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,49 @@
+2002-07-22 Maciej Stachowiak <mjs at apple.com>
+
+ Change WebBridge to hold on to a WebFrame instead of a
+ WebDataSource. Since we will no longer ever have a bridge for a
+ provisional data source, we'll just bind the bridge to a
+ frame. Which means we can merge the bridge and the frame bridge
+ next.
+
+ * WebCoreSupport.subproj/WebBridge.h:
+ * WebCoreSupport.subproj/WebBridge.m: Changed below methods to work
+ with direct knowledge of the frame but not the bridge (mostly a
+ simplification).
+ (-[WebBridge frame]):
+ (-[WebBridge parent]):
+ (-[WebBridge childFrames]):
+ (-[WebBridge descendantFrameNamed:]):
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+ (-[WebBridge openNewWindowWithURL:]):
+ (-[WebBridge areToolbarsVisible]):
+ (-[WebBridge setToolbarsVisible:]):
+ (-[WebBridge areScrollbarsVisible]):
+ (-[WebBridge setScrollbarsVisible:]):
+ (-[WebBridge isStatusBarVisible]):
+ (-[WebBridge setStatusBarVisible:]):
+ (-[WebBridge setWindowFrame:]):
+ (-[WebBridge window]):
+ (-[WebBridge setStatusText:]):
+ (-[WebBridge mainFrame]):
+ (-[WebBridge frameNamed:]):
+ (-[WebBridge receivedData:withDataSource:]):
+ (-[WebBridge objectLoadedFromCache:size:]):
+ (-[WebBridge setFrame:]):
+ (-[WebBridge dataSourceChanged]):
+ (-[WebBridge dataSource]):
+ (-[WebBridge openedByScript]):
+ (-[WebBridge setOpenedByScript:]):
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _commitIfReady]): Set bridge's frame and notify
+ that the data source changed.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Set
+ bridge's frame.
+ * WebView.subproj/WebFramePrivate.h, WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _bridge]): Method to get the bridge.
+
2002-07-21 Maciej Stachowiak <mjs at apple.com>
Removed provisional/committed distinction from WebCore and the
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index fe436dd..0097b77 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,49 @@
+2002-07-22 Maciej Stachowiak <mjs at apple.com>
+
+ Change WebBridge to hold on to a WebFrame instead of a
+ WebDataSource. Since we will no longer ever have a bridge for a
+ provisional data source, we'll just bind the bridge to a
+ frame. Which means we can merge the bridge and the frame bridge
+ next.
+
+ * WebCoreSupport.subproj/WebBridge.h:
+ * WebCoreSupport.subproj/WebBridge.m: Changed below methods to work
+ with direct knowledge of the frame but not the bridge (mostly a
+ simplification).
+ (-[WebBridge frame]):
+ (-[WebBridge parent]):
+ (-[WebBridge childFrames]):
+ (-[WebBridge descendantFrameNamed:]):
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+ (-[WebBridge openNewWindowWithURL:]):
+ (-[WebBridge areToolbarsVisible]):
+ (-[WebBridge setToolbarsVisible:]):
+ (-[WebBridge areScrollbarsVisible]):
+ (-[WebBridge setScrollbarsVisible:]):
+ (-[WebBridge isStatusBarVisible]):
+ (-[WebBridge setStatusBarVisible:]):
+ (-[WebBridge setWindowFrame:]):
+ (-[WebBridge window]):
+ (-[WebBridge setStatusText:]):
+ (-[WebBridge mainFrame]):
+ (-[WebBridge frameNamed:]):
+ (-[WebBridge receivedData:withDataSource:]):
+ (-[WebBridge objectLoadedFromCache:size:]):
+ (-[WebBridge setFrame:]):
+ (-[WebBridge dataSourceChanged]):
+ (-[WebBridge dataSource]):
+ (-[WebBridge openedByScript]):
+ (-[WebBridge setOpenedByScript:]):
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _commitIfReady]): Set bridge's frame and notify
+ that the data source changed.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Set
+ bridge's frame.
+ * WebView.subproj/WebFramePrivate.h, WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _bridge]): Method to get the bridge.
+
2002-07-21 Maciej Stachowiak <mjs at apple.com>
Removed provisional/committed distinction from WebCore and the
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index c58b977..7a39ca7 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -12,11 +12,13 @@
@interface WebBridge : WebCoreBridge <WebCoreBridge>
{
- WebDataSource *dataSource;
+ WebFrame *frame;
}
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
-- (void)setDataSource:(WebDataSource *)ds;
+- (void)setFrame:(WebFrame *)webFrame;
+
+- (void)dataSourceChanged;
- (WebDataSource *)dataSource;
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 342f5ac..44363f7 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -41,13 +41,13 @@
- (WebCoreFrameBridge *)frame
{
- return [[[self dataSource] webFrame] _frameBridge];
+ WEBKIT_ASSERT(frame != nil);
+ return [frame _frameBridge];
}
- (WebCoreBridge *)parent
{
- WEBKIT_ASSERT(dataSource);
- return [[dataSource parent] _bridge];
+ return [[[self dataSource] parent] _bridge];
}
- (NSArray *)childFrames
@@ -55,9 +55,9 @@
NSArray *frames = [[self dataSource] children];
NSEnumerator *e = [frames objectEnumerator];
NSMutableArray *frameBridges = [NSMutableArray arrayWithCapacity:[frames count]];
- WebFrame *frame;
- while ((frame = [e nextObject])) {
- id frameBridge = [frame _frameBridge];
+ WebFrame *childFrame;
+ while ((childFrame = [e nextObject])) {
+ id frameBridge = [childFrame _frameBridge];
if (frameBridge)
[frameBridges addObject:frameBridge];
}
@@ -66,78 +66,86 @@
- (WebCoreFrameBridge *)descendantFrameNamed:(NSString *)name
{
- return [[[[self dataSource] webFrame] frameNamed:name] _frameBridge];
+ WEBKIT_ASSERT(frame != nil);
+ return [[frame frameNamed:name] _frameBridge];
}
- (BOOL)createChildFrameNamed:(NSString *)frameName
withURL:(NSURL *)URL renderPart:(KHTMLRenderPart *)renderPart
allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
{
- WebFrame *frame = [[[self dataSource] controller] createFrameNamed:frameName for:nil inParent:[self dataSource] allowsScrolling:allowsScrolling];
- if (frame == nil) {
+ WEBKIT_ASSERT(frame != nil);
+ WebFrame *newFrame = [[frame controller] createFrameNamed:frameName for:nil inParent:[self dataSource] allowsScrolling:allowsScrolling];
+ if (newFrame == nil) {
return NO;
}
- [[frame _frameBridge] setRenderPart:renderPart];
+ [[newFrame _frameBridge] setRenderPart:renderPart];
- [[frame webView] _setMarginWidth:width];
- [[frame webView] _setMarginHeight:height];
+ [[newFrame webView] _setMarginWidth:width];
+ [[newFrame webView] _setMarginHeight:height];
- [[frame _frameBridge] loadURL:URL attributes:nil flags:0 withParent:[self dataSource]];
+ [[newFrame _frameBridge] loadURL:URL attributes:nil flags:0 withParent:[self dataSource]];
return YES;
}
- (WebCoreBridge *)openNewWindowWithURL:(NSURL *)url
{
- WebController *newController = [[[[self dataSource] controller] windowContext] openNewWindowWithURL:url];
- WebDataSource *newDataSource;
-
- newDataSource = [[newController mainFrame] dataSource];
- if ([newDataSource isDocumentHTML])
- return [(WebHTMLRepresentation *)[newDataSource representation] _bridge];
-
- return nil;
+ WEBKIT_ASSERT(frame != nil);
+
+ WebController *newController = [[[frame controller] windowContext] openNewWindowWithURL:url];
+ WebFrame *newFrame = [newController mainFrame];
+
+ return [newFrame _bridge];
}
- (BOOL)areToolbarsVisible
{
- return [[[[self dataSource] controller] windowContext] areToolbarsVisible];
+ WEBKIT_ASSERT(frame != nil);
+ return [[[frame controller] windowContext] areToolbarsVisible];
}
- (void)setToolbarsVisible:(BOOL)visible
{
- [[[[self dataSource] controller] windowContext] setToolbarsVisible:visible];
+ WEBKIT_ASSERT(frame != nil);
+ [[[frame controller] windowContext] setToolbarsVisible:visible];
}
- (BOOL)areScrollbarsVisible
{
- return [[[[self dataSource] webFrame] webView] allowsScrolling];
+ WEBKIT_ASSERT(frame != nil);
+ return [[frame webView] allowsScrolling];
}
- (void)setScrollbarsVisible:(BOOL)visible
{
- return [[[[self dataSource] webFrame] webView] setAllowsScrolling:visible];
+ WEBKIT_ASSERT(frame != nil);
+ return [[frame webView] setAllowsScrolling:visible];
}
- (BOOL)isStatusBarVisible
{
- return [[[[self dataSource] controller] windowContext] isStatusBarVisible];
+ WEBKIT_ASSERT(frame != nil);
+ return [[[frame controller] windowContext] isStatusBarVisible];
}
- (void)setStatusBarVisible:(BOOL)visible
{
- [[[[self dataSource] controller] windowContext] setStatusBarVisible:visible];
+ WEBKIT_ASSERT(frame != nil);
+ [[[frame controller] windowContext] setStatusBarVisible:visible];
}
-- (void)setWindowFrame:(NSRect)frame
+- (void)setWindowFrame:(NSRect)frameRect
{
- [[[[self dataSource] controller] windowContext] setFrame:frame];
+ WEBKIT_ASSERT(frame != nil);
+ [[[frame controller] windowContext] setFrame:frameRect];
}
- (NSWindow *)window
{
- return [[[[self dataSource] controller] windowContext] window];
+ WEBKIT_ASSERT(frame != nil);
+ return [[[frame controller] windowContext] window];
}
- (void)setTitle:(NSString *)title
@@ -147,24 +155,27 @@
- (void)setStatusText:(NSString *)status
{
- [[[[self dataSource] controller] windowContext] setStatusText:status];
+ WEBKIT_ASSERT(frame != nil);
+ [[[frame controller] windowContext] setStatusText:status];
}
- (WebCoreFrameBridge *)mainFrame
{
- return [[[[self dataSource] controller] mainFrame] _frameBridge];
+ WEBKIT_ASSERT(frame != nil);
+ return [[[frame controller] mainFrame] _frameBridge];
}
- (WebCoreFrameBridge *)frameNamed:(NSString *)name
{
- return [[[[self dataSource] controller] frameNamed:name] _frameBridge];
+ WEBKIT_ASSERT(frame != nil);
+ return [[[frame controller] frameNamed:name] _frameBridge];
}
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
{
- WEBKIT_ASSERT(dataSource == withDataSource);
+ WEBKIT_ASSERT([self dataSource] == withDataSource);
- [self addData:data withEncoding:[dataSource encoding]];
+ [self addData:data withEncoding:[withDataSource encoding]];
}
- (WebResourceHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
@@ -174,36 +185,53 @@
- (void)objectLoadedFromCache:(NSURL *)URL size:(unsigned)bytes
{
- WebResourceHandle *handle;
- WebLoadProgress *loadProgress;
-
- handle = [[WebResourceHandle alloc] initWithURL:URL];
- loadProgress = [[WebLoadProgress alloc] initWithBytesSoFar:bytes totalToLoad:bytes];
- [[[self dataSource] controller] _receivedProgress:loadProgress forResourceHandle:handle fromDataSource: [self dataSource] complete:YES];
+ WEBKIT_ASSERT(frame != nil);
+
+ WebResourceHandle *handle = [[WebResourceHandle alloc] initWithURL:URL];
+
+ WebLoadProgress *loadProgress = [[WebLoadProgress alloc] initWithBytesSoFar:bytes totalToLoad:bytes];
+ [[frame controller] _receivedProgress:loadProgress forResourceHandle:handle fromDataSource: [self dataSource] complete:YES];
[loadProgress release];
[handle release];
}
-- (void)setDataSource: (WebDataSource *)ds
+- (void)setFrame: (WebFrame *)webFrame
{
- WEBKIT_ASSERT(ds != nil);
- WEBKIT_ASSERT([ds _isCommitted]);
+ // FIXME: needed temporarily while we still use the dummy data
+ // source hack
+ if (webFrame == nil) {
+ return;
+ }
- if (dataSource == nil) {
+ WEBKIT_ASSERT(webFrame != nil);
+
+ if (frame == nil) {
// FIXME: non-retained because data source owns representation owns bridge
- dataSource = ds;
- [self openURL:[dataSource inputURL]];
- if ([dataSource redirectedURL]) {
- [self setURL:[dataSource redirectedURL]];
- }
+ frame = webFrame;
} else {
- WEBKIT_ASSERT(dataSource == ds);
+ WEBKIT_ASSERT(frame == webFrame);
}
+}
+- (void)dataSourceChanged
+{
+ // FIXME: needed temporarily while we still use the dummy data
+ // source hack
+ if ([frame dataSource] == nil) {
+ [self openURL:nil];
+ } else {
+ [self openURL:[[self dataSource] inputURL]];
+ if ([[self dataSource] redirectedURL]) {
+ [self setURL:[[self dataSource] redirectedURL]];
+ }
+ }
}
- (WebDataSource *)dataSource
{
+ WEBKIT_ASSERT(frame != nil);
+ WebDataSource *dataSource = [frame dataSource];
+
WEBKIT_ASSERT(dataSource != nil);
WEBKIT_ASSERT([dataSource _isCommitted]);
@@ -213,12 +241,14 @@
- (BOOL)openedByScript
{
- return [[[self dataSource] controller] _openedByScript];
+ WEBKIT_ASSERT(frame != nil);
+ return [[frame controller] _openedByScript];
}
- (void)setOpenedByScript:(BOOL)openedByScript
{
- [[[self dataSource] controller] _setOpenedByScript:openedByScript];
+ WEBKIT_ASSERT(frame != nil);
+ [[frame controller] _setOpenedByScript:openedByScript];
}
- (void)unfocusWindow
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 9f9dbf0..892966a 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -444,8 +444,9 @@
WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "committed resource = %s\n", [[[self inputURL] absoluteString] cString]);
_private->committed = TRUE;
[self _makeRepresentation];
- [[self _bridge] setDataSource:self];
+ [[self _bridge] setFrame:[self webFrame]];
[[self webFrame] _transitionToCommitted];
+ [[self _bridge] dataSourceChanged];
}
}
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 2721979..982e034 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -63,6 +63,7 @@
// data source won't be hooked up to its frame yet. Fortunately,
// this is only needed temporarily...
+ [[dummyDataSource _bridge] setFrame:self];
[self _transitionToCommitted];
[dummyDataSource release];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 72a0379..752a7e8 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -8,6 +8,7 @@
#import <WebKit/WebFrame.h>
+ at class WebBridge;
@class WebFrameBridge;
@class WebView;
@protocol WebDocumentLoading;
@@ -71,6 +72,7 @@ typedef enum {
- (void)_isLoadComplete;
- (void)_checkLoadComplete;
- (void)_timedLayout: userInfo;
+- (WebBridge *)_bridge;
- (WebFrameBridge *)_frameBridge;
- (BOOL)_shouldShowDataSource:(WebDataSource *)dataSource;
- (void)_setProvisionalDataSource:(WebDataSource *)d;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 46f1a04..e1c4093 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -443,6 +443,11 @@ static const char * const stateNames[6] = {
[WebFrame _recursiveCheckCompleteFromFrame: [[self controller] mainFrame]];
}
+- (WebBridge *)_bridge
+{
+ return [[self dataSource] _bridge];
+}
+
- (WebFrameBridge *)_frameBridge
{
return _private->frameBridge;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list