[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 07:29:13 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 39b986f2a8b666fc5a650753502a233c0381d2de
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 12 03:15:23 2003 +0000
WebKit:
Added controller: parameter to all WebControllers delegates.
Reviewed by chris.
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView loadPluginRequest:]):
* Plugins.subproj/WebNetscapePluginDocumentView.m:
(-[WebNetscapePluginDocumentView setDataSource:]):
* Plugins.subproj/WebNullPluginView.m:
(-[WebNullPluginView viewDidMoveToWindow]):
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController showStatus:]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge createWindowWithURL:frameName:]):
(-[WebBridge showWindow]):
(-[WebBridge areToolbarsVisible]):
(-[WebBridge setToolbarsVisible:]):
(-[WebBridge isStatusBarVisible]):
(-[WebBridge setStatusBarVisible:]):
(-[WebBridge setWindowFrame:]):
(-[WebBridge runJavaScriptAlertPanelWithMessage:]):
(-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
(-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
(-[WebBridge runOpenPanelForFileButtonWithResultListener:]):
(-[WebBridge setStatusText:]):
(-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate resource:willSendRequest:]):
(-[WebBaseResourceHandleDelegate resource:didReceiveResponse:]):
(-[WebBaseResourceHandleDelegate resource:didReceiveData:]):
(-[WebBaseResourceHandleDelegate resourceDidFinishLoading:]):
(-[WebBaseResourceHandleDelegate resource:didFailLoadingWithError:]):
(-[WebBaseResourceHandleDelegate cancelWithError:]):
* WebView.subproj/WebContextMenuDelegate.h:
* WebView.subproj/WebControllerPolicyDelegate.h:
* WebView.subproj/WebControllerPrivate.m:
(-[WebController _openNewWindowWithRequest:]):
(-[WebController _menuForElement:]):
(-[WebController _mouseDidMoveOverElement:modifierFlags:]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _startLoading:]):
(-[WebDataSource _setTitle:]):
(-[WebDataSource _setRequest:]):
(-[WebDataSource _updateIconDatabaseWithURL:]):
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultContextMenuDelegate controller:contextMenuItemsForElement:defaultMenuItems:]):
* WebView.subproj/WebDefaultLocationChangeDelegate.m:
(-[WebDefaultLocationChangeDelegate controller:locationChangeStartedForDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:serverRedirectedForDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:locationChangeCommittedForDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:receivedPageTitle:forDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:receivedPageIcon:forDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:locationChangeDone:forDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:willCloseLocationForDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:locationChangedWithinPageForDataSource:]):
(-[WebDefaultLocationChangeDelegate controller:clientWillRedirectTo:delay:fireDate:forFrame:]):
(-[WebDefaultLocationChangeDelegate controller:clientRedirectCancelledForFrame:]):
* WebView.subproj/WebDefaultPolicyDelegate.m:
(-[WebDefaultPolicyDelegate controller:unableToImplementPolicy:error:forURL:inFrame:]):
(-[WebDefaultPolicyDelegate controller:decideNavigationPolicyForAction:andRequest:inFrame:decisionListener:]):
(-[WebDefaultPolicyDelegate controller:decideNewWindowPolicyForAction:andRequest:newFrameName:decisionListener:]):
* WebView.subproj/WebDefaultResourceLoadDelegate.m:
(-[WebDefaultResourceLoadDelegate controller:identifierForInitialRequest:fromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:resource:willSendRequest:fromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:resource:didReceiveResponse:fromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:resource:didReceiveContentLength:fromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:resource:didFinishLoadingFromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:resource:didFailLoadingWithError:fromDataSource:]):
(-[WebDefaultResourceLoadDelegate controller:pluginFailedWithError:dataSource:]):
* WebView.subproj/WebDefaultWindowOperationsDelegate.m:
(-[WebDefaultWindowOperationsDelegate controller:runJavaScriptConfirmPanelWithMessage:]):
(-[WebDefaultWindowOperationsDelegate controller:runJavaScriptTextInputPanelWithPrompt:defaultText:]):
(-[WebDefaultWindowOperationsDelegate controller:runOpenPanelForFileButtonWithResultListener:]):
* WebView.subproj/WebFramePrivate.m:
(if):
(switch):
* WebView.subproj/WebLocationChangeDelegate.h:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient checkContentPolicyForResponse:andCallSelector:]):
* WebView.subproj/WebResourceLoadDelegate.h:
* WebView.subproj/WebWindowOperationsDelegate.h:
WebBrowser:
Added controller: parameter to all WebControllers delegates.
Reviewed by chris.
* LoadProgressMonitor.m:
(-[LoadProgressMonitor controller:identifierForInitialRequest:fromDataSource:]):
(-[LoadProgressMonitor controller:resource:willSendRequest:fromDataSource:]):
(-[LoadProgressMonitor controller:resource:didReceiveResponse:fromDataSource:]):
(-[LoadProgressMonitor controller:resource:didReceiveContentLength:fromDataSource:]):
(-[LoadProgressMonitor controller:resource:didFinishLoadingFromDataSource:]):
(-[LoadProgressMonitor controller:pluginFailedWithError:dataSource:]):
* LocationChangeHandler.m:
(-[LocationChangeHandler controller:locationChangeStartedForDataSource:]):
(-[LocationChangeHandler controller:locationChangeCommittedForDataSource:]):
(-[LocationChangeHandler controller:locationChangeDone:forDataSource:]):
(-[LocationChangeHandler controller:willCloseLocationForDataSource:]):
(-[LocationChangeHandler controller:receivedPageTitle:forDataSource:]):
(-[LocationChangeHandler controller:receivedPageIcon:forDataSource:]):
(-[LocationChangeHandler controller:serverRedirectedForDataSource:]):
(-[LocationChangeHandler controller:locationChangedWithinPageForDataSource:]):
(-[LocationChangeHandler controller:clientWillRedirectTo:delay:fireDate:forFrame:]):
(-[LocationChangeHandler controller:clientRedirectCancelledForFrame:]):
Tests:
Added controller: parameter to all WebControllers delegates.
Reviewed by chris.
* SimpleViewer/DocumentController.m:
(-[DocumentController controller:locationChangeStartedForDataSource:]):
(-[DocumentController controller:receivedPageTitle:forDataSource:]):
(-[DocumentController controller:locationChangeDone:forDataSource:]):
(-[DocumentController controller:identifierForInitialRequest:fromDataSource:]):
(-[DocumentController controller:resource:willSendRequest:fromDataSource:]):
(-[DocumentController controller:resource:didFinishLoadingFromDataSource:]):
(-[DocumentController controller:resource:didFailLoadingWithError:fromDataSource:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 605b6a3..5134688 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,88 @@
+2003-03-11 Richard Williamson <rjw at apple.com>
+
+ Added controller: parameter to all WebControllers delegates.
+
+ Reviewed by chris.
+
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ * Plugins.subproj/WebNetscapePluginDocumentView.m:
+ (-[WebNetscapePluginDocumentView setDataSource:]):
+ * Plugins.subproj/WebNullPluginView.m:
+ (-[WebNullPluginView viewDidMoveToWindow]):
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController showStatus:]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge createWindowWithURL:frameName:]):
+ (-[WebBridge showWindow]):
+ (-[WebBridge areToolbarsVisible]):
+ (-[WebBridge setToolbarsVisible:]):
+ (-[WebBridge isStatusBarVisible]):
+ (-[WebBridge setStatusBarVisible:]):
+ (-[WebBridge setWindowFrame:]):
+ (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
+ (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
+ (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
+ (-[WebBridge runOpenPanelForFileButtonWithResultListener:]):
+ (-[WebBridge setStatusText:]):
+ (-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate resource:willSendRequest:]):
+ (-[WebBaseResourceHandleDelegate resource:didReceiveResponse:]):
+ (-[WebBaseResourceHandleDelegate resource:didReceiveData:]):
+ (-[WebBaseResourceHandleDelegate resourceDidFinishLoading:]):
+ (-[WebBaseResourceHandleDelegate resource:didFailLoadingWithError:]):
+ (-[WebBaseResourceHandleDelegate cancelWithError:]):
+ * WebView.subproj/WebContextMenuDelegate.h:
+ * WebView.subproj/WebControllerPolicyDelegate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _openNewWindowWithRequest:]):
+ (-[WebController _menuForElement:]):
+ (-[WebController _mouseDidMoveOverElement:modifierFlags:]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+ (-[WebDataSource _setTitle:]):
+ (-[WebDataSource _setRequest:]):
+ (-[WebDataSource _updateIconDatabaseWithURL:]):
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultContextMenuDelegate controller:contextMenuItemsForElement:defaultMenuItems:]):
+ * WebView.subproj/WebDefaultLocationChangeDelegate.m:
+ (-[WebDefaultLocationChangeDelegate controller:locationChangeStartedForDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:serverRedirectedForDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:locationChangeCommittedForDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:receivedPageTitle:forDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:receivedPageIcon:forDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:locationChangeDone:forDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:willCloseLocationForDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:locationChangedWithinPageForDataSource:]):
+ (-[WebDefaultLocationChangeDelegate controller:clientWillRedirectTo:delay:fireDate:forFrame:]):
+ (-[WebDefaultLocationChangeDelegate controller:clientRedirectCancelledForFrame:]):
+ * WebView.subproj/WebDefaultPolicyDelegate.m:
+ (-[WebDefaultPolicyDelegate controller:unableToImplementPolicy:error:forURL:inFrame:]):
+ (-[WebDefaultPolicyDelegate controller:decideNavigationPolicyForAction:andRequest:inFrame:decisionListener:]):
+ (-[WebDefaultPolicyDelegate controller:decideNewWindowPolicyForAction:andRequest:newFrameName:decisionListener:]):
+ * WebView.subproj/WebDefaultResourceLoadDelegate.m:
+ (-[WebDefaultResourceLoadDelegate controller:identifierForInitialRequest:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:resource:willSendRequest:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:resource:didReceiveResponse:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:resource:didReceiveContentLength:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:resource:didFinishLoadingFromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:resource:didFailLoadingWithError:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate controller:pluginFailedWithError:dataSource:]):
+ * WebView.subproj/WebDefaultWindowOperationsDelegate.m:
+ (-[WebDefaultWindowOperationsDelegate controller:runJavaScriptConfirmPanelWithMessage:]):
+ (-[WebDefaultWindowOperationsDelegate controller:runJavaScriptTextInputPanelWithPrompt:defaultText:]):
+ (-[WebDefaultWindowOperationsDelegate controller:runOpenPanelForFileButtonWithResultListener:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (if):
+ (switch):
+ * WebView.subproj/WebLocationChangeDelegate.h:
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient checkContentPolicyForResponse:andCallSelector:]):
+ * WebView.subproj/WebResourceLoadDelegate.h:
+ * WebView.subproj/WebWindowOperationsDelegate.h:
+
2003-03-11 Maciej Stachowiak <mjs at apple.com>
Reviewed by Richard.
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 00324cd..c083341 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -9,6 +9,7 @@
#import <WebKit/WebController.h>
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSource.h>
+#import <WebKit/WebDefaultWindowOperationsDelegate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFramePrivate.h>
#import <WebKit/WebKitLogging.h>
@@ -1018,14 +1019,17 @@ typedef struct {
// FIXME - need to get rid of this window creation which
// bypasses normal targeted link handling
- WebController *controller = nil;
- id wd = [[self controller] windowOperationsDelegate];
- if ([wd respondsToSelector:@selector(createWindowWithRequest:)])
- controller = [wd createWindowWithRequest:nil];
+ WebController *newController = nil;
+ WebController *currentController = [self controller];
+ id wd = [currentController windowOperationsDelegate];
+ if ([wd respondsToSelector:@selector(controller:createWindowWithRequest:)])
+ newController = [wd controller:currentController createWindowWithRequest:nil];
+ else
+ newController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:currentController createWindowWithRequest:nil];
- [controller _setTopLevelFrameName:frameName];
- [[controller _windowOperationsDelegateForwarder] showWindow];
- WebFrame *frame = [controller mainFrame];
+ [newController _setTopLevelFrameName:frameName];
+ [[newController _windowOperationsDelegateForwarder] controllerShowWindow:newController];
+ WebFrame *frame = [newController mainFrame];
NSURL *URL = [request URL];
NSString *JSString = [URL _web_scriptIfJavaScriptURL];
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 952201d..b5015cf 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -78,7 +78,8 @@
pluginName:[thePlugin name]
MIMEType:MIME];
- [[[[theDataSource webFrame] controller] _resourceLoadDelegateForwarder] pluginFailedWithError:error dataSource:theDataSource];
+ WebController *c = [[theDataSource webFrame] controller];
+ [[c _resourceLoadDelegateForwarder] controller:c pluginFailedWithError:error dataSource:theDataSource];
return;
}
diff --git a/WebKit/Plugins.subproj/WebNullPluginView.m b/WebKit/Plugins.subproj/WebNullPluginView.m
index 3571764..630e305 100644
--- a/WebKit/Plugins.subproj/WebNullPluginView.m
+++ b/WebKit/Plugins.subproj/WebNullPluginView.m
@@ -51,7 +51,7 @@ static NSImage *image = nil;
WebController *controller = [webFrame controller];
WebDataSource *dataSource = [webFrame dataSource];
- [[controller _resourceLoadDelegateForwarder] pluginFailedWithError:error dataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller pluginFailedWithError:error dataSource:dataSource];
}
}
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index fa3398e..8f25905 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -120,7 +120,8 @@
ERROR("could not show status message (%@) because plug-in has already been destroyed", message);
return;
}
- [[[_HTMLView _controller] _windowOperationsDelegateForwarder] setStatusText:message];
+ WebController *c = [_HTMLView _controller];
+ [[c _windowOperationsDelegateForwarder] controller:c setStatusText:message];
}
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index f734be3..e865372 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -12,6 +12,7 @@
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebDefaultResourceLoadDelegate.h>
+#import <WebKit/WebDefaultWindowOperationsDelegate.h>
#import <WebKit/WebFramePrivate.h>
#import <WebKit/WebHistoryItemPrivate.h>
#import <WebKit/WebHTMLRepresentationPrivate.h>
@@ -110,33 +111,39 @@
[request setReferrer:[self referrer]];
}
- id wd = [[frame controller] windowOperationsDelegate];
+ WebController *currentController = [frame controller];
+ id wd = [currentController windowOperationsDelegate];
WebController *newController = nil;
- if ([wd respondsToSelector:@selector(createWindowWithRequest:)])
- newController = [wd createWindowWithRequest:request];
+ if ([wd respondsToSelector:@selector(controller:createWindowWithRequest:)])
+ newController = [wd controller:currentController createWindowWithRequest:request];
+ else
+ newController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:currentController createWindowWithRequest:request];
[newController _setTopLevelFrameName:name];
return [[newController mainFrame] _bridge];
}
- (void)showWindow
{
- [[[frame controller] _windowOperationsDelegateForwarder] showWindow];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controllerShowWindow: c];
}
- (BOOL)areToolbarsVisible
{
ASSERT(frame != nil);
- id wd = [[frame controller] windowOperationsDelegate];
- if ([wd respondsToSelector: @selector(areToolbarsVisible)])
- return [[[frame controller] windowOperationsDelegate] areToolbarsVisible];
- return NO;
+ WebController *c = [frame controller];
+ id wd = [c windowOperationsDelegate];
+ if ([wd respondsToSelector: @selector(controllerAreToolbarsVisible:)])
+ return [wd controllerAreToolbarsVisible: c];
+ return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controllerAreToolbarsVisible:c];
}
- (void)setToolbarsVisible:(BOOL)visible
{
ASSERT(frame != nil);
- [[[frame controller] _windowOperationsDelegateForwarder] setToolbarsVisible:visible];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c setToolbarsVisible:visible];
}
- (BOOL)areScrollbarsVisible
@@ -154,22 +161,25 @@
- (BOOL)isStatusBarVisible
{
ASSERT(frame != nil);
- id wd = [[frame controller] windowOperationsDelegate];
- if ([wd respondsToSelector: @selector(isStatusBarVisible)])
- return [[[frame controller] windowOperationsDelegate] isStatusBarVisible];
- return NO;
+ WebController *c = [frame controller];
+ id wd = [c windowOperationsDelegate];
+ if ([wd respondsToSelector: @selector(controllerIsStatusBarVisible:)])
+ return [wd controllerIsStatusBarVisible:c];
+ return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controllerIsStatusBarVisible:c];
}
- (void)setStatusBarVisible:(BOOL)visible
{
ASSERT(frame != nil);
- [[[frame controller] _windowOperationsDelegateForwarder] setStatusBarVisible:visible];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c setStatusBarVisible:visible];
}
- (void)setWindowFrame:(NSRect)frameRect
{
ASSERT(frame != nil);
- [[[frame controller] _windowOperationsDelegateForwarder] setFrame:frameRect];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c setFrame:frameRect];
}
- (NSWindow *)window
@@ -180,18 +190,27 @@
- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message
{
- [[[frame controller] windowOperationsDelegate] runJavaScriptAlertPanelWithMessage:message];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c runJavaScriptAlertPanelWithMessage:message];
}
- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
{
- return [[[frame controller] windowOperationsDelegate] runJavaScriptConfirmPanelWithMessage:message];
+ WebController *c = [frame controller];
+ id wd = [c windowOperationsDelegate];
+ if ([wd respondsToSelector: @selector(controller:runJavaScriptConfirmPanelWithMessage:)])
+ return [wd controller:c runJavaScriptConfirmPanelWithMessage:message];
+ return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:c runJavaScriptConfirmPanelWithMessage:message];
}
- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
{
- *result = [[[frame controller] windowOperationsDelegate] runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
-
+ WebController *c = [frame controller];
+ id wd = [c windowOperationsDelegate];
+ if ([wd respondsToSelector: @selector(controller:runJavaScriptTextInputPanelWithPrompt:defaultText:)])
+ *result = [wd controller:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
+ else
+ *result = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
return *result != nil;
}
@@ -202,7 +221,8 @@
- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
{
- [[[frame controller] windowOperationsDelegate] runOpenPanelForFileButtonWithResultListener:resultListener];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c runOpenPanelForFileButtonWithResultListener:resultListener];
}
@@ -225,7 +245,8 @@
- (void)setStatusText:(NSString *)status
{
ASSERT(frame != nil);
- [[[frame controller] _windowOperationsDelegateForwarder] setStatusText:status];
+ WebController *c = [frame controller];
+ [[c _windowOperationsDelegateForwarder] controller:c setStatusText:status];
}
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
@@ -261,18 +282,19 @@
ASSERT(response != nil);
WebRequest *request = [[WebRequest alloc] initWithURL:[NSURL _web_URLWithString:URL]];
- id delegate = [[frame controller] resourceLoadDelegate];
- id _delegate = [[frame controller] _resourceLoadDelegateForwarder];
+ WebController *c = [frame controller];
+ id delegate = [c resourceLoadDelegate];
+ id _delegate = [c _resourceLoadDelegateForwarder];
id identifier;
// No chance for delegate to modify request, so we don't send a willSendRequest: message.
- if ([delegate respondsToSelector:@selector(identifierForInitialRequest:fromDataSource:)])
- identifier = [delegate identifierForInitialRequest: request fromDataSource: [self dataSource]];
+ if ([delegate respondsToSelector:@selector(controller:identifierForInitialRequest:fromDataSource:)])
+ identifier = [delegate controller:c identifierForInitialRequest: request fromDataSource: [self dataSource]];
else
- identifier = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] identifierForInitialRequest:request fromDataSource:[self dataSource]];
- [_delegate resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
- [_delegate resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
- [_delegate resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
+ identifier = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] controller:c identifierForInitialRequest:request fromDataSource:[self dataSource]];
+ [_delegate controller:c resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
+ [_delegate controller:c resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
+ [_delegate controller:c resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
[[frame controller] _finishedLoadingResourceFromDataSource:[self dataSource]];
[request release];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index f768497..9f9ed5a 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -9,7 +9,6 @@
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFrame.h>
-#import <WebKit/WebResourceLoadDelegate.h>
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebError.h>
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index f768497..9f9ed5a 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -9,7 +9,6 @@
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFrame.h>
-#import <WebKit/WebResourceLoadDelegate.h>
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebError.h>
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index 559e247..559cbb3 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -139,17 +139,17 @@
if (identifier == nil) {
// The identifier is released after the last callback, rather than in dealloc
// to avoid potential cycles.
- if ([resourceLoadDelegate respondsToSelector: @selector(identifierForInitialRequest:fromDataSource:)])
- identifier = [[resourceLoadDelegate identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
+ if ([resourceLoadDelegate respondsToSelector: @selector(controller:identifierForInitialRequest:fromDataSource:)])
+ identifier = [[resourceLoadDelegate controller: controller identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
else
- identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
+ identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] controller:controller identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
}
if (resourceLoadDelegate) {
- if ([resourceLoadDelegate respondsToSelector: @selector(resource:willSendRequest:fromDataSource:)])
- newRequest = [resourceLoadDelegate resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ if ([resourceLoadDelegate respondsToSelector: @selector(controller:resource:willSendRequest:fromDataSource:)])
+ newRequest = [resourceLoadDelegate controller:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
else
- newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] controller:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
}
// Store a copy of the request.
@@ -185,7 +185,7 @@
response = r;
[dataSource _addResponse: r];
- [[controller _resourceLoadDelegateForwarder] resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
- (void)resource:(WebResource *)h didReceiveData:(NSData *)data
@@ -193,7 +193,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
- (void)resourceDidFinishLoading:(WebResource *)h
@@ -201,7 +201,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
ASSERT(currentURL);
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
@@ -214,7 +214,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
// currentURL may be nil if the request was aborted
if (currentURL)
@@ -234,7 +234,7 @@
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
if (error) {
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
}
[self _releaseResources];
diff --git a/WebKit/WebView.subproj/WebContextMenuDelegate.h b/WebKit/WebView.subproj/WebContextMenuDelegate.h
index 522c527..5949c6a 100644
--- a/WebKit/WebView.subproj/WebContextMenuDelegate.h
+++ b/WebKit/WebView.subproj/WebContextMenuDelegate.h
@@ -5,6 +5,8 @@
Public header file.
*/
+ at class WebController;
+
/*!
@category WebContextMenuDelegate
@discussion WebContextMenuDelegate determine what context menu items are visible over
@@ -34,11 +36,12 @@ enum {
/*!
@method contextMenuItemsForElement:defaultMenuItems:
@abstract Returns the menu items to display in an element's contextual menu.
+ @param controller The WebController requesting the context menus.
@param element A dictionary representation of the clicked element.
@param defaultMenuItems An array of default NSMenuItems to include in all contextual menus.
@result An array of NSMenuItems to include in the contextual menu.
*/
-- (NSArray *)contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
+- (NSArray *)controller:(WebController *)controller contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
@end
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index e08c4d1..46674eb 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
+ at class WebController;
@class WebError;
@class WebFrame;
@class WebPolicyPrivate;
@@ -69,7 +70,6 @@ extern NSString *WebActionOriginalURLKey; // NSURL
this method.
*/
-(void)use;
-
/*!
@method download
@abstract Download the resource instead of displaying it.
@@ -116,7 +116,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@discussion This method will be called before loading starts, and
on every redirect.
*/
-- (void)decideNavigationPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNavigationPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -137,7 +137,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
will be called with a WebNavigationType of WebNavigationTypeOther
in its action. This is to avoid possible confusion about the modifiers.
*/
-- (void)decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
newFrameName:(NSString *)frameName
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -150,7 +150,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@param frame The frame which is loading the URL.
@param listener The object to call when the decision is made
*/
-- (void)decideContentPolicyForMIMEType:(NSString *)type
+- (void)controller:(WebController *)c decideContentPolicyForMIMEType:(NSString *)type
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -163,6 +163,6 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@param URL The URL of the resource for which a particular action was requested but failed.
@param frame The frame in which the policy could not be implemented.
*/
-- (void)unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame;
+- (void)controller:(WebController *)c unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 37bb551..d2b9ec3 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -297,36 +297,31 @@
{
id wd = [self windowOperationsDelegate];
WebController *newWindowController = nil;
- if ([wd respondsToSelector:@selector(createWindowWithRequest:)])
- newWindowController = [wd createWindowWithRequest:request];
+ if ([wd respondsToSelector:@selector(controller:createWindowWithRequest:)])
+ newWindowController = [wd controller:self createWindowWithRequest:request];
else {
- [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] createWindowWithRequest: request];
+ newWindowController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:self createWindowWithRequest: request];
}
- [[newWindowController _windowOperationsDelegateForwarder] showWindow];
+ [[newWindowController _windowOperationsDelegateForwarder] controllerShowWindow: self];
return newWindowController;
}
- (NSMenu *)_menuForElement:(NSDictionary *)element
{
- NSArray *defaultMenuItems = [_private->defaultContextMenuDelegate contextMenuItemsForElement:element
- defaultMenuItems:nil];
- NSArray *menuItems = nil;
+ NSArray *defaultMenuItems = [_private->defaultContextMenuDelegate
+ controller:self contextMenuItemsForElement:element defaultMenuItems:nil];
+ NSArray *menuItems = defaultMenuItems;
NSMenu *menu = nil;
unsigned i;
if (_private->contextMenuDelegate) {
id cd = _private->contextMenuDelegate;
- if ([cd respondsToSelector:@selector(contextMenuItemsForElement:defaultMenuItems:)])
- menuItems = [cd contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
- else
- menuItems = [[WebDefaultContextMenuDelegate sharedContextMenuDelegate] contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
+ if ([cd respondsToSelector:@selector(controller:contextMenuItemsForElement:defaultMenuItems:)])
+ menuItems = [cd controller:self contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
}
- else {
- menuItems = defaultMenuItems;
- }
if (menuItems && [menuItems count] > 0) {
menu = [[[NSMenu alloc] init] autorelease];
@@ -346,7 +341,7 @@
// for that case.
if (dictionary && _private->lastElementWasNonNil) {
- [[self _windowOperationsDelegateForwarder] mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
+ [[self _windowOperationsDelegateForwarder] controller:self mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
}
_private->lastElementWasNonNil = dictionary != nil;
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 19e5018..0caf3e8 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -185,7 +185,7 @@
[self _setLoading:YES];
- [[_private->controller _locationChangeDelegateForwarder] locationChangeStartedForDataSource:self];
+ [[_private->controller _locationChangeDelegateForwarder] controller: _private->controller locationChangeStartedForDataSource:self];
if (pageCache){
_private->loadingFromPageCache = YES;
@@ -194,7 +194,7 @@
_private->loadingFromPageCache = NO;
_private->mainClient = [[WebMainResourceClient alloc] initWithDataSource:self];
id identifier;
- identifier = [[_private->controller resourceLoadDelegate] identifierForInitialRequest:_private->originalRequest fromDataSource:self];
+ identifier = [[_private->controller resourceLoadDelegate] controller:_private->controller identifierForInitialRequest:_private->originalRequest fromDataSource:self];
[_private->mainClient setIdentifier: identifier];
[[self webFrame] _addExtraFieldsToRequest:_private->request alwaysFromRequest: NO];
if (![_private->mainClient loadWithRequest:_private->request]) {
@@ -311,7 +311,7 @@
// Must update the entries in the back-forward list too.
[_private->ourBackForwardItems makeObjectsPerformSelector:@selector(setTitle:) withObject:_private->pageTitle];
- [[_private->controller _locationChangeDelegateForwarder] receivedPageTitle:_private->pageTitle forDataSource:self];
+ [[_private->controller _locationChangeDelegateForwarder] controller: _private->controller receivedPageTitle:_private->pageTitle forDataSource:self];
}
}
@@ -337,7 +337,7 @@
// Only send serverRedirectedForDataSource: if URL changed.
if (![[oldRequest URL] isEqual: [request URL]]) {
LOG(Redirect, "Server redirect to: %@", [request URL]);
- [[_private->controller _locationChangeDelegateForwarder] serverRedirectedForDataSource:self];
+ [[_private->controller _locationChangeDelegateForwarder] controller: _private->controller serverRedirectedForDataSource:self];
}
[oldRequest release];
@@ -568,7 +568,7 @@
[iconDB _setIconURL:[iconURL absoluteString] forURL:[[[self _originalRequest] URL] absoluteString]];
NSImage *icon = [iconDB iconForURL:[[self _URL] absoluteString] withSize:WebIconSmallSize];
- [[_private->controller _locationChangeDelegateForwarder] receivedPageIcon:icon forDataSource:self];
+ [[_private->controller _locationChangeDelegateForwarder] controller: _private->controller receivedPageIcon:icon forDataSource:self];
}
- (void)iconLoader:(WebIconLoader *)iconLoader receivedPageIcon:(NSImage *)icon;
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 93b36a7..ed84253 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -94,7 +94,7 @@ static WebDefaultContextMenuDelegate *sharedDelegate = nil;
return [menuItem autorelease];
}
-- (NSArray *)contextMenuItemsForElement: (NSDictionary *)theElement defaultMenuItems: (NSArray *)defaultMenuItems
+- (NSArray *)controller:(WebController *)c contextMenuItemsForElement: (NSDictionary *)theElement defaultMenuItems: (NSArray *)defaultMenuItems
{
NSMutableArray *menuItems = [NSMutableArray array];
NSURL *linkURL, *imageURL;
diff --git a/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.m b/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.m
index fa665ad..4d9927c 100644
--- a/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.m
@@ -22,22 +22,22 @@ static WebDefaultLocationChangeDelegate *sharedDelegate = nil;
return sharedDelegate;
}
-- (void)locationChangeStartedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeStartedForDataSource:(WebDataSource *)dataSource { }
-- (void)serverRedirectedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller serverRedirectedForDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangeCommittedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeCommittedForDataSource:(WebDataSource *)dataSource { }
-- (void)receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource { }
-- (void)receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource { }
-- (void)willCloseLocationForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller willCloseLocationForDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangedWithinPageForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangedWithinPageForDataSource:(WebDataSource *)dataSource { }
-- (void)clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame { }
-- (void)clientRedirectCancelledForFrame:(WebFrame *)frame { }
+- (void)controller: (WebController *)controller clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame { }
+- (void)controller: (WebController *)controller clientRedirectCancelledForFrame:(WebFrame *)frame { }
@end
diff --git a/WebKit/WebView.subproj/WebDefaultLocationChangeDelegate.m b/WebKit/WebView.subproj/WebDefaultLocationChangeDelegate.m
index fa665ad..4d9927c 100644
--- a/WebKit/WebView.subproj/WebDefaultLocationChangeDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultLocationChangeDelegate.m
@@ -22,22 +22,22 @@ static WebDefaultLocationChangeDelegate *sharedDelegate = nil;
return sharedDelegate;
}
-- (void)locationChangeStartedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeStartedForDataSource:(WebDataSource *)dataSource { }
-- (void)serverRedirectedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller serverRedirectedForDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangeCommittedForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeCommittedForDataSource:(WebDataSource *)dataSource { }
-- (void)receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource { }
-- (void)receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource { }
-- (void)willCloseLocationForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller willCloseLocationForDataSource:(WebDataSource *)dataSource { }
-- (void)locationChangedWithinPageForDataSource:(WebDataSource *)dataSource { }
+- (void)controller: (WebController *)controller locationChangedWithinPageForDataSource:(WebDataSource *)dataSource { }
-- (void)clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame { }
-- (void)clientRedirectCancelledForFrame:(WebFrame *)frame { }
+- (void)controller: (WebController *)controller clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame { }
+- (void)controller: (WebController *)controller clientRedirectCancelledForFrame:(WebFrame *)frame { }
@end
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index f6421b4..07a58cf 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -27,13 +27,13 @@ static WebDefaultPolicyDelegate *sharedDelegate = nil;
return sharedDelegate;
}
-- (void)unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame
+- (void)controller:(WebController *)c unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame
{
ERROR("called unableToImplementPolicyWithError:%@ inFrame:%@", error, frame);
}
-- (void)decideContentPolicyForMIMEType:(NSString *)type
+- (void)controller:(WebController *)c decideContentPolicyForMIMEType:(NSString *)type
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(WebPolicyDecisionListener *)listener;
@@ -56,7 +56,7 @@ static WebDefaultPolicyDelegate *sharedDelegate = nil;
}
}
-- (void)decideNavigationPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNavigationPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(WebPolicyDecisionListener *)listener
@@ -73,7 +73,7 @@ static WebDefaultPolicyDelegate *sharedDelegate = nil;
}
}
-- (void)decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
newFrameName:(NSString *)frameName
decisionListener:(WebPolicyDecisionListener *)listener
diff --git a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
index 447c3eb..09c6e2f 100644
--- a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
@@ -27,33 +27,33 @@ static WebDefaultResourceLoadDelegate *sharedDelegate = nil;
return sharedDelegate;
}
-- identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource
+- controller:(WebController *)c identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource
{
return [[[NSObject alloc] init] autorelease];
}
--(WebRequest *)resource:identifier willSendRequest: (WebRequest *)newRequest fromDataSource:(WebDataSource *)dataSource
+-(WebRequest *)controller:(WebController *)c resource:identifier willSendRequest: (WebRequest *)newRequest fromDataSource:(WebDataSource *)dataSource
{
return newRequest;
}
--(void)resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource
+-(void)controller:(WebController *)c resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource
{
}
--(void)resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource
+-(void)controller:(WebController *)c resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource
{
}
--(void)resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource
+-(void)controller:(WebController *)c resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource
{
}
--(void)resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource
+-(void)controller:(WebController *)c resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource
{
}
-- (void)pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource
+- (void)controller:(WebController *)c pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource
{
}
diff --git a/WebKit/WebView.subproj/WebDefaultUIDelegate.m b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
index ae64c66..ba7ebee 100644
--- a/WebKit/WebView.subproj/WebDefaultUIDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
@@ -29,104 +29,104 @@ static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
}
-- (WebController *)createWindowWithRequest:(WebRequest *)request;
+- (WebController *)controller:(WebController *)c createWindowWithRequest:(WebRequest *)request;
{
return nil;
}
-- (void)showWindow;
+- (void)controllerShowWindow:(WebController *)c;
{
}
-- (void)showWindowBehindFrontmost;
+- (void)controllerShowWindowBehindFrontmost:(WebController *)c;
{
}
-- (void)closeWindow;
+- (void)controllerCloseWindow:(WebController *)c;
{
}
-- (void)focusWindow;
+- (void)controllerFocusWindow:(WebController *)c;
{
}
-- (void)unfocusWindow;
+- (void)controllerUnfocusWindow:(WebController *)c;
{
}
-- (NSResponder *)firstResponderInWindow;
+- (NSResponder *)controllerFirstResponderInWindow:(WebController *)c;
{
return nil;
}
-- (void)makeFirstResponderInWindow:(NSResponder *)responder;
+- (void)controller:(WebController *)c makeFirstResponderInWindow:(NSResponder *)responder;
{
}
-- (void)setStatusText:(NSString *)text;
+- (void)controller:(WebController *)c setStatusText:(NSString *)text;
{
}
-- (NSString *)statusText;
+- (NSString *)controllerStatusText:(WebController *)c;
{
return nil;
}
-- (void)mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)controller:(WebController *)c mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
{
}
-- (BOOL)areToolbarsVisible;
+- (BOOL)controllerAreToolbarsVisible:(WebController *)c;
{
return NO;
}
-- (void)setToolbarsVisible:(BOOL)visible;
+- (void)controller:(WebController *)c setToolbarsVisible:(BOOL)visible;
{
}
-- (BOOL)isStatusBarVisible;
+- (BOOL)controllerIsStatusBarVisible:(WebController *)c;
{
return NO;
}
-- (void)setStatusBarVisible:(BOOL)visible;
+- (void)controller:(WebController *)c setStatusBarVisible:(BOOL)visible;
{
}
-- (BOOL)isResizable;
+- (BOOL)controllerIsResizable:(WebController *)c;
{
return NO;
}
-- (void)setResizable:(BOOL)resizable;
+- (void)controller:(WebController *)c setResizable:(BOOL)resizable;
{
}
-- (void)setFrame:(NSRect)frame;
+- (void)controller:(WebController *)c setFrame:(NSRect)frame;
{
}
-- (NSRect)frame;
+- (NSRect)controllerFrame:(WebController *)c;
{
return NSMakeRect (0,0,0,0);
}
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+- (void)controller:(WebController *)c runJavaScriptAlertPanelWithMessage:(NSString *)message;
{
}
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
+- (BOOL)controller:(WebController *)c runJavaScriptConfirmPanelWithMessage:(NSString *)message
{
return NO;
}
-- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
+- (NSString *)controller:(WebController *)c runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
{
return nil;
}
-- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
+- (void)controller:(WebController *)c runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
{
}
diff --git a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
index ae64c66..ba7ebee 100644
--- a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
@@ -29,104 +29,104 @@ static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
}
-- (WebController *)createWindowWithRequest:(WebRequest *)request;
+- (WebController *)controller:(WebController *)c createWindowWithRequest:(WebRequest *)request;
{
return nil;
}
-- (void)showWindow;
+- (void)controllerShowWindow:(WebController *)c;
{
}
-- (void)showWindowBehindFrontmost;
+- (void)controllerShowWindowBehindFrontmost:(WebController *)c;
{
}
-- (void)closeWindow;
+- (void)controllerCloseWindow:(WebController *)c;
{
}
-- (void)focusWindow;
+- (void)controllerFocusWindow:(WebController *)c;
{
}
-- (void)unfocusWindow;
+- (void)controllerUnfocusWindow:(WebController *)c;
{
}
-- (NSResponder *)firstResponderInWindow;
+- (NSResponder *)controllerFirstResponderInWindow:(WebController *)c;
{
return nil;
}
-- (void)makeFirstResponderInWindow:(NSResponder *)responder;
+- (void)controller:(WebController *)c makeFirstResponderInWindow:(NSResponder *)responder;
{
}
-- (void)setStatusText:(NSString *)text;
+- (void)controller:(WebController *)c setStatusText:(NSString *)text;
{
}
-- (NSString *)statusText;
+- (NSString *)controllerStatusText:(WebController *)c;
{
return nil;
}
-- (void)mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)controller:(WebController *)c mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
{
}
-- (BOOL)areToolbarsVisible;
+- (BOOL)controllerAreToolbarsVisible:(WebController *)c;
{
return NO;
}
-- (void)setToolbarsVisible:(BOOL)visible;
+- (void)controller:(WebController *)c setToolbarsVisible:(BOOL)visible;
{
}
-- (BOOL)isStatusBarVisible;
+- (BOOL)controllerIsStatusBarVisible:(WebController *)c;
{
return NO;
}
-- (void)setStatusBarVisible:(BOOL)visible;
+- (void)controller:(WebController *)c setStatusBarVisible:(BOOL)visible;
{
}
-- (BOOL)isResizable;
+- (BOOL)controllerIsResizable:(WebController *)c;
{
return NO;
}
-- (void)setResizable:(BOOL)resizable;
+- (void)controller:(WebController *)c setResizable:(BOOL)resizable;
{
}
-- (void)setFrame:(NSRect)frame;
+- (void)controller:(WebController *)c setFrame:(NSRect)frame;
{
}
-- (NSRect)frame;
+- (NSRect)controllerFrame:(WebController *)c;
{
return NSMakeRect (0,0,0,0);
}
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+- (void)controller:(WebController *)c runJavaScriptAlertPanelWithMessage:(NSString *)message;
{
}
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
+- (BOOL)controller:(WebController *)c runJavaScriptConfirmPanelWithMessage:(NSString *)message
{
return NO;
}
-- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
+- (NSString *)controller:(WebController *)c runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
{
return nil;
}
-- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
+- (void)controller:(WebController *)c runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
{
}
diff --git a/WebKit/WebView.subproj/WebFrameLoadDelegate.h b/WebKit/WebView.subproj/WebFrameLoadDelegate.h
index d5db364..283639f 100644
--- a/WebKit/WebView.subproj/WebFrameLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebFrameLoadDelegate.h
@@ -7,8 +7,9 @@
#import <Foundation/Foundation.h>
- at class WebError;
+ at class WebController;
@class WebDataSource;
+ at class WebError;
@class WebFrame;
/*!
@@ -20,11 +21,12 @@
/*!
@method locationChangeStartedForDataSource:
@abstract Notify that a location change has started on a given data source
+ @param controller The WebController sending the message.
@param dataSource The data source for which the location change has started
@discussion You can find out the URL and other parameters of the location change
from the data source object.
*/
-- (void)locationChangeStartedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeStartedForDataSource:(WebDataSource *)dataSource;
/*!
@method serverRedirectedTo:forDataSource:
@@ -32,11 +34,12 @@
@param dataSource The data source for which the redirect occurred
@discussion You can find the new URL from the data source object.
*/
-- (void)serverRedirectedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller serverRedirectedForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeCommittedForDataSource:
@abstract Notify that a location change has been committed on a given data source
+ @param controller The WebController sending the message.
@param dataSource The data source for which the location change has started
@discussion When a location change starts, it is considered
"provisional" until at least one byte of the new page is
@@ -44,7 +47,7 @@
page fails to load completely.
*/
-- (void)locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageTitle:forDataSource:
@@ -53,51 +56,56 @@
@param dataSource The data source for which the title changed
@discussion The title may update during loading; clients should be prepared for this.
*/
-- (void)receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageIcon:forDataSource:
@abstract Notify that a page icon image is available or has changed
+ @param controller The WebController sending the message.
@param image The icon image
@param dataSource The data source for which a page icon is ready
@discussion It's possible the image will change, starting out as a
default or stored image and changing on a refresh.
*/
-- (void)receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeDone:forDataSource:
@abstract Notify that a location change is done (possibly with an error) for a data source
+ @param controller The WebController sending the message.
@param error The error, if one occurred, or nil if none
@param dataSource The data source that finished changing location
@discussion This callback will only be received when all
subresources are done loading.
*/
-- (void)locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
/*!
@method willCloseLocationForDataSource:
@abstract Notify that a location will be closed.
+ @param controller The WebController sending the message.
@param dataSource The data source that where the location change originally happened
@discussion This callback happens right before WebKit is done with the data source
and the document representation that it contains.
*/
-- (void)willCloseLocationForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller willCloseLocationForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangedWithinPageForDataSource:
@abstract Notify that a further location change within the page
has occurred for an already loaded data source
+ @param controller The WebController sending the message.
@param dataSource The data source that had a location change
@discussion This is normally used for clicks on anchors within a page
that is already displayed. You can find the new URL from the data source object.
*/
-- (void)locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
/*!
@method clientWillRedirectTo:delay:fireDate:forFrame:
@abstract Notify that the frame has received a client-side redirect that may trigger soon
+ @param controller The WebController sending the message.
@param URL The URL to be redirected to
@param seconds Seconds in which the redirect will happen
@param date The fire date
@@ -106,16 +114,17 @@
going while a client redirect is pending. A client redirect might
be cancelled before it fires - see clientRedirectCancelledForFrame.
*/
-- (void)clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
+- (void)controller: (WebController *)controller clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
/*!
@method clientRedirectCancelledForFrame:
@abstract Notify that a pending client redirect has been cancelled.
+ @param controller The WebController sending the message.
@param frame The frame for which the pending redirect was cancelled
@discussion A client redirect can be cancelled if the frame
changes locations before the timeout.
*/
-- (void)clientRedirectCancelledForFrame:(WebFrame *)frame;
+- (void)controller: (WebController *)controller clientRedirectCancelledForFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 9179319..bbdc4bd 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -14,6 +14,7 @@
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebDefaultWindowOperationsDelegate.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebFormDelegate.h>
@@ -388,7 +389,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
}
}
if (_private->dataSource) {
- [[[self controller] _locationChangeDelegateForwarder] willCloseLocationForDataSource:_private->dataSource];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller willCloseLocationForDataSource:_private->dataSource];
}
}
@@ -679,12 +680,12 @@ Repeat load of the same URL (by any other means of navigation other than the rel
// Tell the client we've committed this URL.
ASSERT([[self webView] documentView] != nil);
- [[[self controller] _locationChangeDelegateForwarder] locationChangeCommittedForDataSource:ds];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller locationChangeCommittedForDataSource:ds];
// If we have a title let the controller know about it.
if (ptitle) {
[entry setTitle:ptitle];
- [[[self controller] _locationChangeDelegateForwarder] receivedPageTitle:ptitle forDataSource:ds];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller receivedPageTitle:ptitle forDataSource:ds];
}
break;
}
@@ -862,7 +863,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
if (![pd isLoading]) {
LOG(Loading, "%@: checking complete in WebFrameStateProvisional, load done", [self name]);
- [[[self controller] _locationChangeDelegateForwarder] locationChangeDone:[pd _mainDocumentError] forDataSource:pd];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller locationChangeDone:[pd _mainDocumentError] forDataSource:pd];
// We know the provisional data source didn't cut the muster, release it.
[self _setProvisionalDataSource:nil];
@@ -941,7 +942,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
}
}
- [[[self controller] _locationChangeDelegateForwarder] locationChangeDone:[ds _mainDocumentError] forDataSource:ds];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller locationChangeDone:[ds _mainDocumentError] forDataSource:ds];
//if ([ds isDocumentHTML])
// [[ds representation] part]->closeURL();
@@ -1011,7 +1012,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
WebError *error = [WebError errorWithCode:code
inDomain:WebErrorDomainWebKit
failingURL:[URL absoluteString]];
- [[[self controller] _policyDelegateForwarder] unableToImplementPolicyWithError:error inFrame:self];
+ WebController *c;
+ [[c _policyDelegateForwarder] controller:c unableToImplementPolicyWithError:error inFrame:self];
}
- (void)_clearProvisionalDataSource
@@ -1073,7 +1075,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[_private setCurrentItem:item];
[self _restoreScrollPosition];
- [[[self controller] _locationChangeDelegateForwarder] locationChangedWithinPageForDataSource:_private->dataSource];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller locationChangedWithinPageForDataSource:_private->dataSource];
} else {
// Remember this item so we can traverse any child items as child frames load
[_private setProvisionalItem:item];
@@ -1327,7 +1329,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
_private->listener = [listener retain];
_private->policyFormState = [formState retain];
- [[[self controller] _policyDelegateForwarder] decideNewWindowPolicyForAction:action
+ WebController *c = [self controller];
+ [[c _policyDelegateForwarder] controller:c decideNewWindowPolicyForAction:action
andRequest:request
newFrameName:frameName
decisionListener:listener];
@@ -1398,7 +1401,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
_private->listener = [listener retain];
_private->policyFormState = [formState retain];
- [[[self controller] _policyDelegateForwarder] decideNavigationPolicyForAction:action
+ WebController *c = [self controller];
+ [[c _policyDelegateForwarder] controller:c decideNavigationPolicyForAction:action
andRequest:request
inFrame:self
decisionListener:listener];
@@ -1475,7 +1479,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[self _checkLoadComplete];
}
- [[[self controller] _locationChangeDelegateForwarder] locationChangedWithinPageForDataSource:dataSrc];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller locationChangedWithinPageForDataSource:dataSrc];
}
- (void)_addExtraFieldsToRequest:(WebRequest *)request alwaysFromRequest: (BOOL)f
@@ -1501,12 +1505,15 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
}
WebController *controller = nil;
- id wd = [[self controller] windowOperationsDelegate];
- if ([wd respondsToSelector:@selector(createWindowWithRequest:)])
- controller = [wd createWindowWithRequest:nil];
+ WebController *currentController = [self controller];
+ id wd = [currentController windowOperationsDelegate];
+ if ([wd respondsToSelector:@selector(controller:createWindowWithRequest:)])
+ controller = [wd controller:currentController createWindowWithRequest:nil];
+ else
+ controller = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:currentController createWindowWithRequest:nil];
[controller _setTopLevelFrameName:frameName];
- [[controller _windowOperationsDelegateForwarder] showWindow];
+ [[controller _windowOperationsDelegateForwarder] controllerShowWindow:controller];
WebFrame *frame = [controller mainFrame];
[frame _loadRequest:request triggeringAction:nil loadType:WebFrameLoadTypeStandard formState:formState];
@@ -1677,7 +1684,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
{
LOG(Redirect, "Client redirect to: %@", URL);
- [[[self controller] _locationChangeDelegateForwarder] clientWillRedirectTo:URL delay:seconds fireDate:date forFrame:self];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller clientWillRedirectTo:URL delay:seconds fireDate:date forFrame:self];
// If a "quick" redirect comes in an, we set a special mode so we treat the next
// load as part of the same navigation.
@@ -1692,7 +1699,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
- (void)_clientRedirectCancelled
{
- [[[self controller] _locationChangeDelegateForwarder] clientRedirectCancelledForFrame:self];
+ [[[self controller] _locationChangeDelegateForwarder] controller: _private->controller clientRedirectCancelledForFrame:self];
_private->quickRedirectComing = NO;
}
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index 559e247..559cbb3 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -139,17 +139,17 @@
if (identifier == nil) {
// The identifier is released after the last callback, rather than in dealloc
// to avoid potential cycles.
- if ([resourceLoadDelegate respondsToSelector: @selector(identifierForInitialRequest:fromDataSource:)])
- identifier = [[resourceLoadDelegate identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
+ if ([resourceLoadDelegate respondsToSelector: @selector(controller:identifierForInitialRequest:fromDataSource:)])
+ identifier = [[resourceLoadDelegate controller: controller identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
else
- identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
+ identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] controller:controller identifierForInitialRequest:newRequest fromDataSource:dataSource] retain];
}
if (resourceLoadDelegate) {
- if ([resourceLoadDelegate respondsToSelector: @selector(resource:willSendRequest:fromDataSource:)])
- newRequest = [resourceLoadDelegate resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ if ([resourceLoadDelegate respondsToSelector: @selector(controller:resource:willSendRequest:fromDataSource:)])
+ newRequest = [resourceLoadDelegate controller:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
else
- newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
+ newRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] controller:controller resource:identifier willSendRequest:newRequest fromDataSource:dataSource];
}
// Store a copy of the request.
@@ -185,7 +185,7 @@
response = r;
[dataSource _addResponse: r];
- [[controller _resourceLoadDelegateForwarder] resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
- (void)resource:(WebResource *)h didReceiveData:(NSData *)data
@@ -193,7 +193,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
- (void)resourceDidFinishLoading:(WebResource *)h
@@ -201,7 +201,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
ASSERT(currentURL);
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
@@ -214,7 +214,7 @@
ASSERT(resource == h);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
// currentURL may be nil if the request was aborted
if (currentURL)
@@ -234,7 +234,7 @@
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
if (error) {
- [[controller _resourceLoadDelegateForwarder] resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
+ [[controller _resourceLoadDelegateForwarder] controller:controller resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
}
[self _releaseResources];
diff --git a/WebKit/WebView.subproj/WebLocationChangeDelegate.h b/WebKit/WebView.subproj/WebLocationChangeDelegate.h
index d5db364..283639f 100644
--- a/WebKit/WebView.subproj/WebLocationChangeDelegate.h
+++ b/WebKit/WebView.subproj/WebLocationChangeDelegate.h
@@ -7,8 +7,9 @@
#import <Foundation/Foundation.h>
- at class WebError;
+ at class WebController;
@class WebDataSource;
+ at class WebError;
@class WebFrame;
/*!
@@ -20,11 +21,12 @@
/*!
@method locationChangeStartedForDataSource:
@abstract Notify that a location change has started on a given data source
+ @param controller The WebController sending the message.
@param dataSource The data source for which the location change has started
@discussion You can find out the URL and other parameters of the location change
from the data source object.
*/
-- (void)locationChangeStartedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeStartedForDataSource:(WebDataSource *)dataSource;
/*!
@method serverRedirectedTo:forDataSource:
@@ -32,11 +34,12 @@
@param dataSource The data source for which the redirect occurred
@discussion You can find the new URL from the data source object.
*/
-- (void)serverRedirectedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller serverRedirectedForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeCommittedForDataSource:
@abstract Notify that a location change has been committed on a given data source
+ @param controller The WebController sending the message.
@param dataSource The data source for which the location change has started
@discussion When a location change starts, it is considered
"provisional" until at least one byte of the new page is
@@ -44,7 +47,7 @@
page fails to load completely.
*/
-- (void)locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeCommittedForDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageTitle:forDataSource:
@@ -53,51 +56,56 @@
@param dataSource The data source for which the title changed
@discussion The title may update during loading; clients should be prepared for this.
*/
-- (void)receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller receivedPageTitle:(NSString *)title forDataSource:(WebDataSource *)dataSource;
/*!
@method receivedPageIcon:forDataSource:
@abstract Notify that a page icon image is available or has changed
+ @param controller The WebController sending the message.
@param image The icon image
@param dataSource The data source for which a page icon is ready
@discussion It's possible the image will change, starting out as a
default or stored image and changing on a refresh.
*/
-- (void)receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller receivedPageIcon:(NSImage *)image forDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangeDone:forDataSource:
@abstract Notify that a location change is done (possibly with an error) for a data source
+ @param controller The WebController sending the message.
@param error The error, if one occurred, or nil if none
@param dataSource The data source that finished changing location
@discussion This callback will only be received when all
subresources are done loading.
*/
-- (void)locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangeDone:(WebError *)error forDataSource:(WebDataSource *)dataSource;
/*!
@method willCloseLocationForDataSource:
@abstract Notify that a location will be closed.
+ @param controller The WebController sending the message.
@param dataSource The data source that where the location change originally happened
@discussion This callback happens right before WebKit is done with the data source
and the document representation that it contains.
*/
-- (void)willCloseLocationForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller willCloseLocationForDataSource:(WebDataSource *)dataSource;
/*!
@method locationChangedWithinPageForDataSource:
@abstract Notify that a further location change within the page
has occurred for an already loaded data source
+ @param controller The WebController sending the message.
@param dataSource The data source that had a location change
@discussion This is normally used for clicks on anchors within a page
that is already displayed. You can find the new URL from the data source object.
*/
-- (void)locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller locationChangedWithinPageForDataSource:(WebDataSource *)dataSource;
/*!
@method clientWillRedirectTo:delay:fireDate:forFrame:
@abstract Notify that the frame has received a client-side redirect that may trigger soon
+ @param controller The WebController sending the message.
@param URL The URL to be redirected to
@param seconds Seconds in which the redirect will happen
@param date The fire date
@@ -106,16 +114,17 @@
going while a client redirect is pending. A client redirect might
be cancelled before it fires - see clientRedirectCancelledForFrame.
*/
-- (void)clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
+- (void)controller: (WebController *)controller clientWillRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame;
/*!
@method clientRedirectCancelledForFrame:
@abstract Notify that a pending client redirect has been cancelled.
+ @param controller The WebController sending the message.
@param frame The frame for which the pending redirect was cancelled
@discussion A client redirect can be cancelled if the frame
changes locations before the timeout.
*/
-- (void)clientRedirectCancelledForFrame:(WebFrame *)frame;
+- (void)controller: (WebController *)controller clientRedirectCancelledForFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 2cd07c1..f8de7ea 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -28,7 +28,6 @@
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebLocationChangeDelegate.h>
-#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebResourceResponseExtras.h>
#import <WebKit/WebStandardPanelsPrivate.h>
#import <WebKit/WebView.h>
@@ -213,8 +212,9 @@
_initWithTarget:self action:@selector(continueAfterContentPolicy:)];
policyResponse = [r retain];
- [[dataSource _controller] setDefersCallbacks:YES];
- [[[dataSource _controller] _policyDelegateForwarder] decideContentPolicyForMIMEType:[r contentType]
+ WebController *c = [dataSource _controller];
+ [c setDefersCallbacks:YES];
+ [[c _policyDelegateForwarder] controller:c decideContentPolicyForMIMEType:[r contentType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]
decisionListener:listener];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 2cd07c1..f8de7ea 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -28,7 +28,6 @@
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebLocationChangeDelegate.h>
-#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebResourceResponseExtras.h>
#import <WebKit/WebStandardPanelsPrivate.h>
#import <WebKit/WebView.h>
@@ -213,8 +212,9 @@
_initWithTarget:self action:@selector(continueAfterContentPolicy:)];
policyResponse = [r retain];
- [[dataSource _controller] setDefersCallbacks:YES];
- [[[dataSource _controller] _policyDelegateForwarder] decideContentPolicyForMIMEType:[r contentType]
+ WebController *c = [dataSource _controller];
+ [c setDefersCallbacks:YES];
+ [[c _policyDelegateForwarder] controller:c decideContentPolicyForMIMEType:[r contentType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]
decisionListener:listener];
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index e08c4d1..46674eb 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
+ at class WebController;
@class WebError;
@class WebFrame;
@class WebPolicyPrivate;
@@ -69,7 +70,6 @@ extern NSString *WebActionOriginalURLKey; // NSURL
this method.
*/
-(void)use;
-
/*!
@method download
@abstract Download the resource instead of displaying it.
@@ -116,7 +116,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@discussion This method will be called before loading starts, and
on every redirect.
*/
-- (void)decideNavigationPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNavigationPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -137,7 +137,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
will be called with a WebNavigationType of WebNavigationTypeOther
in its action. This is to avoid possible confusion about the modifiers.
*/
-- (void)decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
+- (void)controller:(WebController *)c decideNewWindowPolicyForAction:(NSDictionary *)actionInformation
andRequest:(WebRequest *)request
newFrameName:(NSString *)frameName
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -150,7 +150,7 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@param frame The frame which is loading the URL.
@param listener The object to call when the decision is made
*/
-- (void)decideContentPolicyForMIMEType:(NSString *)type
+- (void)controller:(WebController *)c decideContentPolicyForMIMEType:(NSString *)type
andRequest:(WebRequest *)request
inFrame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -163,6 +163,6 @@ extern NSString *WebActionOriginalURLKey; // NSURL
@param URL The URL of the resource for which a particular action was requested but failed.
@param frame The frame in which the policy could not be implemented.
*/
-- (void)unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame;
+- (void)controller:(WebController *)c unableToImplementPolicyWithError:(WebError *)error inFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/WebView.subproj/WebResourceLoadDelegate.h b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
index 360ce8b..d78210e 100644
--- a/WebKit/WebView.subproj/WebResourceLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
@@ -4,6 +4,7 @@
Public header file.
*/
+ at class WebController;
@class WebDataSource;
@class WebPluginError;
@class WebResponse;
@@ -24,6 +25,9 @@
/*!
@method identifierForInitialRequest:fromDataSource:
+ @param controller The WebController sending the message.
+ @param request The request about to be sent.
+ @param dataSource The datasource that initiated the load.
@discussion An implementor of WebResourceLoadDelegate should provide an identifier
that can be used to track the load of a single resource. This identifier will be
passed as the first argument for all of the other WebResourceLoadDelegate methods. The
@@ -32,12 +36,13 @@
@result An identifier that will be passed back to the implementor for each callback.
The identifier will be retained.
*/
-- identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource;
+- controller: (WebController *)controller identifierForInitialRequest: (WebRequest *)request fromDataSource: (WebDataSource *)dataSource;
/*!
@method resource:willSendRequest:fromDataSource:
@discussion This message is sent before a load is initiated. The request may be modified
as necessary by the receiver.
+ @param controller The WebController sending the message.
@param identifier An identifier that can be used to track the progress of a resource load across
multiple call backs.
@param request The request about to be sent.
@@ -45,54 +50,59 @@
@result Returns the request, which may be mutated by the implementor, although typically
will be request.
*/
--(WebRequest *)resource:identifier willSendRequest: (WebRequest *)request fromDataSource:(WebDataSource *)dataSource;
+-(WebRequest *)controller: (WebController *)controller resource:identifier willSendRequest: (WebRequest *)request fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didReceiveResponse:fromDataSource:
@discussion This message is sent after a response has been received for this load.
+ @param controller The WebController sending the message.
@param identifier An identifier that can be used to track the progress of a resource load across
multiple call backs.
@param response The response for the request.
@param dataSource The dataSource that initiated the load.
*/
--(void)resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource;
+-(void)controller: (WebController *)controller resource:identifier didReceiveResponse: (WebResponse *)response fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didReceiveContentLength:fromDataSource:
@discussion Multiple of these messages may be sent as data arrives.
+ @param controller The WebController sending the message.
@param identifier An identifier that can be used to track the progress of a resource load across
multiple call backs.
@param length The amount of new data received. This is not the total amount, just the new amount received.
@param dataSource The dataSource that initiated the load.
*/
--(void)resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
+-(void)controller: (WebController *)controller resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didFinishLoadingFromDataSource:
@discussion This message is sent after a load has successfully completed.
+ @param controller The WebController sending the message.
@param identifier An identifier that can be used to track the progress of a resource load across
multiple call backs.
@param dataSource The dataSource that initiated the load.
*/
--(void)resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource;
+-(void)controller: (WebController *)controller resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource;
/*!
@method resource:didFailLoadingWithError:fromDataSource:
@discussion This message is sent after a load has failed to load due to an error.
+ @param controller The WebController sending the message.
@param identifier An identifier that can be used to track the progress of a resource load across
multiple call backs.
@param error The error associated with this load.
@param dataSource The dataSource that initiated the load.
*/
--(void)resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+-(void)controller: (WebController *)controller resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
/*!
@method pluginFailedWithError:dataSource:
@discussion Called when a plug-in is not found, fails to load or is not available for some reason.
+ @param controller The WebController sending the message.
@param error The plug-in error.
@param dataSource The dataSource that contains the plug-in.
*/
-- (void)pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource;
+- (void)controller: (WebController *)controller pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource;
@end
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index 31b0670..654ab1b 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -50,7 +50,7 @@
@param request The request to load.
@result The WebController for the WebView in the new window.
*/
-- (WebController *)createWindowWithRequest:(WebRequest *)request;
+- (WebController *)controller:(WebController *)controller createWindowWithRequest:(WebRequest *)request;
/*!
@method showWindow
@@ -59,7 +59,7 @@
@discussion This will only be called just after createWindowWithRequest:
is used to create a new window.
*/
-- (void)showWindow;
+- (void)controllerShowWindow:(WebController *)controller;
/*!
@method closeWindow
@@ -69,7 +69,7 @@
controller. Other clients may choose to ignore this method
entirely.
*/
-- (void)closeWindow;
+- (void)controllerCloseWindow:(WebController *)controller;
/*!
@method focusWindow
@@ -77,7 +77,7 @@
@discussion Clients showing multiple views in one window may want to
also do something to focus the one corresponding to this controller.
*/
-- (void)focusWindow;
+- (void)controllerFocusWindow:(WebController *)controller;
/*!
@method unfocusWindow
@@ -85,7 +85,7 @@
@discussion Clients showing multiple views in one window may want to
also do something to unfocus the one corresponding to this controller.
*/
-- (void)unfocusWindow;
+- (void)controllerUnfocusWindow:(WebController *)controller;
/*!
@method firstResponderInWindow
@@ -96,7 +96,7 @@
on the real NSWindow would. It's OK to return either nil or the
real first responder if some control not in the window has focus.
*/
-- (NSResponder *)firstResponderInWindow;
+- (NSResponder *)controllerFirstResponderInWindow:(WebController *)controller;
/*!
@method makeFirstResponderInWindow:
@@ -108,7 +108,7 @@
hierarchy, it may be desirable to save the first responder
elsewhere, or possibly ignore this call.
*/
-- (void)makeFirstResponderInWindow:(NSResponder *)responder;
+- (void)controller: (WebController *)controller makeFirstResponderInWindow:(NSResponder *)responder;
/*!
@@ -116,14 +116,14 @@
@abstract Set the window's status display, if any, to the specified string.
@param text The status text to set
*/
-- (void)setStatusText:(NSString *)text;
+- (void)controller: (WebController *)controller setStatusText:(NSString *)text;
/*!
@method statusText
@abstract Get the currently displayed status text.
@result The status text
*/
-- (NSString *)statusText;
+- (NSString *)controllerStatusText:(WebController *)controller ;
/*!
@method mouseDidMoveOverElement:modifierFlags:
@@ -132,7 +132,7 @@
@param elementInformation Dictionary that describes the element that the mouse is over, or nil.
@param modifierFlags The modifier flags as in NSEvent.
*/
-- (void)mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)controller: (WebController *)controller mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
/*!
@method areToolbarsVisible
@@ -144,7 +144,7 @@
this method if at least one is on.
@result YES if at least one toolbar is visible, otherwise NO.
*/
-- (BOOL)areToolbarsVisible;
+- (BOOL)controllerAreToolbarsVisible: (WebController *)controller;
/*!
@method setToolbarsVisible:
@@ -154,14 +154,14 @@
(except for a possible status bar). Setting it to NO should turn
off all toolbars (with the same exception).
*/
-- (void)setToolbarsVisible:(BOOL)visible;
+- (void)controller: (WebController *)controller setToolbarsVisible:(BOOL)visible;
/*!
@method isStatusBarVisible
@abstract Determine whether the status bar is visible.
@result YES if the status bar is visible, otherwise NO.
*/
-- (BOOL)isStatusBarVisible;
+- (BOOL)controllerIsStatusBarVisible: (WebController *)controller;
/*!
@method setStatusBarVisible:
@@ -170,7 +170,7 @@
@discussion Setting this to YES should show the status bar,
setting it to NO should hide it.
*/
-- (void)setStatusBarVisible:(BOOL)visible;
+- (void)controller: (WebController *)controller setStatusBarVisible:(BOOL)visible;
/*!
@method isResizable
@@ -180,7 +180,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (BOOL)isResizable;
+- (BOOL)controllerIsResizable: (WebController *)controller;
/*!
@method setResizable:
@@ -190,7 +190,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (void)setResizable:(BOOL)resizable;
+- (void)controller: (WebController *)controller setResizable:(BOOL)resizable;
/*!
@method setFrame:
@@ -200,14 +200,14 @@
this method is provided so implementors of this protocol can do special
things on programmatic move/resize, like avoiding autosaving of the size.
*/
-- (void)setFrame:(NSRect)frame;
+- (void)controller: (WebController *)controller setFrame:(NSRect)frame;
/*!
@method frame
@abstract REturn the window's frame rect
@discussion
*/
-- (NSRect)frame;
+- (NSRect)controllerFrame: (WebController *)controller;
/*!
@method runJavaScriptAlertPanelWithMessage:
@@ -216,7 +216,7 @@
@discussion Clients should visually indicate that this panel comes
from JavaScript. The panel should have a single OK button.
*/
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+- (void)controller: (WebController *)controller runJavaScriptAlertPanelWithMessage:(NSString *)message;
/*!
@method runJavaScriptAlertPanelWithMessage:
@@ -227,7 +227,7 @@
from JavaScript. The panel should have two buttons, e.g. "OK" and
"Cancel".
*/
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
+- (BOOL)controller: (WebController *)controller runJavaScriptConfirmPanelWithMessage:(NSString *)message;
/*!
@method runJavaScriptTextInputPanelWithPrompt:defaultText:
@@ -239,7 +239,7 @@
from JavaScript. The panel should have two buttons, e.g. "OK" and
"Cancel", and an area to type text.
*/
-- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
+- (NSString *)controller: (WebController *)controller runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
/*!
@message runOpenPanelForFileButtonWithResultListener:
@@ -248,6 +248,6 @@
@discussion This method is passed a callback object instead of giving a return
value so that it can be handled with a sheet.
*/
-- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
+- (void)controller: (WebController *)controller runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
@end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 37bb551..d2b9ec3 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -297,36 +297,31 @@
{
id wd = [self windowOperationsDelegate];
WebController *newWindowController = nil;
- if ([wd respondsToSelector:@selector(createWindowWithRequest:)])
- newWindowController = [wd createWindowWithRequest:request];
+ if ([wd respondsToSelector:@selector(controller:createWindowWithRequest:)])
+ newWindowController = [wd controller:self createWindowWithRequest:request];
else {
- [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] createWindowWithRequest: request];
+ newWindowController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] controller:self createWindowWithRequest: request];
}
- [[newWindowController _windowOperationsDelegateForwarder] showWindow];
+ [[newWindowController _windowOperationsDelegateForwarder] controllerShowWindow: self];
return newWindowController;
}
- (NSMenu *)_menuForElement:(NSDictionary *)element
{
- NSArray *defaultMenuItems = [_private->defaultContextMenuDelegate contextMenuItemsForElement:element
- defaultMenuItems:nil];
- NSArray *menuItems = nil;
+ NSArray *defaultMenuItems = [_private->defaultContextMenuDelegate
+ controller:self contextMenuItemsForElement:element defaultMenuItems:nil];
+ NSArray *menuItems = defaultMenuItems;
NSMenu *menu = nil;
unsigned i;
if (_private->contextMenuDelegate) {
id cd = _private->contextMenuDelegate;
- if ([cd respondsToSelector:@selector(contextMenuItemsForElement:defaultMenuItems:)])
- menuItems = [cd contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
- else
- menuItems = [[WebDefaultContextMenuDelegate sharedContextMenuDelegate] contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
+ if ([cd respondsToSelector:@selector(controller:contextMenuItemsForElement:defaultMenuItems:)])
+ menuItems = [cd controller:self contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
}
- else {
- menuItems = defaultMenuItems;
- }
if (menuItems && [menuItems count] > 0) {
menu = [[[NSMenu alloc] init] autorelease];
@@ -346,7 +341,7 @@
// for that case.
if (dictionary && _private->lastElementWasNonNil) {
- [[self _windowOperationsDelegateForwarder] mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
+ [[self _windowOperationsDelegateForwarder] controller:self mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
}
_private->lastElementWasNonNil = dictionary != nil;
}
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
index 31b0670..654ab1b 100644
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
@@ -50,7 +50,7 @@
@param request The request to load.
@result The WebController for the WebView in the new window.
*/
-- (WebController *)createWindowWithRequest:(WebRequest *)request;
+- (WebController *)controller:(WebController *)controller createWindowWithRequest:(WebRequest *)request;
/*!
@method showWindow
@@ -59,7 +59,7 @@
@discussion This will only be called just after createWindowWithRequest:
is used to create a new window.
*/
-- (void)showWindow;
+- (void)controllerShowWindow:(WebController *)controller;
/*!
@method closeWindow
@@ -69,7 +69,7 @@
controller. Other clients may choose to ignore this method
entirely.
*/
-- (void)closeWindow;
+- (void)controllerCloseWindow:(WebController *)controller;
/*!
@method focusWindow
@@ -77,7 +77,7 @@
@discussion Clients showing multiple views in one window may want to
also do something to focus the one corresponding to this controller.
*/
-- (void)focusWindow;
+- (void)controllerFocusWindow:(WebController *)controller;
/*!
@method unfocusWindow
@@ -85,7 +85,7 @@
@discussion Clients showing multiple views in one window may want to
also do something to unfocus the one corresponding to this controller.
*/
-- (void)unfocusWindow;
+- (void)controllerUnfocusWindow:(WebController *)controller;
/*!
@method firstResponderInWindow
@@ -96,7 +96,7 @@
on the real NSWindow would. It's OK to return either nil or the
real first responder if some control not in the window has focus.
*/
-- (NSResponder *)firstResponderInWindow;
+- (NSResponder *)controllerFirstResponderInWindow:(WebController *)controller;
/*!
@method makeFirstResponderInWindow:
@@ -108,7 +108,7 @@
hierarchy, it may be desirable to save the first responder
elsewhere, or possibly ignore this call.
*/
-- (void)makeFirstResponderInWindow:(NSResponder *)responder;
+- (void)controller: (WebController *)controller makeFirstResponderInWindow:(NSResponder *)responder;
/*!
@@ -116,14 +116,14 @@
@abstract Set the window's status display, if any, to the specified string.
@param text The status text to set
*/
-- (void)setStatusText:(NSString *)text;
+- (void)controller: (WebController *)controller setStatusText:(NSString *)text;
/*!
@method statusText
@abstract Get the currently displayed status text.
@result The status text
*/
-- (NSString *)statusText;
+- (NSString *)controllerStatusText:(WebController *)controller ;
/*!
@method mouseDidMoveOverElement:modifierFlags:
@@ -132,7 +132,7 @@
@param elementInformation Dictionary that describes the element that the mouse is over, or nil.
@param modifierFlags The modifier flags as in NSEvent.
*/
-- (void)mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)controller: (WebController *)controller mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
/*!
@method areToolbarsVisible
@@ -144,7 +144,7 @@
this method if at least one is on.
@result YES if at least one toolbar is visible, otherwise NO.
*/
-- (BOOL)areToolbarsVisible;
+- (BOOL)controllerAreToolbarsVisible: (WebController *)controller;
/*!
@method setToolbarsVisible:
@@ -154,14 +154,14 @@
(except for a possible status bar). Setting it to NO should turn
off all toolbars (with the same exception).
*/
-- (void)setToolbarsVisible:(BOOL)visible;
+- (void)controller: (WebController *)controller setToolbarsVisible:(BOOL)visible;
/*!
@method isStatusBarVisible
@abstract Determine whether the status bar is visible.
@result YES if the status bar is visible, otherwise NO.
*/
-- (BOOL)isStatusBarVisible;
+- (BOOL)controllerIsStatusBarVisible: (WebController *)controller;
/*!
@method setStatusBarVisible:
@@ -170,7 +170,7 @@
@discussion Setting this to YES should show the status bar,
setting it to NO should hide it.
*/
-- (void)setStatusBarVisible:(BOOL)visible;
+- (void)controller: (WebController *)controller setStatusBarVisible:(BOOL)visible;
/*!
@method isResizable
@@ -180,7 +180,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (BOOL)isResizable;
+- (BOOL)controllerIsResizable: (WebController *)controller;
/*!
@method setResizable:
@@ -190,7 +190,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (void)setResizable:(BOOL)resizable;
+- (void)controller: (WebController *)controller setResizable:(BOOL)resizable;
/*!
@method setFrame:
@@ -200,14 +200,14 @@
this method is provided so implementors of this protocol can do special
things on programmatic move/resize, like avoiding autosaving of the size.
*/
-- (void)setFrame:(NSRect)frame;
+- (void)controller: (WebController *)controller setFrame:(NSRect)frame;
/*!
@method frame
@abstract REturn the window's frame rect
@discussion
*/
-- (NSRect)frame;
+- (NSRect)controllerFrame: (WebController *)controller;
/*!
@method runJavaScriptAlertPanelWithMessage:
@@ -216,7 +216,7 @@
@discussion Clients should visually indicate that this panel comes
from JavaScript. The panel should have a single OK button.
*/
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+- (void)controller: (WebController *)controller runJavaScriptAlertPanelWithMessage:(NSString *)message;
/*!
@method runJavaScriptAlertPanelWithMessage:
@@ -227,7 +227,7 @@
from JavaScript. The panel should have two buttons, e.g. "OK" and
"Cancel".
*/
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
+- (BOOL)controller: (WebController *)controller runJavaScriptConfirmPanelWithMessage:(NSString *)message;
/*!
@method runJavaScriptTextInputPanelWithPrompt:defaultText:
@@ -239,7 +239,7 @@
from JavaScript. The panel should have two buttons, e.g. "OK" and
"Cancel", and an area to type text.
*/
-- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
+- (NSString *)controller: (WebController *)controller runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
/*!
@message runOpenPanelForFileButtonWithResultListener:
@@ -248,6 +248,6 @@
@discussion This method is passed a callback object instead of giving a return
value so that it can be handled with a sheet.
*/
-- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
+- (void)controller: (WebController *)controller runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list