[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:40:09 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a74bb87a8ee3e20d4e2f7e4d95f7ccd6e5d0a87a
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri May 2 17:39:09 2003 +0000
WebKit:
Reviewed by John.
- first step in fixing 3236383 -- http://www.xy.com/ exception, crash loading main page
Changed WebFrame to explicitly detach from the bridge so we don't have a stale pointer;
also cleaned up WebBridge initialization.
* WebCoreSupport.subproj/WebBridge.h: Added initWithWebFrame: and close methods, removed
setWebFrame: method.
* WebView.subproj/WebFrame.m:
(-[WebFrame initWithName:webFrameView:webView:]): Use the new initWithWebFrame:.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _detachFromParent]): Call close on the bridge.
- fixed many places that call a WebView a "controller"
* Misc.subproj/WebKitStatistics.h:
* Misc.subproj/WebKitStatistics.m:
* Misc.subproj/WebKitStatisticsPrivate.h:
* Misc.subproj/WebNSViewExtras.m:
* Plugins.subproj/WebBaseNetscapePluginView.h:
* Plugins.subproj/WebBaseNetscapePluginView.m:
* Plugins.subproj/WebNetscapePluginStream.m:
* WebCoreSupport.subproj/WebBridge.m:
* WebCoreSupport.subproj/WebSubresourceClient.m:
* WebView.subproj/WebBaseResourceHandleDelegate.h:
* WebView.subproj/WebBaseResourceHandleDelegate.m:
* WebView.subproj/WebControllerSets.h:
* WebView.subproj/WebControllerSets.m:
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
* WebView.subproj/WebDefaultContextMenuDelegate.m:
* WebView.subproj/WebFrame.m:
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFrameView.m:
* WebView.subproj/WebFrameViewPrivate.h:
* WebView.subproj/WebFrameViewPrivate.m:
* WebView.subproj/WebImageView.m:
* WebView.subproj/WebMainResourceClient.m:
* WebView.subproj/WebTextView.m:
* WebView.subproj/WebView.m:
* WebView.subproj/WebViewPrivate.h:
* WebView.subproj/WebViewPrivate.m:
WebBrowser:
Reviewed by John.
- fixed many places that call a WebView a "controller", including changing
the name BrowserWebController to BrowserWebView
* BrowserDocument.h:
* BrowserDocument.m:
* BrowserDocumentController.h:
* BrowserDocumentController.m:
* BrowserTabViewItem.m:
* BrowserWebBookmarkExtras.m:
* BrowserWebController.h:
* BrowserWebController.m:
* BrowserWebFrameExtras.h:
* BrowserWindowController.h:
* BrowserWindowController.m:
* ContextMenuHandler.m:
* Debug/DOMTree.h:
* Debug/DOMTree.m:
* Debug/DebugUtilities.m:
* Debug/RenderTree.h:
* Debug/RenderTree.m:
* Debug/ViewTree.h:
* Debug/ViewTree.m:
* English.lproj/StringsNotToBeLocalized.txt:
* FindPanelController.m:
* FormCompletionController.h:
* FormCompletionController.m:
* LoadProgressMonitor.h:
* LoadProgressMonitor.m:
* LocationChangeError.m:
* LocationChangeHandler.h:
* LocationChangeHandler.m:
* Test/PageLoadTestRunner.m:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1cee9ae..fcd15e1 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,49 @@
+2003-05-02 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - first step in fixing 3236383 -- http://www.xy.com/ exception, crash loading main page
+
+ Changed WebFrame to explicitly detach from the bridge so we don't have a stale pointer;
+ also cleaned up WebBridge initialization.
+
+ * WebCoreSupport.subproj/WebBridge.h: Added initWithWebFrame: and close methods, removed
+ setWebFrame: method.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame initWithName:webFrameView:webView:]): Use the new initWithWebFrame:.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _detachFromParent]): Call close on the bridge.
+
+ - fixed many places that call a WebView a "controller"
+
+ * Misc.subproj/WebKitStatistics.h:
+ * Misc.subproj/WebKitStatistics.m:
+ * Misc.subproj/WebKitStatisticsPrivate.h:
+ * Misc.subproj/WebNSViewExtras.m:
+ * Plugins.subproj/WebBaseNetscapePluginView.h:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ * Plugins.subproj/WebNetscapePluginStream.m:
+ * WebCoreSupport.subproj/WebBridge.m:
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ * WebView.subproj/WebBaseResourceHandleDelegate.h:
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ * WebView.subproj/WebControllerSets.h:
+ * WebView.subproj/WebControllerSets.m:
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ * WebView.subproj/WebFrame.m:
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFrameView.m:
+ * WebView.subproj/WebFrameViewPrivate.h:
+ * WebView.subproj/WebFrameViewPrivate.m:
+ * WebView.subproj/WebImageView.m:
+ * WebView.subproj/WebMainResourceClient.m:
+ * WebView.subproj/WebTextView.m:
+ * WebView.subproj/WebView.m:
+ * WebView.subproj/WebViewPrivate.h:
+ * WebView.subproj/WebViewPrivate.m:
+
2003-05-01 John Sullivan <sullivan at apple.com>
- fixed 3246045 -- History items without a valid date in
diff --git a/WebKit/Misc.subproj/WebKitStatistics.h b/WebKit/Misc.subproj/WebKitStatistics.h
index 0515ab5..3bfdf9a 100644
--- a/WebKit/Misc.subproj/WebKitStatistics.h
+++ b/WebKit/Misc.subproj/WebKitStatistics.h
@@ -12,7 +12,7 @@
{
}
-+ (int)controllerCount;
++ (int)webViewCount;
+ (int)frameCount;
+ (int)dataSourceCount;
diff --git a/WebKit/Misc.subproj/WebKitStatistics.m b/WebKit/Misc.subproj/WebKitStatistics.m
index 55be43d..ed2a11f 100644
--- a/WebKit/Misc.subproj/WebKitStatistics.m
+++ b/WebKit/Misc.subproj/WebKitStatistics.m
@@ -11,7 +11,7 @@
#import "WebKitStatisticsPrivate.h"
int WebBridgeCount;
-int WebControllerCount;
+int WebViewCount;
int WebDataSourceCount;
int WebFrameCount;
int WebHTMLRepresentationCount;
@@ -19,9 +19,9 @@ int WebFrameViewCount;
@implementation WebKitStatistics
-+ (int)controllerCount
++ (int)webViewCount
{
- return WebControllerCount;
+ return WebViewCount;
}
+ (int)frameCount
diff --git a/WebKit/Misc.subproj/WebKitStatisticsPrivate.h b/WebKit/Misc.subproj/WebKitStatisticsPrivate.h
index c4a0313..2c2ec0e 100644
--- a/WebKit/Misc.subproj/WebKitStatisticsPrivate.h
+++ b/WebKit/Misc.subproj/WebKitStatisticsPrivate.h
@@ -8,7 +8,7 @@
*/
extern int WebBridgeCount;
-extern int WebControllerCount;
+extern int WebViewCount;
extern int WebDataSourceCount;
extern int WebFrameCount;
extern int WebHTMLRepresentationCount;
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 590c40a..419ec51 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -19,7 +19,7 @@
@interface NSObject (Foo)
- (void*)_renderFramePart;
- (id)_frameForView: (id)aView;
-- (id)_controller;
+- (id)_webView;
@end
#endif
@@ -155,9 +155,9 @@
printf (" ");
f = [self frame];
- if ([self respondsToSelector: @selector(_controller)]){
- id aController = [self _controller];
- id aFrame = [aController _frameForView: self];
+ if ([self respondsToSelector: @selector(_webView)]){
+ id aWebView = [self _webView];
+ id aFrame = [aWebView _frameForView: self];
rfp = [aFrame _renderFramePart];
}
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
index 52c1dae..07a967f 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
@@ -61,7 +61,7 @@
- (WebFrame *)webFrame;
- (WebDataSource *)dataSource;
-- (WebView *)controller;
+- (WebView *)webView;
- (NSWindow *)currentWindow;
- (NPP)pluginPointer;
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 6745544..da0d4b1 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -303,9 +303,9 @@ typedef struct {
return NO;
}
- BOOL defers = [[self controller] defersCallbacks];
+ BOOL defers = [[self webView] defersCallbacks];
if (!defers) {
- [[self controller] setDefersCallbacks:YES];
+ [[self webView] setDefersCallbacks:YES];
}
PortState portState = [self saveAndSetPortStateForUpdate:event->what == updateEvt];
@@ -326,7 +326,7 @@ typedef struct {
[self restorePortState:portState];
if (!defers) {
- [[self controller] setDefersCallbacks:NO];
+ [[self webView] setDefersCallbacks:NO];
}
return acceptedEvent;
@@ -811,14 +811,14 @@ typedef struct {
return [[self dataSource] webFrame];
}
-- (WebView *)controller
+- (WebView *)webView
{
return [[self webFrame] webView];
}
- (NSWindow *)currentWindow
{
- return [self window] ? [self window] : [[self controller] hostWindow];
+ return [self window] ? [self window] : [[self webView] hostWindow];
}
- (NPP)pluginPointer
@@ -982,7 +982,7 @@ typedef struct {
[self removeWindowObservers];
if (!newWindow) {
- if ([[self controller] hostWindow]) {
+ if ([[self webView] hostWindow]) {
// View will be moved out of the actual window but it still has a host window.
[self stopNullEvents];
} else {
@@ -1001,7 +1001,7 @@ typedef struct {
[self start];
[self restartNullEvents];
[self addWindowObservers];
- } else if ([[self controller] hostWindow]) {
+ } else if ([[self webView] hostWindow]) {
// View moved out of an actual window, but still has a host window.
// Call setWindow to explicitly "clip out" the plug-in from sight.
// FIXME: It would be nice to do this where we call stopNullEvents in viewWillMoveToWindow.
@@ -1019,7 +1019,7 @@ typedef struct {
- (void)viewDidMoveToHostWindow
{
- if ([[self controller] hostWindow]) {
+ if ([[self webView] hostWindow]) {
// View now has an associated window. Start it if not already started.
[self start];
}
@@ -1065,7 +1065,7 @@ typedef struct {
- (void)preferencesHaveChanged:(NSNotification *)notification
{
- WebPreferences *preferences = [[self controller] preferences];
+ WebPreferences *preferences = [[self webView] preferences];
BOOL arePlugInsEnabled = [preferences arePlugInsEnabled];
if ([notification object] == preferences && isStarted != arePlugInsEnabled) {
@@ -1133,17 +1133,17 @@ typedef struct {
WebFrame *frame = [[self webFrame] findFrameNamed:frameName];
if (frame == nil) {
- WebView *newController = nil;
- WebView *currentController = [self controller];
- id wd = [currentController UIDelegate];
+ WebView *newWebView = nil;
+ WebView *currentWebView = [self webView];
+ id wd = [currentWebView UIDelegate];
if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
- newController = [wd webView:currentController createWebViewWithRequest:nil];
+ newWebView = [wd webView:currentWebView createWebViewWithRequest:nil];
else
- newController = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWebViewWithRequest:nil];
+ newWebView = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:nil];
- [newController _setTopLevelFrameName:frameName];
- [[newController _UIDelegateForwarder] webViewShow:newController];
- frame = [newController mainFrame];
+ [newWebView _setTopLevelFrameName:frameName];
+ [[newWebView _UIDelegateForwarder] webViewShow:newWebView];
+ frame = [newWebView mainFrame];
}
NSURL *URL = [request URL];
@@ -1348,7 +1348,7 @@ typedef struct {
- (const char *)userAgent
{
- return [[[self controller] userAgentForURL:baseURL] lossyCString];
+ return [[[self webView] userAgentForURL:baseURL] lossyCString];
}
-(void)status:(const char *)message
@@ -1360,7 +1360,7 @@ typedef struct {
NSString *status = (NSString *)CFStringCreateWithCString(NULL, message, kCFStringEncodingWindowsLatin1);
LOG(Plugins, "NPN_Status: %@", status);
- WebView *wv = [self controller];
+ WebView *wv = [self webView];
[[wv _UIDelegateForwarder] webView:wv setStatusText:status];
[status release];
}
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginStream.m b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
index 5bbd951..7dc5dd7 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
@@ -93,7 +93,7 @@
- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- [[view controller] _finishedLoadingResourceFromDataSource:[view dataSource]];
+ [[view webView] _finishedLoadingResourceFromDataSource:[view dataSource]];
[self finishedLoadingWithData:resourceData];
[view release];
@@ -104,7 +104,7 @@
- (void)connection:(NSURLConnection *)con didFailLoadingWithError:(NSError *)result
{
- [[view controller] _receivedError:result fromDataSource:[view dataSource]];
+ [[view webView] _receivedError:result fromDataSource:[view dataSource]];
[self receivedError:NPRES_NETWORK_ERR];
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index de84bbf..227038a 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -8,17 +8,20 @@
#import <WebCore/WebCoreBridge.h>
-#import <WebKit/WebDataSource.h>
-#import <WebKit/WebUIDelegate.h>
+ at class WebDataSource;
+ at class WebFrame;
+ at protocol WebOpenPanelResultListener;
@interface WebBridge : WebCoreBridge <WebCoreBridge>
{
- WebFrame *frame;
+ WebFrame *_frame;
BOOL _doingClientRedirect;
}
+- (id)initWithWebFrame:(WebFrame *)webFrame;
+- (void)close;
+
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
-- (void)setWebFrame:(WebFrame *)webFrame;
-- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
+- (void)runOpenPanelForFileButtonWithResultListener:(id <WebOpenPanelResultListener>)resultListener;
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index af74299..d9d1f21 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -58,15 +58,30 @@
@implementation WebBridge
-- init
+- (id)initWithWebFrame:(WebFrame *)webFrame
{
+ self = [super init];
+
++WebBridgeCount;
- return [super init];
+ WebView *webView = [webFrame webView];
+
+ // Non-retained because data source owns representation owns bridge.
+ // But WebFrame will call close on us before it goes away, which
+ // guarantees we will not have a stale reference.
+ _frame = webFrame;
+
+ [self setName:[webFrame name]];
+ [self initializeSettings:[webView _settings]];
+ [self setTextSizeMultiplier:[webView textSizeMultiplier]];
+
+ return self;
}
- (void)dealloc
{
+ ASSERT(_frame == nil);
+
--WebBridgeCount;
[super dealloc];
@@ -74,8 +89,8 @@
- (NSArray *)childFrames
{
- ASSERT(frame != nil);
- NSArray *frames = [frame childFrames];
+ ASSERT(_frame != nil);
+ NSArray *frames = [_frame childFrames];
NSEnumerator *e = [frames objectEnumerator];
NSMutableArray *frameBridges = [NSMutableArray arrayWithCapacity:[frames count]];
WebFrame *childFrame;
@@ -89,19 +104,19 @@
- (WebCoreBridge *)mainFrame
{
- ASSERT(frame != nil);
- return [[[frame webView] mainFrame] _bridge];
+ ASSERT(_frame != nil);
+ return [[[_frame webView] mainFrame] _bridge];
}
- (WebCoreBridge *)findFrameNamed:(NSString *)name;
{
- ASSERT(frame != nil);
- return [[frame findFrameNamed:name] _bridge];
+ ASSERT(_frame != nil);
+ return [[_frame findFrameNamed:name] _bridge];
}
- (WebCoreBridge *)createWindowWithURL:(NSString *)URL frameName:(NSString *)name
{
- ASSERT(frame != nil);
+ ASSERT(_frame != nil);
NSMutableURLRequest *request = nil;
@@ -110,163 +125,162 @@
[request setHTTPReferrer:[self referrer]];
}
- WebView *currentController = [frame webView];
- id wd = [currentController UIDelegate];
- WebView *newController = nil;
+ WebView *currentWebView = [_frame webView];
+ id wd = [currentWebView UIDelegate];
+ WebView *newWebView = nil;
if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
- newController = [wd webView:currentController createWebViewWithRequest:request];
+ newWebView = [wd webView:currentWebView createWebViewWithRequest:request];
else
- newController = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWebViewWithRequest:request];
- [newController _setTopLevelFrameName:name];
- return [[newController mainFrame] _bridge];
+ newWebView = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:request];
+ [newWebView _setTopLevelFrameName:name];
+ return [[newWebView mainFrame] _bridge];
}
- (void)showWindow
{
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webViewShow: c];
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webViewShow: wv];
}
- (BOOL)areToolbarsVisible
{
- ASSERT(frame != nil);
- WebView *c = [frame webView];
- id wd = [c UIDelegate];
+ ASSERT(_frame != nil);
+ WebView *wv = [_frame webView];
+ id wd = [wv UIDelegate];
if ([wd respondsToSelector: @selector(webViewAreToolbarsVisible:)])
- return [wd webViewAreToolbarsVisible: c];
- return [[WebDefaultUIDelegate sharedUIDelegate] webViewAreToolbarsVisible:c];
+ return [wd webViewAreToolbarsVisible: wv];
+ return [[WebDefaultUIDelegate sharedUIDelegate] webViewAreToolbarsVisible:wv];
}
- (void)setToolbarsVisible:(BOOL)visible
{
- ASSERT(frame != nil);
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webView:c setToolbarsVisible:visible];
+ ASSERT(_frame != nil);
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webView:wv setToolbarsVisible:visible];
}
- (BOOL)areScrollbarsVisible
{
- ASSERT(frame != nil);
- return [[frame frameView] allowsScrolling];
+ ASSERT(_frame != nil);
+ return [[_frame frameView] allowsScrolling];
}
- (void)setScrollbarsVisible:(BOOL)visible
{
- ASSERT(frame != nil);
- return [[frame frameView] setAllowsScrolling:visible];
+ ASSERT(_frame != nil);
+ return [[_frame frameView] setAllowsScrolling:visible];
}
- (BOOL)isStatusBarVisible
{
- ASSERT(frame != nil);
- WebView *c = [frame webView];
- id wd = [c UIDelegate];
+ ASSERT(_frame != nil);
+ WebView *wv = [_frame webView];
+ id wd = [wv UIDelegate];
if ([wd respondsToSelector: @selector(webViewIsStatusBarVisible:)])
- return [wd webViewIsStatusBarVisible:c];
- return [[WebDefaultUIDelegate sharedUIDelegate] webViewIsStatusBarVisible:c];
+ return [wd webViewIsStatusBarVisible:wv];
+ return [[WebDefaultUIDelegate sharedUIDelegate] webViewIsStatusBarVisible:wv];
}
- (void)setStatusBarVisible:(BOOL)visible
{
- ASSERT(frame != nil);
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webView:c setStatusBarVisible:visible];
+ ASSERT(_frame != nil);
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webView:wv setStatusBarVisible:visible];
}
- (void)setWindowFrame:(NSRect)frameRect
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
[[webView _UIDelegateForwarder] webView:webView setFrame:frameRect];
}
- (NSRect)windowFrame
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
return [[webView _UIDelegateForwarder] webViewFrame:webView];
}
- (void)setWindowContentRect:(NSRect)contentRect
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
[[webView _UIDelegateForwarder] webView:webView setFrame:contentRect];
}
- (NSRect)windowContentRect
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
return [[webView _UIDelegateForwarder] webViewContentRect:webView];
}
- (void)setWindowIsResizable:(BOOL)resizable
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
[[webView _UIDelegateForwarder] webView:webView setResizable:resizable];
}
- (BOOL)windowIsResizable
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
return [[webView _UIDelegateForwarder] webViewIsResizable:webView];
}
- (NSResponder *)firstResponder
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
return [[webView _UIDelegateForwarder] webViewFirstResponder:webView];
}
- (void)makeFirstResponder:(NSResponder *)view
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
[[webView _UIDelegateForwarder] webView:webView makeFirstResponder:view];
}
- (void)closeWindow
{
- ASSERT(frame != nil);
- WebView *webView = [frame webView];
+ ASSERT(_frame != nil);
+ WebView *webView = [_frame webView];
[[webView _UIDelegateForwarder] webViewClose:webView];
}
-
- (NSWindow *)window
{
- ASSERT(frame != nil);
- return [[frame frameView] window];
+ ASSERT(_frame != nil);
+ return [[_frame frameView] window];
}
- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message
{
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webView:c runJavaScriptAlertPanelWithMessage:message];
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webView:wv runJavaScriptAlertPanelWithMessage:message];
}
- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
{
- WebView *c = [frame webView];
- id wd = [c UIDelegate];
+ WebView *wv = [_frame webView];
+ id wd = [wv UIDelegate];
if ([wd respondsToSelector: @selector(webView:runJavaScriptConfirmPanelWithMessage:)])
- return [wd webView:c runJavaScriptConfirmPanelWithMessage:message];
- return [[WebDefaultUIDelegate sharedUIDelegate] webView:c runJavaScriptConfirmPanelWithMessage:message];
+ return [wd webView:wv runJavaScriptConfirmPanelWithMessage:message];
+ return [[WebDefaultUIDelegate sharedUIDelegate] webView:wv runJavaScriptConfirmPanelWithMessage:message];
}
- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
{
- WebView *c = [frame webView];
- id wd = [c UIDelegate];
+ WebView *wv = [_frame webView];
+ id wd = [wv UIDelegate];
if ([wd respondsToSelector: @selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:)])
- *result = [wd webView:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
+ *result = [wd webView:wv runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
else
- *result = [[WebDefaultUIDelegate sharedUIDelegate] webView:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
+ *result = [[WebDefaultUIDelegate sharedUIDelegate] webView:wv runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
return *result != nil;
}
@@ -277,15 +291,15 @@
- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
{
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webView:c runOpenPanelForFileButtonWithResultListener:resultListener];
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webView:wv runOpenPanelForFileButtonWithResultListener:resultListener];
}
- (WebDataSource *)dataSource
{
- ASSERT(frame != nil);
- WebDataSource *dataSource = [frame dataSource];
+ ASSERT(_frame != nil);
+ WebDataSource *dataSource = [_frame dataSource];
ASSERT(dataSource != nil);
ASSERT([dataSource _isCommitted]);
@@ -300,9 +314,9 @@
- (void)setStatusText:(NSString *)status
{
- ASSERT(frame != nil);
- WebView *c = [frame webView];
- [[c _UIDelegateForwarder] webView:c setStatusText:status];
+ ASSERT(_frame != nil);
+ WebView *wv = [_frame webView];
+ [[wv _UIDelegateForwarder] webView:wv setStatusText:status];
}
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
@@ -322,9 +336,9 @@
- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSString *)URL
{
- // If we are no longer attached to a controller, this must be an attempted load from an
+ // If we are no longer attached to a WebView, this must be an attempted load from an
// onUnload handler, so let's just block it.
- if ([[self dataSource] _controller] == nil) {
+ if ([[self dataSource] _webView] == nil) {
return nil;
}
@@ -336,38 +350,38 @@
- (void)objectLoadedFromCacheWithURL:(NSString *)URL response: response size:(unsigned)bytes
{
- ASSERT(frame != nil);
+ ASSERT(_frame != nil);
ASSERT(response != nil);
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL _web_URLWithString:URL]];
- WebView *c = [frame webView];
- id delegate = [c resourceLoadDelegate];
+ WebView *wv = [_frame webView];
+ id delegate = [wv resourceLoadDelegate];
id sharedDelegate = [WebDefaultResourceLoadDelegate sharedResourceLoadDelegate];
id identifier;
- WebResourceDelegateImplementationCache implementations = [c _resourceLoadDelegateImplementations];
+ WebResourceDelegateImplementationCache implementations = [wv _resourceLoadDelegateImplementations];
// No chance for delegate to modify request, so we don't send a willSendRequest:redirectResponse: message.
if (implementations.delegateImplementsIdentifierForRequest)
- identifier = [delegate webView:c identifierForInitialRequest: request fromDataSource: [self dataSource]];
+ identifier = [delegate webView:wv identifierForInitialRequest: request fromDataSource: [self dataSource]];
else
- identifier = [sharedDelegate webView:c identifierForInitialRequest:request fromDataSource:[self dataSource]];
+ identifier = [sharedDelegate webView:wv identifierForInitialRequest:request fromDataSource:[self dataSource]];
if (implementations.delegateImplementsDidReceiveResponse)
- [delegate webView:c resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
+ [delegate webView:wv resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
else
- [sharedDelegate webView:c resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
+ [sharedDelegate webView:wv resource: identifier didReceiveResponse: response fromDataSource: [self dataSource]];
if (implementations.delegateImplementsDidReceiveContentLength)
- [delegate webView:c resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
+ [delegate webView:wv resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
else
- [sharedDelegate webView:c resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
+ [sharedDelegate webView:wv resource: identifier didReceiveContentLength: bytes fromDataSource: [self dataSource]];
if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
- [delegate webView:c resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
+ [delegate webView:wv resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
else
- [sharedDelegate webView:c resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
+ [sharedDelegate webView:wv resource: identifier didFinishLoadingFromDataSource: [self dataSource]];
- [[frame webView] _finishedLoadingResourceFromDataSource:[self dataSource]];
+ [[_frame webView] _finishedLoadingResourceFromDataSource:[self dataSource]];
[request release];
}
@@ -379,30 +393,22 @@
- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory
{
- [frame _clientRedirectedTo:[NSURL _web_URLWithString:URL] delay:seconds fireDate:date lockHistory:lockHistory];
+ [_frame _clientRedirectedTo:[NSURL _web_URLWithString:URL] delay:seconds fireDate:date lockHistory:lockHistory];
}
- (void)reportClientRedirectCancelled
{
- [frame _clientRedirectCancelled];
+ [_frame _clientRedirectCancelled];
}
-- (void)setWebFrame:(WebFrame *)webFrame
+- (void)close
{
- ASSERT(webFrame != nil);
-
- if (frame == nil) {
- // Non-retained because data source owns representation owns bridge
- frame = webFrame;
- [self setTextSizeMultiplier:[[frame webView] textSizeMultiplier]];
- } else {
- ASSERT(frame == webFrame);
- }
+ _frame = nil;
}
- (void)focusWindow
{
- [[[frame webView] _UIDelegateForwarder] webViewFocus:[frame webView]];
+ [[[_frame webView] _UIDelegateForwarder] webViewFocus:[_frame webView]];
}
- (void)unfocusWindow
@@ -428,11 +434,11 @@
target = nil;
}
- WebFrame *targetFrame = [frame findFrameNamed:target];
+ WebFrame *targetFrame = [_frame findFrameNamed:target];
- [frame _loadURL:[NSURL _web_URLWithString:URL] referrer:referrer loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) target:target triggeringEvent:event form:form formValues:values];
+ [_frame _loadURL:[NSURL _web_URLWithString:URL] referrer:referrer loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) target:target triggeringEvent:event form:form formValues:values];
- if (targetFrame != nil && frame != targetFrame) {
+ if (targetFrame != nil && _frame != targetFrame) {
[[targetFrame _bridge] focusWindow];
}
}
@@ -443,26 +449,26 @@
target = nil;
}
- WebFrame *targetFrame = [frame findFrameNamed:target];
+ WebFrame *targetFrame = [_frame findFrameNamed:target];
- [frame _postWithURL:[NSURL _web_URLWithString:URL] referrer:(NSString *)referrer target:target data:data contentType:contentType triggeringEvent:event form:form formValues:values];
+ [_frame _postWithURL:[NSURL _web_URLWithString:URL] referrer:(NSString *)referrer target:target data:data contentType:contentType triggeringEvent:event form:form formValues:values];
- if (targetFrame != nil && frame != targetFrame) {
+ if (targetFrame != nil && _frame != targetFrame) {
[[targetFrame _bridge] focusWindow];
}
}
- (NSString *)generateFrameName
{
- return [frame _generateFrameName];
+ return [_frame _generateFrameName];
}
- (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSString *)URL
renderPart:(KHTMLRenderPart *)childRenderPart
allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
{
- ASSERT(frame != nil);
- WebFrame *newFrame = [[frame webView] _createFrameNamed:frameName inParent:frame allowsScrolling:allowsScrolling];
+ ASSERT(_frame != nil);
+ WebFrame *newFrame = [[_frame webView] _createFrameNamed:frameName inParent:_frame allowsScrolling:allowsScrolling];
if (newFrame == nil) {
return nil;
}
@@ -472,15 +478,15 @@
[[newFrame frameView] _setMarginWidth:width];
[[newFrame frameView] _setMarginHeight:height];
- [frame _loadURL:[NSURL _web_URLWithString:URL] intoChild:newFrame];
+ [_frame _loadURL:[NSURL _web_URLWithString:URL] intoChild:newFrame];
return [newFrame _bridge];
}
- (void)saveDocumentState: (NSArray *)documentState
{
- WebHistoryItem *item = [frame _itemForSavingDocState];
- LOG(Loading, "%@: saving form state from to 0x%x", [frame name], item);
+ WebHistoryItem *item = [_frame _itemForSavingDocState];
+ LOG(Loading, "%@: saving form state from to 0x%x", [_frame name], item);
if (item) {
[item setDocumentState: documentState];
// You might think we could save the scroll state here too, but unfortunately this
@@ -491,14 +497,14 @@
- (NSArray *)documentState
{
- LOG(Loading, "%@: restoring form state from item 0x%x", [frame name], [frame _itemForRestoringDocState]);
- return [[frame _itemForRestoringDocState] documentState];
+ LOG(Loading, "%@: restoring form state from item 0x%x", [_frame name], [_frame _itemForRestoringDocState]);
+ return [[_frame _itemForRestoringDocState] documentState];
}
- (BOOL)saveDocumentToPageCache: documentInfo
{
- WebHistoryItem *item = [frame _itemForSavingDocState];
- if (![item hasPageCache]){
+ WebHistoryItem *item = [_frame _itemForSavingDocState];
+ if (![item hasPageCache]) {
return false;
}
[[item pageCache] setObject: documentInfo forKey: @"WebCorePageState"];
@@ -507,12 +513,12 @@
- (NSString *)userAgentForURL:(NSString *)URL
{
- return [[frame webView] userAgentForURL:[NSURL _web_URLWithString:URL]];
+ return [[_frame webView] userAgentForURL:[NSURL _web_URLWithString:URL]];
}
- (NSView *)nextKeyViewOutsideWebFrameViews
{
- WebView *webView = [frame webView];
+ WebView *webView = [_frame webView];
NSView *nextKeyView = [webView nextKeyView];
if (nextKeyView) {
return nextKeyView;
@@ -523,7 +529,7 @@
- (NSView *)previousKeyViewOutsideWebFrameViews
{
- WebView *webView = [frame webView];
+ WebView *webView = [_frame webView];
NSView *previousKeyView = [webView previousKeyView];
if (previousKeyView) {
return previousKeyView;
@@ -534,17 +540,17 @@
- (BOOL)defersLoading
{
- return [[frame webView] defersCallbacks];
+ return [[_frame webView] defersCallbacks];
}
- (void)setDefersLoading:(BOOL)defers
{
- [[frame webView] setDefersCallbacks:defers];
+ [[_frame webView] setDefersCallbacks:defers];
}
- (void)setNeedsReapplyStyles
{
- NSView <WebDocumentView> *view = [[frame frameView] documentView];
+ NSView <WebDocumentView> *view = [[_frame frameView] documentView];
if ([view isKindOfClass:[WebHTMLView class]]) {
[(WebHTMLView *)view setNeedsToApplyStyles:YES];
[view setNeedsLayout:YES];
@@ -554,7 +560,7 @@
- (void)setNeedsLayout
{
- NSView <WebDocumentView> *view = [[frame frameView] documentView];
+ NSView <WebDocumentView> *view = [[_frame frameView] documentView];
[view setNeedsLayout:YES];
[view setNeedsDisplay:YES];
}
@@ -573,7 +579,7 @@
attributes:(NSDictionary *)attributes
baseURL:(NSURL *)baseURL
{
- WebHTMLView *docView = (WebHTMLView *)[[frame frameView] documentView];
+ WebHTMLView *docView = (WebHTMLView *)[[_frame frameView] documentView];
ASSERT ([docView isKindOfClass:[WebHTMLView class]]);
@@ -790,7 +796,7 @@ static BOOL loggedObjectCacheSize = NO;
{
NSURL *url = [[NSURL alloc] initWithString:@""];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
- [frame loadRequest:request];
+ [_frame loadRequest:request];
[request release];
[url release];
}
@@ -804,7 +810,7 @@ static BOOL loggedObjectCacheSize = NO;
- (void)handleMouseDragged:(NSEvent *)event
{
- WebHTMLView *docView = (WebHTMLView *)[[frame frameView] documentView];
+ WebHTMLView *docView = (WebHTMLView *)[[_frame frameView] documentView];
ASSERT ([docView isKindOfClass:[WebHTMLView class]]);
@@ -813,7 +819,7 @@ static BOOL loggedObjectCacheSize = NO;
- (void)handleAutoscrollForMouseDragged:(NSEvent *)event;
{
- WebHTMLView *docView = (WebHTMLView *)[[frame frameView] documentView];
+ WebHTMLView *docView = (WebHTMLView *)[[_frame frameView] documentView];
ASSERT ([docView isKindOfClass:[WebHTMLView class]]);
@@ -822,7 +828,7 @@ static BOOL loggedObjectCacheSize = NO;
- (BOOL)mayStartDragWithMouseDragged:(NSEvent *)event
{
- WebHTMLView *docView = (WebHTMLView *)[[frame frameView] documentView];
+ WebHTMLView *docView = (WebHTMLView *)[[_frame frameView] documentView];
ASSERT ([docView isKindOfClass:[WebHTMLView class]]);
@@ -831,7 +837,7 @@ static BOOL loggedObjectCacheSize = NO;
- (int)historyLength
{
- return [[[frame webView] backForwardList] backListCount];
+ return [[[_frame webView] backForwardList] backListCount];
}
- (void)goBackOrForward:(int)distance
@@ -839,8 +845,8 @@ static BOOL loggedObjectCacheSize = NO;
if (distance == 0) {
return;
}
- WebView *controller = [frame webView];
- WebBackForwardList *list = [controller backForwardList];
+ WebView *webView = [_frame webView];
+ WebBackForwardList *list = [webView backForwardList];
WebHistoryItem *item = [list itemAtIndex:distance];
if (!item) {
if (distance > 0) {
@@ -856,14 +862,14 @@ static BOOL loggedObjectCacheSize = NO;
}
}
if (item) {
- [controller goToBackForwardItem:item];
+ [webView goToBackForwardItem:item];
}
}
static id <WebFormDelegate> formDelegate(WebBridge *self)
{
- ASSERT(self->frame != nil);
- return [[self->frame webView] _formDelegate];
+ ASSERT(self->_frame != nil);
+ return [[self->_frame webView] _formDelegate];
}
#define FormDelegateLog(ctrl) LOG(FormDelegate, "control=%@", ctrl)
@@ -871,61 +877,61 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
- (void)controlTextDidBeginEditing:(NSNotification *)obj
{
FormDelegateLog([obj object]);
- [formDelegate(self) controlTextDidBeginEditing:obj inFrame:frame];
+ [formDelegate(self) controlTextDidBeginEditing:obj inFrame:_frame];
}
- (void)controlTextDidEndEditing:(NSNotification *)obj
{
FormDelegateLog([obj object]);
- [formDelegate(self) controlTextDidEndEditing:obj inFrame:frame];
+ [formDelegate(self) controlTextDidEndEditing:obj inFrame:_frame];
}
- (void)controlTextDidChange:(NSNotification *)obj
{
FormDelegateLog([obj object]);
- [formDelegate(self) controlTextDidChange:obj inFrame:frame];
+ [formDelegate(self) controlTextDidChange:obj inFrame:_frame];
}
- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor
{
FormDelegateLog(control);
- return [formDelegate(self) control:control textShouldBeginEditing:fieldEditor inFrame:frame];
+ return [formDelegate(self) control:control textShouldBeginEditing:fieldEditor inFrame:_frame];
}
- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
FormDelegateLog(control);
- return [formDelegate(self) control:control textShouldEndEditing:fieldEditor inFrame:frame];
+ return [formDelegate(self) control:control textShouldEndEditing:fieldEditor inFrame:_frame];
}
- (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error
{
FormDelegateLog(control);
- return [formDelegate(self) control:control didFailToFormatString:string errorDescription:error inFrame:frame];
+ return [formDelegate(self) control:control didFailToFormatString:string errorDescription:error inFrame:_frame];
}
- (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error
{
FormDelegateLog(control);
- [formDelegate(self) control:control didFailToValidatePartialString:string errorDescription:error inFrame:frame];
+ [formDelegate(self) control:control didFailToValidatePartialString:string errorDescription:error inFrame:_frame];
}
- (BOOL)control:(NSControl *)control isValidObject:(id)obj
{
FormDelegateLog(control);
- return [formDelegate(self) control:control isValidObject:obj inFrame:frame];
+ return [formDelegate(self) control:control isValidObject:obj inFrame:_frame];
}
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector
{
FormDelegateLog(control);
- return [formDelegate(self) control:control textView:textView doCommandBySelector:commandSelector inFrame:frame];
+ return [formDelegate(self) control:control textView:textView doCommandBySelector:commandSelector inFrame:_frame];
}
- (void)frameDetached
{
- [frame stopLoading];
- [[frame parentFrame] _removeChild:frame];
+ [_frame stopLoading];
+ [[_frame parentFrame] _removeChild:_frame];
}
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index c1ee7cd..95900bd 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -53,9 +53,9 @@
[newRequest setCachePolicy:[[source request] cachePolicy]];
[newRequest setHTTPReferrer:referrer];
- WebView *_controller = [source _controller];
- [newRequest setHTTPCookiePolicyBaseURL:[[[[_controller mainFrame] dataSource] request] URL]];
- [newRequest setHTTPUserAgent:[_controller userAgentForURL:URL]];
+ WebView *_webView = [source _webView];
+ [newRequest setHTTPCookiePolicyBaseURL:[[[[_webView mainFrame] dataSource] request] URL]];
+ [newRequest setHTTPUserAgent:[_webView userAgentForURL:URL]];
BOOL succeeded = [client loadWithRequest:newRequest];
[newRequest release];
@@ -68,7 +68,7 @@
NSError *badURLError = [[NSError alloc] _web_initWithDomain:NSURLErrorDomain
code:NSURLErrorBadURL
failingURL:[URL absoluteString]];
- [_controller _receivedError:badURLError fromDataSource:source];
+ [_webView _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
}
@@ -78,7 +78,7 @@
- (void)receivedError:(NSError *)error
{
- [[dataSource _controller] _receivedError:error fromDataSource:dataSource];
+ [[dataSource _webView] _receivedError:error fromDataSource:dataSource];
}
- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
@@ -116,7 +116,7 @@
[dataSource _removeSubresourceClient:self];
- [[dataSource _controller] _finishedLoadingResourceFromDataSource:dataSource];
+ [[dataSource _webView] _finishedLoadingResourceFromDataSource:dataSource];
[self release];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index c1ee7cd..95900bd 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -53,9 +53,9 @@
[newRequest setCachePolicy:[[source request] cachePolicy]];
[newRequest setHTTPReferrer:referrer];
- WebView *_controller = [source _controller];
- [newRequest setHTTPCookiePolicyBaseURL:[[[[_controller mainFrame] dataSource] request] URL]];
- [newRequest setHTTPUserAgent:[_controller userAgentForURL:URL]];
+ WebView *_webView = [source _webView];
+ [newRequest setHTTPCookiePolicyBaseURL:[[[[_webView mainFrame] dataSource] request] URL]];
+ [newRequest setHTTPUserAgent:[_webView userAgentForURL:URL]];
BOOL succeeded = [client loadWithRequest:newRequest];
[newRequest release];
@@ -68,7 +68,7 @@
NSError *badURLError = [[NSError alloc] _web_initWithDomain:NSURLErrorDomain
code:NSURLErrorBadURL
failingURL:[URL absoluteString]];
- [_controller _receivedError:badURLError fromDataSource:source];
+ [_webView _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
}
@@ -78,7 +78,7 @@
- (void)receivedError:(NSError *)error
{
- [[dataSource _controller] _receivedError:error fromDataSource:dataSource];
+ [[dataSource _webView] _receivedError:error fromDataSource:dataSource];
}
- (NSURLRequest *)connection:(NSURLConnection *)con willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
@@ -116,7 +116,7 @@
[dataSource _removeSubresourceClient:self];
- [[dataSource _controller] _finishedLoadingResourceFromDataSource:dataSource];
+ [[dataSource _webView] _finishedLoadingResourceFromDataSource:dataSource];
[self release];
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
index 0fb77c8..c1af140 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.h
@@ -24,7 +24,7 @@
NSURLConnection *connection;
NSURLRequest *request;
@private
- WebView *controller;
+ WebView *webView;
NSURLResponse *response;
id identifier;
id resourceLoadDelegate;
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index bafc32c..4ba8e9e 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -41,8 +41,8 @@
[connection release];
connection = nil;
- [controller release];
- controller = nil;
+ [webView release];
+ webView = nil;
[dataSource release];
dataSource = nil;
@@ -93,21 +93,21 @@
- (void)setDataSource:(WebDataSource *)d
{
ASSERT(d);
- ASSERT([d _controller]);
+ ASSERT([d _webView]);
[d retain];
[dataSource release];
dataSource = d;
- [controller release];
- controller = [[dataSource _controller] retain];
+ [webView release];
+ webView = [[dataSource _webView] retain];
[resourceLoadDelegate release];
- resourceLoadDelegate = [[controller resourceLoadDelegate] retain];
- implementations = [controller _resourceLoadDelegateImplementations];
+ resourceLoadDelegate = [[webView resourceLoadDelegate] retain];
+ implementations = [webView _resourceLoadDelegateImplementations];
[downloadDelegate release];
- downloadDelegate = [[controller downloadDelegate] retain];
+ downloadDelegate = [[webView downloadDelegate] retain];
}
- (WebDataSource *)dataSource
@@ -133,7 +133,7 @@
NSURLRequest *clientRequest, *updatedRequest;
BOOL haveDataSchemeRequest = NO;
- [mutableRequest setHTTPUserAgent:[controller userAgentForURL:[newRequest URL]]];
+ [mutableRequest setHTTPUserAgent:[webView userAgentForURL:[newRequest URL]]];
newRequest = [mutableRequest autorelease];
clientRequest = [newRequest _webDataRequestExternalRequest];
@@ -146,16 +146,16 @@
// The identifier is released after the last callback, rather than in dealloc
// to avoid potential cycles.
if (implementations.delegateImplementsIdentifierForRequest)
- identifier = [[resourceLoadDelegate webView: controller identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
+ identifier = [[resourceLoadDelegate webView: webView identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
else
- identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
+ identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
}
// If we have a special "applewebdata" scheme URL we send a fake request to the delegate.
if (implementations.delegateImplementsWillSendRequest)
- updatedRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
+ updatedRequest = [resourceLoadDelegate webView:webView resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
else
- updatedRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
+ updatedRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
if (!haveDataSchemeRequest)
newRequest = updatedRequest;
@@ -193,9 +193,9 @@
currentWebChallenge = [[WebAuthenticationChallenge alloc] _initWithAuthenticationChallenge:challenge delegate:self];
if (implementations.delegateImplementsDidReceiveAuthenticationChallenge) {
- [resourceLoadDelegate webView:controller resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
} else {
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
}
}
@@ -209,9 +209,9 @@
ASSERT(currentConnectionChallenge = challenge);
if (implementations.delegateImplementsDidCancelAuthenticationChallenge) {
- [resourceLoadDelegate webView:controller resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
} else {
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
}
}
@@ -268,9 +268,9 @@
[dataSource _addResponse: r];
if (implementations.delegateImplementsDidReceiveResponse)
- [resourceLoadDelegate webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveResponse:r fromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
@@ -279,9 +279,9 @@
ASSERT(!reachedTerminalState);
if (implementations.delegateImplementsDidReceiveContentLength)
- [resourceLoadDelegate webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
- (void)connectionDidFinishLoading:(NSURLConnection *)con
@@ -290,9 +290,9 @@
ASSERT(!reachedTerminalState);
if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
- [resourceLoadDelegate webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
[self _releaseResources];
}
@@ -302,7 +302,7 @@
ASSERT(con == connection);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
+ [[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
[self _releaseResources];
}
@@ -320,7 +320,7 @@
[connection cancel];
if (error) {
- [[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
+ [[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
}
[self _releaseResources];
diff --git a/WebKit/WebView.subproj/WebControllerSets.h b/WebKit/WebView.subproj/WebControllerSets.h
index fab573f..59a9fe7 100644
--- a/WebKit/WebView.subproj/WebControllerSets.h
+++ b/WebKit/WebView.subproj/WebControllerSets.h
@@ -8,10 +8,10 @@
@class WebView;
- at interface WebControllerSets : NSObject
-+(void)addController:(WebView *)controller toSetNamed:(NSString *)name;
-+(void)removeController:(WebView *)controller fromSetNamed:(NSString *)name;
-+(NSEnumerator *)controllersInSetNamed:(NSString *)name;
+ at interface WebViewSets : NSObject
++(void)addWebView:(WebView *)webView toSetNamed:(NSString *)name;
++(void)removeWebView:(WebView *)webView fromSetNamed:(NSString *)name;
++(NSEnumerator *)webViewsInSetNamed:(NSString *)name;
@end
diff --git a/WebKit/WebView.subproj/WebControllerSets.m b/WebKit/WebView.subproj/WebControllerSets.m
index 67e1b80..8a42f44 100644
--- a/WebKit/WebView.subproj/WebControllerSets.m
+++ b/WebKit/WebView.subproj/WebControllerSets.m
@@ -14,11 +14,11 @@ CFEqual,
CFHash
};
- at implementation WebControllerSets
+ at implementation WebViewSets
NSMutableDictionary *sets = nil;
-+(void)addController:(WebView *)controller toSetNamed: (NSString *)name
++(void)addWebView:(WebView *)webView toSetNamed: (NSString *)name
{
if (sets == nil) {
sets = [[NSMutableDictionary alloc] init];
@@ -33,10 +33,10 @@ NSMutableDictionary *sets = nil;
}
- CFSetSetValue(set, controller);
+ CFSetSetValue(set, webView);
}
-+(void)removeController:(WebView *)controller fromSetNamed: (NSString *)name
++(void)removeWebView:(WebView *)webView fromSetNamed: (NSString *)name
{
CFMutableSetRef set = (CFMutableSetRef)[sets objectForKey:name];
@@ -44,7 +44,7 @@ NSMutableDictionary *sets = nil;
return;
}
- CFSetRemoveValue(set, controller);
+ CFSetRemoveValue(set, webView);
if (CFSetGetCount(set) == 0) {
[sets removeObjectForKey:name];
@@ -52,7 +52,7 @@ NSMutableDictionary *sets = nil;
}
-+(NSEnumerator *)controllersInSetNamed:(NSString *)name;
++(NSEnumerator *)webViewsInSetNamed:(NSString *)name;
{
CFMutableSetRef set = (CFMutableSetRef)[sets objectForKey:name];
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 9da3548..ff768fb 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -27,7 +27,7 @@
id <WebDocumentRepresentation> representation;
- WebView *controller;
+ WebView *webView;
// A reference to actual request used to create the data source.
// This should only be used by the resourceLoadDelegate's
@@ -72,7 +72,7 @@
// Error associated with main document.
NSError *mainDocumentError;
- BOOL loading; // self and controller are retained while loading
+ BOOL loading; // self and webView are retained while loading
BOOL gotFirstByte; // got first byte
BOOL committed; // This data source has been committed
@@ -116,10 +116,10 @@
- (void)_startLoading;
- (void)_stopLoading;
- (NSURL *)_URL;
-- (WebView *)_controller;
+- (WebView *)_webView;
- (Class)_representationClass;
- (void)_setRepresentation:(id<WebDocumentRepresentation>)representation;
-- (void)_setController:(WebView *)controller;
+- (void)_setWebView:(WebView *)webView;
- (void)_startLoading: (NSDictionary *)pageCache;
- (void)_stopLoadingInternal;
- (BOOL)_isStopping;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index d4eeb87..98141ac 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -43,7 +43,7 @@
- (void)dealloc
{
- // controller is only retained while loading, but this object is also
+ // The WebView is only retained while loading, but this object is also
// retained while loading, so no need to release here
ASSERT(!loading);
@@ -76,9 +76,9 @@
@implementation WebDataSource (WebPrivate)
-- (WebView *)_controller
+- (WebView *)_webView
{
- return _private->controller;
+ return _private->webView;
}
- (void)_setRepresentation: (id<WebDocumentRepresentation>)representation
@@ -104,12 +104,12 @@
if (loading) {
[self retain];
- [_private->controller retain];
+ [_private->webView retain];
} else {
- [_private->controller release];
- // FIXME: It would be cleanest to set the controller to nil here. Keeping a non-retained reference
- // to the controller is dangerous. WebSubresourceClient actually depends on this non-retained reference
- // when starting loads after the data source has stoppped loading.
+ [_private->webView release];
+ // FIXME: It would be cleanest to set webView to nil here. Keeping a non-retained reference
+ // to the WebView is dangerous. But WebSubresourceClient actually depends on this non-retained
+ // reference when starting loads after the data source has stoppped loading.
[self release];
}
}
@@ -119,13 +119,13 @@
[self _setLoading:_private->mainClient || [_private->subresourceClients count]];
}
-- (void)_setController: (WebView *)controller
+- (void)_setWebView: (WebView *)webView
{
if (_private->loading) {
- [controller retain];
- [_private->controller release];
+ [webView retain];
+ [_private->webView release];
}
- _private->controller = controller;
+ _private->webView = webView;
[self _defersCallbacksChanged];
}
@@ -177,7 +177,7 @@
[self _setLoading:YES];
- [[_private->controller _frameLoadDelegateForwarder] webView:_private->controller
+ [[_private->webView _frameLoadDelegateForwarder] webView:_private->webView
didStartProvisionalLoadForFrame:[self webFrame]];
if (pageCache){
@@ -187,7 +187,7 @@
_private->loadingFromPageCache = NO;
_private->mainClient = [[WebMainResourceClient alloc] initWithDataSource:self];
id identifier;
- identifier = [[_private->controller resourceLoadDelegate] webView:_private->controller identifierForInitialRequest:_private->originalRequest fromDataSource:self];
+ identifier = [[_private->webView resourceLoadDelegate] webView:_private->webView identifierForInitialRequest:_private->originalRequest fromDataSource:self];
[_private->mainClient setIdentifier: identifier];
[[self webFrame] _addExtraFieldsToRequest:_private->request alwaysFromRequest: NO];
if (![_private->mainClient loadWithRequest:_private->request]) {
@@ -205,7 +205,7 @@
if (_private->subresourceClients == nil) {
_private->subresourceClients = [[NSMutableArray alloc] init];
}
- if ([_private->controller defersCallbacks]) {
+ if ([_private->webView defersCallbacks]) {
[client setDefersCallbacks:YES];
}
[_private->subresourceClients addObject:client];
@@ -257,8 +257,8 @@
{
[self retain];
- // We depend on the controller in webFrame and we release it in _stopLoading,
- // so call webFrame first so we don't send a message the released controller (3129503).
+ // We depend on the WebView in the webFrame method and we release it in _stopLoading,
+ // so call webFrame first so we don't send a message the released WebView (3129503).
[[[self webFrame] childFrames] makeObjectsPerformSelector:@selector(stopLoading)];
[self _stopLoadingInternal];
@@ -294,7 +294,7 @@
[_private->pageTitle release];
_private->pageTitle = [trimmed copy];
- // The title doesn't get communicated to the controller until we are committed.
+ // The title doesn't get communicated to the WebView until we are committed.
if (_private->committed) {
WebHistoryItem *entry;
NSURL *canonURL = [[[self _originalRequest] URL] _web_canonicalize];
@@ -304,7 +304,7 @@
// Must update the entries in the back-forward list too.
[_private->ourBackForwardItems makeObjectsPerformSelector:@selector(setTitle:) withObject:_private->pageTitle];
- [[_private->controller _frameLoadDelegateForwarder] webView:_private->controller
+ [[_private->webView _frameLoadDelegateForwarder] webView:_private->webView
didReceiveTitle:_private->pageTitle
forFrame:[self webFrame]];
}
@@ -340,7 +340,7 @@
// Only send webView:didReceiveServerRedirectForProvisionalLoadForFrame: if URL changed.
if (![[oldRequest URL] isEqual: [request URL]]) {
LOG(Redirect, "Server redirect to: %@", [request URL]);
- [[_private->controller _frameLoadDelegateForwarder] webView:_private->controller
+ [[_private->webView _frameLoadDelegateForwarder] webView:_private->webView
didReceiveServerRedirectForProvisionalLoadForFrame:[self webFrame]];
}
@@ -582,7 +582,7 @@
if (!_private->committed) {
[[[self webFrame] _bridge] didNotOpenURL:[[_private->originalRequestCopy URL] absoluteString]];
}
- [[self _controller] _mainReceivedError:error
+ [[self _webView] _mainReceivedError:error
fromDataSource:self
complete:isComplete];
}
@@ -596,7 +596,7 @@
[iconDB _setIconURL:[iconURL absoluteString] forURL:[[[self _originalRequest] URL] absoluteString]];
NSImage *icon = [iconDB iconForURL:[[self _URL] absoluteString] withSize:WebIconSmallSize];
- [[_private->controller _frameLoadDelegateForwarder] webView:_private->controller
+ [[_private->webView _frameLoadDelegateForwarder] webView:_private->webView
didReceiveIcon:icon
forFrame:[self webFrame]];
}
@@ -608,7 +608,7 @@
- (void)_loadIcon
{
- if([self webFrame] != [[self _controller] mainFrame] || _private->mainDocumentError || _private->iconLoader){
+ if([self webFrame] != [[self _webView] mainFrame] || _private->mainDocumentError || _private->iconLoader){
return;
}
@@ -652,7 +652,7 @@
- (void)_defersCallbacksChanged
{
- BOOL defers = [_private->controller defersCallbacks];
+ BOOL defers = [_private->webView defersCallbacks];
if (defers == _private->defersCallbacks) {
return;
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 1cf3494..1eaa7cf 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -121,7 +121,7 @@
- (void)openNewWindowWithURL:(NSURL *)URL
{
WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
- WebView *controller = [webFrame webView];
+ WebView *webView = [webFrame webView];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
NSString *referrer = [[webFrame _bridge] referrer];
@@ -129,14 +129,14 @@
[request setHTTPReferrer:referrer];
}
- [controller _openNewWindowWithRequest:request];
+ [webView _openNewWindowWithRequest:request];
}
- (void)downloadURL:(NSURL *)URL
{
WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
- WebView *controller = [webFrame webView];
- [controller _downloadURL:URL];
+ WebView *webView = [webFrame webView];
+ [webView _downloadURL:URL];
}
- (void)openLinkInNewWindow:(id)sender
diff --git a/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.h b/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.h
index 8d10c02..db249c1 100644
--- a/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultFrameLoadDelegate.h
@@ -8,7 +8,7 @@
/*!
@class WebDefaultFrameLoadDelegate
- @discussion WebDefaultPolicyDelegate will be used as a WebController's
+ @discussion WebDefaultPolicyDelegate will be used as a WebView's
default policy delegate. It can be subclassed to modify policies.
*/
@interface WebDefaultFrameLoadDelegate : NSObject
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
index 4b1c743..47bd372 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.h
@@ -8,7 +8,7 @@
/*!
@class WebDefaultPolicyDelegate
- @discussion WebDefaultPolicyDelegate will be used as a WebController's
+ @discussion WebDefaultPolicyDelegate will be used as a WebView's
default policy delegate. It can be subclassed to modify policies.
*/
@interface WebDefaultPolicyDelegate : NSObject
diff --git a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.h b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.h
index 007fdae..3126efd 100644
--- a/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.h
@@ -8,7 +8,7 @@
/*!
@class WebDefaultResourceLoadDelegate
- @discussion WebDefaultPolicyDelegate will be used as a WebController's
+ @discussion WebDefaultPolicyDelegate will be used as a WebView's
default policy delegate. It can be subclassed to modify policies.
*/
@interface WebDefaultResourceLoadDelegate : NSObject
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 08d817d..724c3a1 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -30,27 +30,23 @@
- init
{
- return [self initWithName: nil webFrameView: nil webView: nil];
+ return [self initWithName:nil webFrameView:nil webView:nil];
}
-- initWithName: (NSString *)n webFrameView: (WebFrameView *)v webView: (WebView *)c
+- initWithName:(NSString *)n webFrameView:(WebFrameView *)fv webView:(WebView *)v
{
[super init];
_private = [[WebFramePrivate alloc] init];
- [self setController:c];
-
- _private->bridge = [[WebBridge alloc] init];
- [_private->bridge initializeSettings: [c _settings]];
- [_private->bridge setWebFrame:self];
- [_private->bridge setName:n];
-
+ [self _setWebView:v];
[self _setName:n];
+
+ _private->bridge = [[WebBridge alloc] initWithWebFrame:self];
- if (v) {
- [_private setWebFrameView: v];
- [v _setController: [self webView]];
+ if (fv) {
+ [_private setWebFrameView:fv];
+ [fv _setWebView:v];
}
++WebFrameCount;
@@ -79,7 +75,7 @@
- (WebView *)webView
{
- return [_private controller];
+ return [_private webView];
}
@@ -201,8 +197,8 @@
// Search from this frame down.
WebFrame *frame = [self _descendantFrameNamed:name];
- if(!frame){
- // Search in this controller then in other controllers.
+ if (!frame) {
+ // Search in this WebView then in others.
frame = [[self webView] _findFrameNamed:name];
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 8d0c807..a217d65 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -58,7 +58,7 @@ typedef enum {
WebDataSource *dataSource;
WebDataSource *provisionalDataSource;
WebBridge *bridge;
- WebView *controller;
+ WebView *webView;
WebFrameState state;
NSTimer *scheduledLayoutTimer;
WebFrameLoadType loadType;
@@ -83,8 +83,8 @@ typedef enum {
- (void)setName:(NSString *)name;
- (NSString *)name;
-- (void)setController:(WebView *)c;
-- (WebView *)controller;
+- (void)setWebView:(WebView *)wv;
+- (WebView *)webView;
- (void)setWebFrameView:(WebFrameView *)v;
- (WebFrameView *)webFrameView;
- (void)setDataSource:(WebDataSource *)d;
@@ -104,12 +104,11 @@ typedef enum {
@end
@interface WebFrame (WebPrivate)
-- (void)setController: (WebView *)controller;
+- (void)_setWebView: (WebView *)webView;
- (void)_setName:(NSString *)name;
- (WebFrame *)_descendantFrameNamed:(NSString *)name;
- (void)_detachFromParent;
- (void)_closeOldDataSources;
-- (void)_setController: (WebView *)controller;
- (void)_setDataSource: (WebDataSource *)d;
- (void)_transitionToCommitted: (NSDictionary *)pageCache;
- (void)_transitionToLayoutAcceptable;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 66d85e3..1e78b78 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -27,6 +27,7 @@
#import <WebKit/WebKitErrorsPrivate.h>
#import <WebKit/WebPolicyDelegatePrivate.h>
#import <WebKit/WebPreferencesPrivate.h>
+#import <WebKit/WebUIDelegate.h>
#import <WebKit/WebViewPrivate.h>
#import <WebFoundation/WebNSErrorExtras.h>
@@ -152,9 +153,9 @@ Repeat load of the same URL (by any other means of navigation other than the rel
- (void)dealloc
{
- [webFrameView _setController:nil];
- [dataSource _setController:nil];
- [provisionalDataSource _setController:nil];
+ [webFrameView _setWebView:nil];
+ [dataSource _setWebView:nil];
+ [provisionalDataSource _setWebView:nil];
[name release];
[webFrameView release];
@@ -201,10 +202,10 @@ Repeat load of the same URL (by any other means of navigation other than the rel
dataSource = d;
}
-- (WebView *)controller { return controller; }
-- (void)setController: (WebView *)c
+- (WebView *)webView { return webView; }
+- (void)setWebView: (WebView *)wv
{
- controller = c; // not retained (yet)
+ webView = wv; // not retained (yet)
}
- (WebDataSource *)provisionalDataSource { return provisionalDataSource; }
@@ -249,11 +250,11 @@ Repeat load of the same URL (by any other means of navigation other than the rel
@implementation WebFrame (WebPrivate)
-- (void)setController: (WebView *)controller
+- (void)_setWebView:(WebView *)v
{
- // To set controller to nil, we have to use _detachFromParent, not this.
- ASSERT(controller);
- [_private setController: controller];
+ // To set to nil, we have to use _detachFromParent, not this.
+ ASSERT(v);
+ [_private setWebView:v];
}
// helper method used in various nav cases below
@@ -383,7 +384,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
}
}
if (_private->dataSource) {
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller willCloseFrame:self];
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView willCloseFrame:self];
}
}
@@ -399,10 +400,10 @@ Repeat load of the same URL (by any other means of navigation other than the rel
[self _detachChildren];
- [_private setController:nil];
- [_private->webFrameView _setController:nil];
- [_private->dataSource _setController:nil];
- [_private->provisionalDataSource _setController:nil];
+ [_private setWebView:nil];
+ [_private->webFrameView _setWebView:nil];
+ [_private->dataSource _setWebView:nil];
+ [_private->provisionalDataSource _setWebView:nil];
[self _setDataSource:nil];
[_private setWebFrameView:nil];
@@ -411,14 +412,11 @@ Repeat load of the same URL (by any other means of navigation other than the rel
[_private->scheduledLayoutTimer release];
_private->scheduledLayoutTimer = nil;
+ [bridge close];
+
[bridge release];
}
-- (void)_setController: (WebView *)controller
-{
- [_private setController:controller];
-}
-
- (void)_setDataSource:(WebDataSource *)ds
{
if (ds == nil && _private->dataSource == nil) {
@@ -457,7 +455,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
}
[_private setDataSource:ds];
- [ds _setController:[self webView]];
+ [ds _setWebView:[self webView]];
[ds _setWebFrame:self];
}
@@ -701,12 +699,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 frameView] documentView] != nil);
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller didCommitLoadForFrame:self];
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView didCommitLoadForFrame:self];
- // If we have a title let the controller know about it.
+ // If we have a title let the WebView know about it.
if (ptitle) {
[entry setTitle:ptitle];
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didReceiveTitle:ptitle
forFrame:self];
}
@@ -888,7 +886,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
if (![pd isLoading]) {
LOG(Loading, "%@: checking complete in WebFrameStateProvisional, load done", [self name]);
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didFailProvisionalLoadWithError:[pd _mainDocumentError]
forFrame:self];
@@ -970,11 +968,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
}
if ([ds _mainDocumentError]) {
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didFailLoadWithError:[ds _mainDocumentError]
forFrame:self];
} else {
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didFinishLoadForFrame:self];
}
@@ -1042,8 +1040,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
- (void)_handleUnimplementablePolicyWithErrorCode:(int)code forURL:(NSURL *)URL
{
NSError *error = [NSError _webKitErrorWithCode:code failingURL:[URL absoluteString]];
- WebView *c = [self webView];
- [[c _policyDelegateForwarder] webView:c unableToImplementPolicyWithError:error frame:self];
+ WebView *wv = [self webView];
+ [[wv _policyDelegateForwarder] webView:wv unableToImplementPolicyWithError:error frame:self];
}
- (void)_clearProvisionalDataSource
@@ -1125,7 +1123,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[[self dataSource] __setRequest: [[hackedRequest copy] autorelease]];
[hackedRequest release];
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didChangeLocationWithinPageForFrame:self];
} else {
// Remember this item so we can traverse any child items as child frames load
@@ -1384,8 +1382,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
_private->listener = [listener retain];
_private->policyFormState = [formState retain];
- WebView *c = [self webView];
- [[c _policyDelegateForwarder] webView:c decidePolicyForNewWindowAction:action
+ WebView *wv = [self webView];
+ [[wv _policyDelegateForwarder] webView:wv decidePolicyForNewWindowAction:action
request:request
newFrameName:frameName
decisionListener:listener];
@@ -1456,8 +1454,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
_private->listener = [listener retain];
_private->policyFormState = [formState retain];
- WebView *c = [self webView];
- [[c _policyDelegateForwarder] webView:c decidePolicyForNavigationAction:action
+ WebView *wv = [self webView];
+ [[wv _policyDelegateForwarder] webView:wv decidePolicyForNavigationAction:action
request:request
frame:self
decisionListener:listener];
@@ -1534,7 +1532,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[self _checkLoadComplete];
}
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didChangeLocationWithinPageForFrame:self];
}
@@ -1560,17 +1558,17 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
return;
}
- WebView *controller = nil;
- WebView *currentController = [self webView];
- id wd = [currentController UIDelegate];
+ WebView *webView = nil;
+ WebView *currentWebView = [self webView];
+ id wd = [currentWebView UIDelegate];
if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
- controller = [wd webView:currentController createWebViewWithRequest:nil];
+ webView = [wd webView:currentWebView createWebViewWithRequest:nil];
else
- controller = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWebViewWithRequest:nil];
+ webView = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:nil];
- [controller _setTopLevelFrameName:frameName];
- [[controller _UIDelegateForwarder] webViewShow:controller];
- WebFrame *frame = [controller mainFrame];
+ [webView _setTopLevelFrameName:frameName];
+ [[webView _UIDelegateForwarder] webViewShow:webView];
+ WebFrame *frame = [webView mainFrame];
[frame _loadRequest:request triggeringAction:nil loadType:WebFrameLoadTypeStandard formState:formState];
}
@@ -1747,7 +1745,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
{
LOG(Redirect, "Client redirect to: %@", URL);
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
willPerformClientRedirectToURL:URL
delay:seconds
fireDate:date
@@ -1766,7 +1764,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
- (void)_clientRedirectCancelled
{
- [[[self webView] _frameLoadDelegateForwarder] webView:_private->controller
+ [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
didCancelClientRedirectForFrame:self];
_private->quickRedirectComing = NO;
}
@@ -1972,7 +1970,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
}
// We tell the documentView provisionalDataSourceChanged:
- // once it has been created by the controller.
+ // once it has been created by the WebView.
[self _setState: WebFrameStateProvisional];
@@ -2019,7 +2017,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
if (parentFrame) {
[newDataSource _setOverrideEncoding:[[parentFrame dataSource] _overrideEncoding]];
}
- [newDataSource _setController:[self webView]];
+ [newDataSource _setWebView:[self webView]];
[newDataSource _setJustOpenedForTargetedLink:_private->justOpenedForTargetedLink];
_private->justOpenedForTargetedLink = NO;
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 90f4838..966162c 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -71,7 +71,7 @@ enum {
- (WebFrame *)webFrame
{
- return [[self _controller] _frameForView: self];
+ return [[self _webView] _frameForView: self];
}
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 1add609..cdbb0e1 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -10,7 +10,7 @@
@interface WebFrameViewPrivate : NSObject
{
@public
- WebView *controller;
+ WebView *webView;
WebDynamicScrollBarsView *frameScrollView;
// These margin values are used to temporarily hold
@@ -27,10 +27,10 @@
@end
@interface WebFrameView (WebPrivate)
-- (WebView *)_controller;
+- (WebView *)_webView;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
-- (void)_setController:(WebView *)controller;
+- (void)_setWebView:(WebView *)webView;
- (int)_marginWidth;
- (int)_marginHeight;
- (void)_setMarginWidth:(int)w;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 1add609..cdbb0e1 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -10,7 +10,7 @@
@interface WebFrameViewPrivate : NSObject
{
@public
- WebView *controller;
+ WebView *webView;
WebDynamicScrollBarsView *frameScrollView;
// These margin values are used to temporarily hold
@@ -27,10 +27,10 @@
@end
@interface WebFrameView (WebPrivate)
-- (WebView *)_controller;
+- (WebView *)_webView;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
-- (void)_setController:(WebView *)controller;
+- (void)_setWebView:(WebView *)webView;
- (int)_marginWidth;
- (int)_marginHeight;
- (void)_setMarginWidth:(int)w;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 771b4f2..db2acad 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -38,10 +38,10 @@
@implementation WebFrameView (WebPrivate)
-// Note that the controller is not retained.
-- (WebView *)_controller
+// Note that the WebVew is not retained.
+- (WebView *)_webView
{
- return _private->controller;
+ return _private->webView;
}
@@ -92,10 +92,10 @@
return documentView;
}
-- (void)_setController: (WebView *)controller
+- (void)_setWebView:(WebView *)webView
{
- // Not retained; the controller owns the view, indirectly through the frame tree.
- _private->controller = controller;
+ // Not retained because the WebView owns the WebFrame, which owns the WebFrameView.
+ _private->webView = webView;
}
- (NSScrollView *)_scrollView
@@ -301,17 +301,17 @@ static NSMutableDictionary *viewTypes;
- (void)_goBack
{
- [_private->controller goBack];
+ [_private->webView goBack];
}
- (void)_goForward
{
- [_private->controller goForward];
+ [_private->webView goForward];
}
- (BOOL)_isMainFrame
{
- return [_private->controller mainFrame] == [self webFrame];
+ return [_private->webView mainFrame] == [self webFrame];
}
@end
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index b717b0e..8848ef9 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -96,9 +96,9 @@
[super viewDidMoveToWindow];
}
-- (WebView *)controller
+- (WebView *)webView
{
- return [[self _web_parentWebFrameView] _controller];
+ return [[self _web_parentWebFrameView] _webView];
}
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
@@ -143,11 +143,11 @@
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
WebFrameView *webFrameView = [self _web_parentWebFrameView];
- WebView *controller = [webFrameView _controller];
+ WebView *webView = [webFrameView _webView];
WebFrame *frame = [webFrameView webFrame];
ASSERT(frame);
- ASSERT(controller);
+ ASSERT(webView);
NSDictionary *element = [NSDictionary dictionaryWithObjectsAndKeys:
[representation image], WebElementImageKey,
@@ -156,13 +156,13 @@
[NSNumber numberWithBool:NO], WebElementIsSelectedKey,
frame, WebElementFrameKey, nil];
- return [controller _menuForElement:element];
+ return [webView _menuForElement:element];
}
- (void)mouseDragged:(NSEvent *)event
{
// Don't allow drags to be accepted by this WebFrameView.
- [[[self _web_parentWebFrameView] _controller] unregisterDraggedTypes];
+ [[[self _web_parentWebFrameView] _webView] unregisterDraggedTypes];
// Retain this view during the drag because it may be released before the drag ends.
[self retain];
@@ -178,7 +178,7 @@
- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
{
NSURL *URL = [representation URL];
- [[self controller] _downloadURL:URL toDirectory:[dropDestination path]];
+ [[self webView] _downloadURL:URL toDirectory:[dropDestination path]];
// FIXME: The file is supposed to be created at this point so the Finder places the file
// where the drag ended. Since we can't create the file until the download starts,
@@ -192,7 +192,7 @@
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
{
// Reregister for drag types because they were unregistered before the drag.
- [[[self _web_parentWebFrameView] _controller] _registerDraggedTypes];
+ [[[self _web_parentWebFrameView] _webView] _registerDraggedTypes];
// Balance the previous retain from when the drag started.
[self release];
diff --git a/WebKit/WebView.subproj/WebLoader.h b/WebKit/WebView.subproj/WebLoader.h
index 0fb77c8..c1af140 100644
--- a/WebKit/WebView.subproj/WebLoader.h
+++ b/WebKit/WebView.subproj/WebLoader.h
@@ -24,7 +24,7 @@
NSURLConnection *connection;
NSURLRequest *request;
@private
- WebView *controller;
+ WebView *webView;
NSURLResponse *response;
id identifier;
id resourceLoadDelegate;
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index bafc32c..4ba8e9e 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -41,8 +41,8 @@
[connection release];
connection = nil;
- [controller release];
- controller = nil;
+ [webView release];
+ webView = nil;
[dataSource release];
dataSource = nil;
@@ -93,21 +93,21 @@
- (void)setDataSource:(WebDataSource *)d
{
ASSERT(d);
- ASSERT([d _controller]);
+ ASSERT([d _webView]);
[d retain];
[dataSource release];
dataSource = d;
- [controller release];
- controller = [[dataSource _controller] retain];
+ [webView release];
+ webView = [[dataSource _webView] retain];
[resourceLoadDelegate release];
- resourceLoadDelegate = [[controller resourceLoadDelegate] retain];
- implementations = [controller _resourceLoadDelegateImplementations];
+ resourceLoadDelegate = [[webView resourceLoadDelegate] retain];
+ implementations = [webView _resourceLoadDelegateImplementations];
[downloadDelegate release];
- downloadDelegate = [[controller downloadDelegate] retain];
+ downloadDelegate = [[webView downloadDelegate] retain];
}
- (WebDataSource *)dataSource
@@ -133,7 +133,7 @@
NSURLRequest *clientRequest, *updatedRequest;
BOOL haveDataSchemeRequest = NO;
- [mutableRequest setHTTPUserAgent:[controller userAgentForURL:[newRequest URL]]];
+ [mutableRequest setHTTPUserAgent:[webView userAgentForURL:[newRequest URL]]];
newRequest = [mutableRequest autorelease];
clientRequest = [newRequest _webDataRequestExternalRequest];
@@ -146,16 +146,16 @@
// The identifier is released after the last callback, rather than in dealloc
// to avoid potential cycles.
if (implementations.delegateImplementsIdentifierForRequest)
- identifier = [[resourceLoadDelegate webView: controller identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
+ identifier = [[resourceLoadDelegate webView: webView identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
else
- identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
+ identifier = [[[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView identifierForInitialRequest:clientRequest fromDataSource:dataSource] retain];
}
// If we have a special "applewebdata" scheme URL we send a fake request to the delegate.
if (implementations.delegateImplementsWillSendRequest)
- updatedRequest = [resourceLoadDelegate webView:controller resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
+ updatedRequest = [resourceLoadDelegate webView:webView resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
else
- updatedRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
+ updatedRequest = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier willSendRequest:clientRequest redirectResponse:redirectResponse fromDataSource:dataSource];
if (!haveDataSchemeRequest)
newRequest = updatedRequest;
@@ -193,9 +193,9 @@
currentWebChallenge = [[WebAuthenticationChallenge alloc] _initWithAuthenticationChallenge:challenge delegate:self];
if (implementations.delegateImplementsDidReceiveAuthenticationChallenge) {
- [resourceLoadDelegate webView:controller resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
} else {
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
}
}
@@ -209,9 +209,9 @@
ASSERT(currentConnectionChallenge = challenge);
if (implementations.delegateImplementsDidCancelAuthenticationChallenge) {
- [resourceLoadDelegate webView:controller resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
} else {
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didCancelAuthenticationChallenge:currentWebChallenge fromDataSource:dataSource];
}
}
@@ -268,9 +268,9 @@
[dataSource _addResponse: r];
if (implementations.delegateImplementsDidReceiveResponse)
- [resourceLoadDelegate webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveResponse:r fromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveResponse:r fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveResponse:r fromDataSource:dataSource];
}
- (void)connection:(NSURLConnection *)con didReceiveData:(NSData *)data
@@ -279,9 +279,9 @@
ASSERT(!reachedTerminalState);
if (implementations.delegateImplementsDidReceiveContentLength)
- [resourceLoadDelegate webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:[data length] fromDataSource:dataSource];
}
- (void)connectionDidFinishLoading:(NSURLConnection *)con
@@ -290,9 +290,9 @@
ASSERT(!reachedTerminalState);
if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
- [resourceLoadDelegate webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [resourceLoadDelegate webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
else
- [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:controller resource:identifier didFinishLoadingFromDataSource:dataSource];
+ [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
[self _releaseResources];
}
@@ -302,7 +302,7 @@
ASSERT(con == connection);
ASSERT(!reachedTerminalState);
- [[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
+ [[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
[self _releaseResources];
}
@@ -320,7 +320,7 @@
[connection cancel];
if (error) {
- [[controller _resourceLoadDelegateForwarder] webView:controller resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
+ [[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:error fromDataSource:dataSource];
}
[self _releaseResources];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index a6bf0ed..7ef7d45 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -94,7 +94,7 @@
-(void)continueAfterNavigationPolicy:(NSURLRequest *)_request formState:(WebFormState *)state
{
- [[dataSource _controller] setDefersCallbacks:NO];
+ [[dataSource _webView] setDefersCallbacks:NO];
if (!_request) {
[self stopLoadingForPolicyChange];
}
@@ -115,7 +115,7 @@
NSMutableURLRequest *mutableRequest = nil;
// Update cookie policy base URL as URL changes, except for subframes, which use the
// URL of the main frame which doesn't change when we redirect.
- if ([dataSource webFrame] == [[dataSource _controller] mainFrame]) {
+ if ([dataSource webFrame] == [[dataSource _webView] mainFrame]) {
mutableRequest = [newRequest mutableCopy];
[mutableRequest setHTTPCookiePolicyBaseURL:URL];
}
@@ -145,7 +145,7 @@
// when the main load was started.
[dataSource _setRequest:newRequest];
- [[dataSource _controller] setDefersCallbacks:YES];
+ [[dataSource _webView] setDefersCallbacks:YES];
[[dataSource webFrame] _checkNavigationPolicyForRequest:newRequest
dataSource:dataSource
formState:nil
@@ -157,7 +157,7 @@
-(void)continueAfterContentPolicy:(WebPolicyAction)contentPolicy response:(NSURLResponse *)r
{
- [[dataSource _controller] setDefersCallbacks:NO];
+ [[dataSource _webView] setDefersCallbacks:NO];
switch (contentPolicy) {
case WebPolicyUse:
@@ -209,9 +209,9 @@
_initWithTarget:self action:@selector(continueAfterContentPolicy:)];
policyResponse = [r retain];
- WebView *c = [dataSource _controller];
- [c setDefersCallbacks:YES];
- [[c _policyDelegateForwarder] webView:c decidePolicyForMIMEType:[r MIMEType]
+ WebView *wv = [dataSource _webView];
+ [wv setDefersCallbacks:YES];
+ [[wv _policyDelegateForwarder] webView:wv decidePolicyForMIMEType:[r MIMEType]
request:[dataSource request]
frame:[dataSource webFrame]
decisionListener:listener];
@@ -222,7 +222,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "main content type: %@", [r MIMEType]);
@@ -239,12 +239,12 @@
ASSERT([data length] != 0);
ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@, data = %p, length %d", [dataSource _URL], data, [data length]);
[dataSource _receivedData:data];
- [[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
+ [[dataSource _webView] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:NO];
@@ -258,7 +258,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@", [dataSource _URL]);
@@ -266,7 +266,7 @@
[self retain];
[dataSource _finishedLoading];
- [[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
+ [[dataSource _webView] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
[super connectionDidFinishLoading:con];
@@ -278,7 +278,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@, error = %@", [error _web_failingURL], [error _web_localizedDescription]);
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index a6bf0ed..7ef7d45 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -94,7 +94,7 @@
-(void)continueAfterNavigationPolicy:(NSURLRequest *)_request formState:(WebFormState *)state
{
- [[dataSource _controller] setDefersCallbacks:NO];
+ [[dataSource _webView] setDefersCallbacks:NO];
if (!_request) {
[self stopLoadingForPolicyChange];
}
@@ -115,7 +115,7 @@
NSMutableURLRequest *mutableRequest = nil;
// Update cookie policy base URL as URL changes, except for subframes, which use the
// URL of the main frame which doesn't change when we redirect.
- if ([dataSource webFrame] == [[dataSource _controller] mainFrame]) {
+ if ([dataSource webFrame] == [[dataSource _webView] mainFrame]) {
mutableRequest = [newRequest mutableCopy];
[mutableRequest setHTTPCookiePolicyBaseURL:URL];
}
@@ -145,7 +145,7 @@
// when the main load was started.
[dataSource _setRequest:newRequest];
- [[dataSource _controller] setDefersCallbacks:YES];
+ [[dataSource _webView] setDefersCallbacks:YES];
[[dataSource webFrame] _checkNavigationPolicyForRequest:newRequest
dataSource:dataSource
formState:nil
@@ -157,7 +157,7 @@
-(void)continueAfterContentPolicy:(WebPolicyAction)contentPolicy response:(NSURLResponse *)r
{
- [[dataSource _controller] setDefersCallbacks:NO];
+ [[dataSource _webView] setDefersCallbacks:NO];
switch (contentPolicy) {
case WebPolicyUse:
@@ -209,9 +209,9 @@
_initWithTarget:self action:@selector(continueAfterContentPolicy:)];
policyResponse = [r retain];
- WebView *c = [dataSource _controller];
- [c setDefersCallbacks:YES];
- [[c _policyDelegateForwarder] webView:c decidePolicyForMIMEType:[r MIMEType]
+ WebView *wv = [dataSource _webView];
+ [wv setDefersCallbacks:YES];
+ [[wv _policyDelegateForwarder] webView:wv decidePolicyForMIMEType:[r MIMEType]
request:[dataSource request]
frame:[dataSource webFrame]
decisionListener:listener];
@@ -222,7 +222,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "main content type: %@", [r MIMEType]);
@@ -239,12 +239,12 @@
ASSERT([data length] != 0);
ASSERT(![connection defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@, data = %p, length %d", [dataSource _URL], data, [data length]);
[dataSource _receivedData:data];
- [[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
+ [[dataSource _webView] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:NO];
@@ -258,7 +258,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@", [dataSource _URL]);
@@ -266,7 +266,7 @@
[self retain];
[dataSource _finishedLoading];
- [[dataSource _controller] _mainReceivedBytesSoFar:[[dataSource data] length]
+ [[dataSource _webView] _mainReceivedBytesSoFar:[[dataSource data] length]
fromDataSource:dataSource
complete:YES];
[super connectionDidFinishLoading:con];
@@ -278,7 +278,7 @@
{
ASSERT(![con defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT(![[dataSource _controller] defersCallbacks]);
+ ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "URL = %@, error = %@", [error _web_failingURL], [error _web_localizedDescription]);
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index a3bbfa3..ae886e6 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -175,18 +175,18 @@
[super menuForEvent:theEvent];
WebFrameView *webFrameView = [self _web_parentWebFrameView];
- WebView *controller = [webFrameView _controller];
+ WebView *webView = [webFrameView _webView];
WebFrame *frame = [webFrameView webFrame];
ASSERT(frame);
- ASSERT(controller);
+ ASSERT(webView);
BOOL hasSelection = ([self selectedRange].location != NSNotFound && [self selectedRange].length > 0);
NSDictionary *element = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:hasSelection], WebElementIsSelectedKey,
frame, WebElementFrameKey, nil];
- return [controller _menuForElement:element];
+ return [webView _menuForElement:element];
}
// This approach could be relaxed when dealing with 3228554
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 2f1740c..f67eca1 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -90,14 +90,14 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
{
_private = [[WebViewPrivate alloc] init];
_private->mainFrame = [[WebFrame alloc] initWithName: frameName webFrameView: wv webView: self];
- _private->controllerSetName = [groupName copy];
- if (_private->controllerSetName != nil) {
- [WebControllerSets addController:self toSetNamed:_private->controllerSetName];
+ _private->setName = [groupName copy];
+ if (_private->setName != nil) {
+ [WebViewSets addWebView:self toSetNamed:_private->setName];
}
[self setMaintainsBackForwardList: YES];
- ++WebControllerCount;
+ ++WebViewCount;
[self _updateWebCoreSettingsFromPreferences: [WebPreferences standardPreferences]];
@@ -132,7 +132,7 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
{
[self _close];
- --WebControllerCount;
+ --WebViewCount;
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 15c8cb2..c12f300 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -55,7 +55,7 @@ typedef struct _WebResourceDelegateImplementationCache {
BOOL defersCallbacks;
- NSString *controllerSetName;
+ NSString *setName;
WebPreferences *preferences;
WebCoreSettings *settings;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 65cf50d..d5f2362 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -89,10 +89,10 @@
- (void)_close
{
- if (_private->controllerSetName != nil) {
- [WebControllerSets removeController:self fromSetNamed:_private->controllerSetName];
- [_private->controllerSetName release];
- _private->controllerSetName = nil;
+ if (_private->setName != nil) {
+ [WebViewSets removeWebView:self fromSetNamed:_private->setName];
+ [_private->setName release];
+ _private->setName = nil;
}
[_private->mainFrame _detachFromParent];
@@ -104,7 +104,7 @@
{
WebFrameView *childView = [[WebFrameView alloc] initWithFrame:NSMakeRect(0,0,0,0)];
- [childView _setController:self];
+ [childView _setWebView:self];
[childView setAllowsScrolling:allowsScrolling];
WebFrame *newFrame = [[WebFrame alloc] initWithName:fname webFrameView:childView webView:self];
@@ -249,21 +249,21 @@
return [[self mainFrame] _descendantFrameNamed:name];
}
-- (WebFrame *)_findFrameNamed: (NSString *)name
+- (WebFrame *)_findFrameNamed:(NSString *)name
{
- // Try this controller first
+ // Try this WebView first.
WebFrame *frame = [self _findFrameInThisWindowNamed:name];
if (frame != nil) {
return frame;
}
- // Try other controllers in the same set
- if (_private->controllerSetName != nil) {
- NSEnumerator *enumerator = [WebControllerSets controllersInSetNamed:_private->controllerSetName];
- WebView *controller;
- while ((controller = [enumerator nextObject]) != nil && frame == nil) {
- frame = [controller _findFrameInThisWindowNamed:name];
+ // Try other WebViews in the same set
+ if (_private->setName != nil) {
+ NSEnumerator *enumerator = [WebViewSets webViewsInSetNamed:_private->setName];
+ WebView *webView;
+ while ((webView = [enumerator nextObject]) != nil && frame == nil) {
+ frame = [webView _findFrameInThisWindowNamed:name];
}
}
@@ -273,16 +273,16 @@
- (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request
{
id wd = [self UIDelegate];
- WebView *newWindowController = nil;
+ WebView *newWindowWebView = nil;
if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
- newWindowController = [wd webView:self createWebViewWithRequest:request];
+ newWindowWebView = [wd webView:self createWebViewWithRequest:request];
else {
- newWindowController = [[WebDefaultUIDelegate sharedUIDelegate] webView:self createWebViewWithRequest: request];
+ newWindowWebView = [[WebDefaultUIDelegate sharedUIDelegate] webView:self createWebViewWithRequest: request];
}
- [[newWindowController _UIDelegateForwarder] webViewShow: self];
+ [[newWindowWebView _UIDelegateForwarder] webViewShow: self];
- return newWindowController;
+ return newWindowWebView;
}
- (NSMenu *)_menuForElement:(NSDictionary *)element
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list