[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:27:36 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e2f887e4ee88abc1463e43dba08c23dcb9bee042
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 6 03:26:38 2003 +0000
WebKit:
API changes
WebView and WebDataSource give up -(WebController *)controller.
WebView gets -(WebFrame *)webFrame.
Reviewed by cblu.
* Plugins.subproj/WebNetscapePluginDocumentView.m:
(-[WebNetscapePluginDocumentView setDataSource:]):
* Plugins.subproj/WebNetscapePluginEmbeddedView.m:
(-[WebNetscapePluginEmbeddedView dataSource]):
* Plugins.subproj/WebNullPluginView.m:
(-[WebNullPluginView viewDidMoveToWindow]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge startLoadingResource:withURL:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
(+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
(-[WebSubresourceClient receivedError:]):
(-[WebSubresourceClient resourceDidFinishLoading:]):
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate setDataSource:]):
* WebView.subproj/WebController.h:
* WebView.subproj/WebController.m:
(-[WebController backForwardList]):
(-[WebController setUsesBackForwardList:]):
* WebView.subproj/WebDataSource.h:
* WebView.subproj/WebDataSource.m:
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _controller]):
(-[WebDataSource _receivedError:complete:]):
(-[WebDataSource _loadIcon]):
* WebView.subproj/WebFrame.h:
* WebView.subproj/WebFramePrivate.m:
(switch):
* WebView.subproj/WebHTMLViewPrivate.m:
(-[WebHTMLView _controller]):
(-[WebHTMLView _frame]):
(-[WebHTMLView _elementAtPoint:]):
* WebView.subproj/WebImageView.m:
(-[WebImageView controller]):
(-[WebImageView menuForEvent:]):
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
(-[WebMainResourceClient continueAfterNavigationPolicy:formState:]):
(-[WebMainResourceClient resource:willSendRequest:]):
(-[WebMainResourceClient continueAfterContentPolicy:response:]):
(-[WebMainResourceClient checkContentPolicyForResponse:andCallSelector:]):
(-[WebMainResourceClient resource:didReceiveResponse:]):
(-[WebMainResourceClient resource:didReceiveData:]):
(-[WebMainResourceClient resourceDidFinishLoading:]):
(-[WebMainResourceClient resource:didFailLoadingWithError:]):
* WebView.subproj/WebTextView.m:
(-[WebTextView menuForEvent:]):
* WebView.subproj/WebView.h:
* WebView.subproj/WebView.m:
(-[WebView webFrame]):
(-[WebView concludeDragOperation:]):
* WebView.subproj/WebViewPrivate.h:
* WebView.subproj/WebViewPrivate.m:
(-[WebView _controller]):
WebBrowser:
API changes
WebView and WebDataSource give up -(WebController *)controller.
WebView gets -(WebFrame *)webFrame.
Reviewed by cblu.
* BrowserTabViewItem.m:
(-[BrowserTabViewItem webController]):
* BrowserWebViewExtras.m:
(-[WebView largestScrollableWebView]):
* BrowserWindowController.m:
(-[BrowserWindowController updateLabelForTab:]):
(-[BrowserWindowController didSelectTabViewItem]):
(-[BrowserWindowController findTabForWebController:]):
(-[BrowserWindowController tabBarView:menuForClippedTabViewItems:]):
(-[BrowserWindowController reloadTab:]):
(-[BrowserWindowController releaseTabSwitcher:]):
(-[BrowserWindowController replaceTabURLs:usingTabLabelsFromBookmarks:]):
(-[BrowserWindowController canReloadTab:]):
(-[BrowserWindowController canReloadAllTabs]):
* DownloadProgressEntry.m:
* LoadProgressMonitor.m:
(-[LoadProgressMonitor resource:didReceiveResponse:fromDataSource:]):
(-[LoadProgressMonitor resource:didReceiveContentLength:fromDataSource:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c2f8c01..8cca612 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,67 @@
+2003-03-05 Richard Williamson <rjw at apple.com>
+
+ API changes
+ WebView and WebDataSource give up -(WebController *)controller.
+ WebView gets -(WebFrame *)webFrame.
+
+ Reviewed by cblu.
+
+ * Plugins.subproj/WebNetscapePluginDocumentView.m:
+ (-[WebNetscapePluginDocumentView setDataSource:]):
+ * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
+ (-[WebNetscapePluginEmbeddedView dataSource]):
+ * Plugins.subproj/WebNullPluginView.m:
+ (-[WebNullPluginView viewDidMoveToWindow]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge startLoadingResource:withURL:]):
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
+ (-[WebSubresourceClient receivedError:]):
+ (-[WebSubresourceClient resourceDidFinishLoading:]):
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate setDataSource:]):
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController backForwardList]):
+ (-[WebController setUsesBackForwardList:]):
+ * WebView.subproj/WebDataSource.h:
+ * WebView.subproj/WebDataSource.m:
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _controller]):
+ (-[WebDataSource _receivedError:complete:]):
+ (-[WebDataSource _loadIcon]):
+ * WebView.subproj/WebFrame.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (switch):
+ * WebView.subproj/WebHTMLViewPrivate.m:
+ (-[WebHTMLView _controller]):
+ (-[WebHTMLView _frame]):
+ (-[WebHTMLView _elementAtPoint:]):
+ * WebView.subproj/WebImageView.m:
+ (-[WebImageView controller]):
+ (-[WebImageView menuForEvent:]):
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
+ (-[WebMainResourceClient continueAfterNavigationPolicy:formState:]):
+ (-[WebMainResourceClient resource:willSendRequest:]):
+ (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+ (-[WebMainResourceClient checkContentPolicyForResponse:andCallSelector:]):
+ (-[WebMainResourceClient resource:didReceiveResponse:]):
+ (-[WebMainResourceClient resource:didReceiveData:]):
+ (-[WebMainResourceClient resourceDidFinishLoading:]):
+ (-[WebMainResourceClient resource:didFailLoadingWithError:]):
+ * WebView.subproj/WebTextView.m:
+ (-[WebTextView menuForEvent:]):
+ * WebView.subproj/WebView.h:
+ * WebView.subproj/WebView.m:
+ (-[WebView webFrame]):
+ (-[WebView concludeDragOperation:]):
+ * WebView.subproj/WebViewPrivate.h:
+ * WebView.subproj/WebViewPrivate.m:
+ (-[WebView _controller]):
+
2003-03-05 Maciej Stachowiak <mjs at apple.com>
Reviewed by Ken.
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 31e4e63..1dca710 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -78,7 +78,7 @@
pluginName:[thePlugin name]
MIMEType:MIME];
- [[[theDataSource controller] _resourceLoadDelegateForwarder] pluginFailedWithError:error dataSource:theDataSource];
+ [[[[theDataSource webFrame] controller] _resourceLoadDelegateForwarder] pluginFailedWithError:error dataSource:theDataSource];
return;
}
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m b/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
index e817145..5c144c5 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
@@ -61,7 +61,7 @@
- (WebDataSource *)dataSource
{
WebView *webView = (WebView *)[self _web_superviewOfClass:[WebView class]];
- WebFrame *webFrame = [[webView controller] frameForView:webView];
+ WebFrame *webFrame = [[[webView webFrame] controller] frameForView:webView];
return [webFrame dataSource];
}
diff --git a/WebKit/Plugins.subproj/WebNullPluginView.m b/WebKit/Plugins.subproj/WebNullPluginView.m
index bc20850..3571764 100644
--- a/WebKit/Plugins.subproj/WebNullPluginView.m
+++ b/WebKit/Plugins.subproj/WebNullPluginView.m
@@ -47,8 +47,9 @@ static NSImage *image = nil;
if(!didSendError && _window && error){
didSendError = YES;
WebView *view = (WebView *)[self _web_superviewOfClass:[WebView class]];
- WebController *controller = [view controller];
- WebDataSource *dataSource = [[controller frameForView:view] dataSource];
+ WebFrame *webFrame = [view webFrame];
+ WebController *controller = [webFrame controller];
+ WebDataSource *dataSource = [webFrame dataSource];
[[controller _resourceLoadDelegateForwarder] pluginFailedWithError:error dataSource:dataSource];
}
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 0750295..34e7b08 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -251,7 +251,7 @@
{
// If we are no longer attached to a controller, this must be an attempted load from an
// onUnload handler, so let's just block it.
- if ([[self dataSource] controller] == nil) {
+ if ([[self dataSource] _controller] == nil) {
return nil;
}
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index aacdebf..5dab6e3 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -50,8 +50,10 @@
[newRequest setRequestCachePolicy:[[source request] requestCachePolicy]];
[newRequest setResponseCachePolicy:[[source request] responseCachePolicy]];
[newRequest setReferrer:referrer];
- [newRequest setCookiePolicyBaseURL:[[[[source controller] mainFrame] dataSource] URL]];
- [newRequest setUserAgent:[[source controller] userAgentForURL:URL]];
+
+ WebController *_controller = [source _controller];
+ [newRequest setCookiePolicyBaseURL:[[[_controller mainFrame] dataSource] URL]];
+ [newRequest setUserAgent:[_controller userAgentForURL:URL]];
BOOL succeeded = [client loadWithRequest:newRequest];
[newRequest release];
@@ -64,7 +66,7 @@
WebError *badURLError = [[WebError alloc] initWithErrorCode:WebFoundationErrorBadURL
inDomain:WebErrorDomainWebFoundation
failingURL:[URL absoluteString]];
- [[source controller] _receivedError:badURLError fromDataSource:source];
+ [_controller _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
}
@@ -74,7 +76,7 @@
- (void)receivedError:(WebError *)error
{
- [[dataSource controller] _receivedError:error fromDataSource:dataSource];
+ [[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
-(WebRequest *)resource:(WebResource *)h willSendRequest:(WebRequest *)newRequest
@@ -112,7 +114,7 @@
[dataSource _removeSubresourceClient:self];
- [[dataSource controller] _finishedLoadingResourceFromDataSource:dataSource];
+ [[dataSource _controller] _finishedLoadingResourceFromDataSource:dataSource];
[self release];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index aacdebf..5dab6e3 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -50,8 +50,10 @@
[newRequest setRequestCachePolicy:[[source request] requestCachePolicy]];
[newRequest setResponseCachePolicy:[[source request] responseCachePolicy]];
[newRequest setReferrer:referrer];
- [newRequest setCookiePolicyBaseURL:[[[[source controller] mainFrame] dataSource] URL]];
- [newRequest setUserAgent:[[source controller] userAgentForURL:URL]];
+
+ WebController *_controller = [source _controller];
+ [newRequest setCookiePolicyBaseURL:[[[_controller mainFrame] dataSource] URL]];
+ [newRequest setUserAgent:[_controller userAgentForURL:URL]];
BOOL succeeded = [client loadWithRequest:newRequest];
[newRequest release];
@@ -64,7 +66,7 @@
WebError *badURLError = [[WebError alloc] initWithErrorCode:WebFoundationErrorBadURL
inDomain:WebErrorDomainWebFoundation
failingURL:[URL absoluteString]];
- [[source controller] _receivedError:badURLError fromDataSource:source];
+ [_controller _receivedError:badURLError fromDataSource:source];
[badURLError release];
client = nil;
}
@@ -74,7 +76,7 @@
- (void)receivedError:(WebError *)error
{
- [[dataSource controller] _receivedError:error fromDataSource:dataSource];
+ [[dataSource _controller] _receivedError:error fromDataSource:dataSource];
}
-(WebRequest *)resource:(WebResource *)h willSendRequest:(WebRequest *)newRequest
@@ -112,7 +114,7 @@
[dataSource _removeSubresourceClient:self];
- [[dataSource controller] _finishedLoadingResourceFromDataSource:dataSource];
+ [[dataSource _controller] _finishedLoadingResourceFromDataSource:dataSource];
[self release];
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 2eee3f0..5c6e4df 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -2979,8 +2979,8 @@
35081D9302B6D4D80ACA2ACA,
35081D9402B6D4D80ACA2ACA,
35081D9602B6D4D80ACA2ACA,
- 35081D9502B6D4D80ACA2ACA,
35081D9702B6D4D80ACA2ACA,
+ 35081D9502B6D4D80ACA2ACA,
);
isa = PBXGroup;
name = HTML;
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index 9aea6c3..aee3fa1 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -98,14 +98,14 @@
- (void)setDataSource:(WebDataSource *)d
{
ASSERT(d);
- ASSERT([d controller]);
+ ASSERT([d _controller]);
[d retain];
[dataSource release];
dataSource = d;
[controller release];
- controller = [[dataSource controller] retain];
+ controller = [[dataSource _controller] retain];
[resourceLoadDelegate release];
resourceLoadDelegate = [[controller resourceLoadDelegate] retain];
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index d5a708a..7ad46e4 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -239,13 +239,6 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
- (void)setUsesBackForwardList: (BOOL)flag;
/*!
- @method useBackForwardList
- @result Returns whether a backforward list is being used by this controller.
- @result YES if a backforward list is being used by this controller, NO otherwise.
-*/
-- (BOOL)usesBackForwardList;
-
-/*!
@method goBack
@abstract Go back to the previous URL in the backforward list.
@result YES if able to go back in the backforward list, NO otherwise.
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index ef1f705..3168b6b 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -272,7 +272,9 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- (WebBackForwardList *)backForwardList
{
- return _private->backForwardList;
+ if (_private->useBackForwardList)
+ return _private->backForwardList;
+ return nil;
}
- (void)setUsesBackForwardList: (BOOL)flag
@@ -280,11 +282,6 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
_private->useBackForwardList = flag;
}
-- (BOOL)usesBackForwardList
-{
- return _private->useBackForwardList;
-}
-
- (void)_goToItem: (WebHistoryItem *)item withLoadType: (WebFrameLoadType)type
{
// We never go back/forward on a per-frame basis, so the target must be the main frame
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 5ffd0d4..1b02c3e 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -36,7 +36,7 @@
@param request The request to use in creating a datasource.
@result Returns an initialized WebDataSource.
*/
-- initWithRequest:(WebRequest *)request;
+- (id)initWithRequest:(WebRequest *)request;
/*!
@method data
@@ -65,12 +65,6 @@
- (WebFrame *)webFrame;
/*!
- @method controller
- @result Returns the controller associated with this datasource.
-*/
-- (WebController *)controller;
-
-/*!
@method initialRequest
@result Returns a reference to the original request that created the
datasource. This request will be unmodified by WebKit.
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index aba60f7..fc4adfd 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -69,14 +69,6 @@
return _private->webFrame;
}
-- (WebController *)controller
-{
- // All data sources used in a document share the same controller.
- // A single document may have many data sources corresponding to
- // frames or iframes.
- return _private->controller;
-}
-
-(WebRequest *)initialRequest
{
return _private->originalRequest;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 0d7fda4..c93d58b 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -113,6 +113,7 @@
@interface WebDataSource (WebPrivate)
+- (WebController *)_controller;
- (void)_setResourceData:(NSData *)data;
- (Class)_representationClass;
- (void)_setRepresentation:(id<WebDocumentRepresentation>)representation;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 6fd1cc2..1a42a3d 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -78,6 +78,11 @@
@implementation WebDataSource (WebPrivate)
+- (WebController *)_controller
+{
+ return _private->controller;
+}
+
- (void)_setResourceData:(NSData *)data
{
[_private->resourceData release];
@@ -539,7 +544,7 @@
if (!_private->committed) {
[[[self webFrame] _bridge] didNotOpenURL:[[_private->originalRequestCopy URL] absoluteString]];
}
- [[self controller] _mainReceivedError:error
+ [[self _controller] _mainReceivedError:error
fromDataSource:self
complete:isComplete];
}
@@ -563,7 +568,7 @@
- (void)_loadIcon
{
- if([self webFrame] != [[self controller] mainFrame] || _private->mainDocumentError || _private->iconLoader){
+ if([self webFrame] != [[self _controller] mainFrame] || _private->mainDocumentError || _private->iconLoader){
return;
}
diff --git a/WebKit/WebView.subproj/WebFrame.h b/WebKit/WebView.subproj/WebFrame.h
index 7d0ee08..e3e3427 100644
--- a/WebKit/WebView.subproj/WebFrame.h
+++ b/WebKit/WebView.subproj/WebFrame.h
@@ -34,7 +34,7 @@
@param controller The controller that manages the frame.
@result Returns an initialized WebFrame.
*/
-- initWithName: (NSString *)name webView: (WebView *)view controller: (WebController *)controller;
+- (id)initWithName: (NSString *)name webView: (WebView *)view controller: (WebController *)controller;
/*!
@method name
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 4cc35f4..ae014a6 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -575,7 +575,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
case WebFrameLoadTypeForward:
case WebFrameLoadTypeBack:
case WebFrameLoadTypeIndexedBackForward:
- if ([[self controller] usesBackForwardList]) {
+ if ([[self controller] backForwardList]) {
// Must grab the current scroll position before disturbing it
[self _saveScrollPositionToItem:[_private previousItem]];
@@ -892,7 +892,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
// If the user had a scroll point scroll to it. This will override
// the anchor point. After much discussion it was decided by folks
// that the user scroll point should override the anchor point.
- if ([[self controller] usesBackForwardList]) {
+ if ([[self controller] backForwardList]) {
switch ([self _loadType]) {
case WebFrameLoadTypeForward:
case WebFrameLoadTypeBack:
diff --git a/WebKit/WebView.subproj/WebFrameView.h b/WebKit/WebView.subproj/WebFrameView.h
index 1c0db20..5c360a5 100644
--- a/WebKit/WebView.subproj/WebFrameView.h
+++ b/WebKit/WebView.subproj/WebFrameView.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
@class WebDataSource;
- at class WebController;
+ at class WebFrame;
@class WebViewPrivate;
@protocol WebDocumentView;
@@ -27,14 +27,14 @@
@param frame The frame rectangle for the view
@result An initialized WebView
*/
-- initWithFrame: (NSRect) frame;
+- (id)initWithFrame: (NSRect) frame;
/*!
@method controller
@abstract Returns the WebController associated with this WebView
@result The WebView's controller
*/
-- (WebController *)controller;
+- (WebFrame *)webFrame;
/*!
@method frameScrollView
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 691a050..172d887 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -72,6 +72,12 @@ enum {
[super dealloc];
}
+- (WebFrame *)webFrame
+{
+ return [[self _controller] frameForView: self];
+}
+
+
- (void)setAllowsScrolling: (BOOL)flag
{
[(WebDynamicScrollBarsView *)[self frameScrollView] setAllowsScrolling: flag];
@@ -92,12 +98,6 @@ enum {
return [[self frameScrollView] documentView];
}
-// Note that the controller is not retained.
-- (WebController *)controller
-{
- return _private->controller;
-}
-
- (BOOL)isDocumentHTML
{
return [[self documentView] isKindOfClass:[WebHTMLView class]];
@@ -128,7 +128,7 @@ enum {
if (URL) {
WebRequest *request = [[WebRequest alloc] initWithURL:URL];
- [[[self controller] mainFrame] loadRequest:request];
+ [[[self _controller] mainFrame] loadRequest:request];
[request release];
}
}
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index f5eef4a..f34aca5 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -9,6 +9,7 @@
#import <WebKit/WebView.h>
@class WebDynamicScrollBarsView;
+ at class WebController;
@interface WebViewPrivate : NSObject
{
@@ -28,6 +29,7 @@
@end
@interface WebView (WebPrivate)
+- (WebController *)_controller;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
- (void)_setController:(WebController *)controller;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index f5eef4a..f34aca5 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -9,6 +9,7 @@
#import <WebKit/WebView.h>
@class WebDynamicScrollBarsView;
+ at class WebController;
@interface WebViewPrivate : NSObject
{
@@ -28,6 +29,7 @@
@end
@interface WebView (WebPrivate)
+- (WebController *)_controller;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
- (void)_setController:(WebController *)controller;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index c89e8ea..a775ff7 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -44,6 +44,13 @@
@implementation WebView (WebPrivate)
+// Note that the controller is not retained.
+- (WebController *)_controller
+{
+ return _private->controller;
+}
+
+
- (void)_setMarginWidth: (int)w
{
_private->marginWidth = w;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 9f2de32..4fd2101 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -136,13 +136,13 @@ static BOOL forceRealHitTest = NO;
- (WebController *)_controller
{
- return [[self _web_parentWebView] controller];
+ return [[self _web_parentWebView] _controller];
}
- (WebFrame *)_frame
{
WebView *webView = [self _web_parentWebView];
- return [[webView controller] frameForView:webView];
+ return [[webView _controller] frameForView:webView];
}
// Required so view can access the part's selection.
@@ -203,7 +203,7 @@ static BOOL forceRealHitTest = NO;
WebView *webView = [self _web_parentWebView];
ASSERT(webView);
- WebFrame *webFrame = [[webView controller] frameForView:webView];
+ WebFrame *webFrame = [[webView _controller] frameForView:webView];
if (webFrame) {
NSString *frameName = [elementInfoWC objectForKey:WebElementLinkTargetFrameKey];
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index f8fb93b..c0f849a 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -82,7 +82,7 @@
- (WebController *)controller
{
- return [[self _web_parentWebView] controller];
+ return [[self _web_parentWebView] _controller];
}
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
@@ -127,7 +127,7 @@
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
WebView *webView = [self _web_parentWebView];
- WebController *controller = [webView controller];
+ WebController *controller = [webView _controller];
WebFrame *frame = [controller frameForView:webView];
ASSERT(frame);
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index 9aea6c3..aee3fa1 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -98,14 +98,14 @@
- (void)setDataSource:(WebDataSource *)d
{
ASSERT(d);
- ASSERT([d controller]);
+ ASSERT([d _controller]);
[d retain];
[dataSource release];
dataSource = d;
[controller release];
- controller = [[dataSource controller] retain];
+ controller = [[dataSource _controller] retain];
[resourceLoadDelegate release];
resourceLoadDelegate = [[controller resourceLoadDelegate] retain];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 8f08420..76886cb 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -115,7 +115,7 @@
// is cleared so the delegate will get false if they ask the frame if it's loading.
// There's probably a better way to do this, but this should do for now.
if (keepLoading) {
- [[[dataSource controller] _locationChangeDelegateForwarder]
+ [[[dataSource _controller] _locationChangeDelegateForwarder]
locationChangeDone:interruptError forDataSource:dataSource];
}
@@ -130,7 +130,7 @@
-(void)continueAfterNavigationPolicy:(WebRequest *)_request formState:(WebFormState *)state
{
- [[dataSource controller] setDefersCallbacks:NO];
+ [[dataSource _controller] setDefersCallbacks:NO];
if (!_request) {
[self stopLoadingForPolicyChange];
}
@@ -150,7 +150,7 @@
// 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 _controller] mainFrame]) {
[newRequest setCookiePolicyBaseURL:URL];
}
@@ -167,7 +167,7 @@
-(void)continueAfterContentPolicy:(WebPolicyAction)contentPolicy response:(WebResponse *)r
{
- [[dataSource controller] setDefersCallbacks:NO];
+ [[dataSource _controller] setDefersCallbacks:NO];
WebRequest *req = [dataSource request];
switch (contentPolicy) {
@@ -188,7 +188,7 @@
if (directory != nil && [directory isAbsolutePath]) {
path = [directory stringByAppendingPathComponent:[r suggestedFilenameForSaving]];
} else {
- id pd = [[dataSource controller] policyDelegate];
+ id pd = [[dataSource _controller] policyDelegate];
if ([pd respondsToSelector: @selector(savePathForResponse:andRequest:)])
path = [pd savePathForResponse:r andRequest:req];
@@ -255,7 +255,7 @@
-(void)checkContentPolicyForResponse:(WebResponse *)r andCallSelector:(SEL)selector
{
- id pd = [[dataSource controller] policyDelegate];
+ id pd = [[dataSource _controller] policyDelegate];
WebPolicyAction contentPolicy;
if ([pd respondsToSelector:@selector(contentPolicyForMIMEType:andRequest:inFrame:)])
@@ -274,12 +274,12 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([dataSource isDownloading] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([dataSource isDownloading] || ![[dataSource _controller] defersCallbacks]);
[dataSource _setResponse:r];
LOG(Download, "main content type: %@", [r contentType]);
- [[dataSource controller] setDefersCallbacks:YES];
+ [[dataSource _controller] setDefersCallbacks:YES];
// Figure out the content policy.
if (![dataSource isDownloading]) {
@@ -297,7 +297,7 @@
ASSERT([data length] != 0);
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@, data = %p, length %d", [dataSource URL], data, [data length]);
@@ -308,7 +308,7 @@
} else {
[resourceData appendData:data];
[dataSource _receivedData:data];
- [[dataSource controller] _mainReceivedBytesSoFar:[resourceData length]
+ [[dataSource _controller] _mainReceivedBytesSoFar:[resourceData length]
fromDataSource:dataSource
complete:NO];
}
@@ -328,7 +328,7 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@", [dataSource URL]);
// Calls in this method will most likely result in a call to release, so we must retain.
@@ -342,7 +342,7 @@
} else {
[dataSource _setResourceData:resourceData];
[dataSource _finishedLoading];
- [[dataSource controller] _mainReceivedBytesSoFar:[resourceData length]
+ [[dataSource _controller] _mainReceivedBytesSoFar:[resourceData length]
fromDataSource:dataSource
complete:YES];
}
@@ -363,7 +363,7 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@, error = %@", [error failingURL], [error errorDescription]);
// Calling receivedError will likely result in a call to release, so we must retain.
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 8f08420..76886cb 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -115,7 +115,7 @@
// is cleared so the delegate will get false if they ask the frame if it's loading.
// There's probably a better way to do this, but this should do for now.
if (keepLoading) {
- [[[dataSource controller] _locationChangeDelegateForwarder]
+ [[[dataSource _controller] _locationChangeDelegateForwarder]
locationChangeDone:interruptError forDataSource:dataSource];
}
@@ -130,7 +130,7 @@
-(void)continueAfterNavigationPolicy:(WebRequest *)_request formState:(WebFormState *)state
{
- [[dataSource controller] setDefersCallbacks:NO];
+ [[dataSource _controller] setDefersCallbacks:NO];
if (!_request) {
[self stopLoadingForPolicyChange];
}
@@ -150,7 +150,7 @@
// 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 _controller] mainFrame]) {
[newRequest setCookiePolicyBaseURL:URL];
}
@@ -167,7 +167,7 @@
-(void)continueAfterContentPolicy:(WebPolicyAction)contentPolicy response:(WebResponse *)r
{
- [[dataSource controller] setDefersCallbacks:NO];
+ [[dataSource _controller] setDefersCallbacks:NO];
WebRequest *req = [dataSource request];
switch (contentPolicy) {
@@ -188,7 +188,7 @@
if (directory != nil && [directory isAbsolutePath]) {
path = [directory stringByAppendingPathComponent:[r suggestedFilenameForSaving]];
} else {
- id pd = [[dataSource controller] policyDelegate];
+ id pd = [[dataSource _controller] policyDelegate];
if ([pd respondsToSelector: @selector(savePathForResponse:andRequest:)])
path = [pd savePathForResponse:r andRequest:req];
@@ -255,7 +255,7 @@
-(void)checkContentPolicyForResponse:(WebResponse *)r andCallSelector:(SEL)selector
{
- id pd = [[dataSource controller] policyDelegate];
+ id pd = [[dataSource _controller] policyDelegate];
WebPolicyAction contentPolicy;
if ([pd respondsToSelector:@selector(contentPolicyForMIMEType:andRequest:inFrame:)])
@@ -274,12 +274,12 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([dataSource isDownloading] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([dataSource isDownloading] || ![[dataSource _controller] defersCallbacks]);
[dataSource _setResponse:r];
LOG(Download, "main content type: %@", [r contentType]);
- [[dataSource controller] setDefersCallbacks:YES];
+ [[dataSource _controller] setDefersCallbacks:YES];
// Figure out the content policy.
if (![dataSource isDownloading]) {
@@ -297,7 +297,7 @@
ASSERT([data length] != 0);
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@, data = %p, length %d", [dataSource URL], data, [data length]);
@@ -308,7 +308,7 @@
} else {
[resourceData appendData:data];
[dataSource _receivedData:data];
- [[dataSource controller] _mainReceivedBytesSoFar:[resourceData length]
+ [[dataSource _controller] _mainReceivedBytesSoFar:[resourceData length]
fromDataSource:dataSource
complete:NO];
}
@@ -328,7 +328,7 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@", [dataSource URL]);
// Calls in this method will most likely result in a call to release, so we must retain.
@@ -342,7 +342,7 @@
} else {
[dataSource _setResourceData:resourceData];
[dataSource _finishedLoading];
- [[dataSource controller] _mainReceivedBytesSoFar:[resourceData length]
+ [[dataSource _controller] _mainReceivedBytesSoFar:[resourceData length]
fromDataSource:dataSource
complete:YES];
}
@@ -363,7 +363,7 @@
{
ASSERT(![h defersCallbacks]);
ASSERT(![self defersCallbacks]);
- ASSERT([self isDownload] || ![[dataSource controller] defersCallbacks]);
+ ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
LOG(Loading, "URL = %@, error = %@", [error failingURL], [error errorDescription]);
// Calling receivedError will likely result in a call to release, so we must retain.
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 586047b..57146ee 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -13,7 +13,7 @@
#import <WebKit/WebDocument.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebPreferences.h>
-#import <WebKit/WebView.h>
+#import <WebKit/WebViewPrivate.h>
@implementation WebTextView
@@ -158,7 +158,7 @@
[super menuForEvent:theEvent];
WebView *webView = [self _web_parentWebView];
- WebController *controller = [webView controller];
+ WebController *controller = [webView _controller];
WebFrame *frame = [controller frameForView:webView];
ASSERT(frame);
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index d5a708a..7ad46e4 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -239,13 +239,6 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
- (void)setUsesBackForwardList: (BOOL)flag;
/*!
- @method useBackForwardList
- @result Returns whether a backforward list is being used by this controller.
- @result YES if a backforward list is being used by this controller, NO otherwise.
-*/
-- (BOOL)usesBackForwardList;
-
-/*!
@method goBack
@abstract Go back to the previous URL in the backforward list.
@result YES if able to go back in the backforward list, NO otherwise.
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index ef1f705..3168b6b 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -272,7 +272,9 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- (WebBackForwardList *)backForwardList
{
- return _private->backForwardList;
+ if (_private->useBackForwardList)
+ return _private->backForwardList;
+ return nil;
}
- (void)setUsesBackForwardList: (BOOL)flag
@@ -280,11 +282,6 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
_private->useBackForwardList = flag;
}
-- (BOOL)usesBackForwardList
-{
- return _private->useBackForwardList;
-}
-
- (void)_goToItem: (WebHistoryItem *)item withLoadType: (WebFrameLoadType)type
{
// We never go back/forward on a per-frame basis, so the target must be the main frame
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list