[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 06:26:38 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 7af8803a8c1ef34773f130806c0b31eebdce75d7
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 24 00:19:33 2002 +0000
Use one LocationChangeHandler.
Cleaned up (a little) fallback URL code. This code
is still a convoluted and could be further untaggled.
* BrowserDocument.h:
* BrowserDocument.m:
(-[BrowserDocument init]):
(-[BrowserDocument _goToURL:withFrameLoadType:fallbackURLs:]):
(-[BrowserDocument tryMultipleURLs:]):
(-[BrowserDocument _goToNextFallbackURL]):
* BrowserDocumentPrivate.h:
* BrowserWebController.h:
* BrowserWindowController.h:
* BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]):
(-[BrowserWindowController frameLoadRedirected:]):
(-[BrowserWindowController frameLoadTryingFallback]):
* LocationChangeHandler.h:
* LocationChangeHandler.m:
(-[LocationChangeHandler initWithBrowserDocument:]):
(-[LocationChangeHandler dealloc]):
(-[LocationChangeHandler locationChangeCommittedForDataSource:]):
(-[LocationChangeHandler locationChangeDone:forDataSource:]):
(-[LocationChangeHandler serverRedirectTo:forDataSource:]):
Cleaned up LocationChangeHandler. We now have one per controller.
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebController.h:
* WebView.subproj/WebController.m:
(-[WebController policyHandler]):
(-[WebController setLocationChangeHandler:]):
(-[WebController locationChangeHandler]):
* WebView.subproj/WebControllerPolicyHandler.h:
* WebView.subproj/WebControllerPrivate.h:
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSourcePrivate dealloc]):
(-[WebDataSource _setIsDummy:)
(-[WebDataSource _isDummy]):
Hack on hack. MJS will remove when the dummy data source hack is removed.
(-[WebDataSource _locationChangeHandler]):
(-[WebDataSource _removeFromFrame]):
(-[WebFrame initWithName:webView:provisionalDataSource:controller:]):
(-[WebFrame setProvisionalDataSource:]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFramePrivate dealloc]):
Added default policy handler. This is used if no policy handler is
set on the controller.
* WebView.subproj/WebDefaultControllerPolicyHandler.h: Added.
* WebView.subproj/WebDefaultControllerPolicyHandler.m: Added.
(-[WebDefaultControllerPolicyHandler initWithWebController:]):
(-[WebDefaultControllerPolicyHandler URLPolicyForURL:]):
(-[WebDefaultControllerPolicyHandler fileURLPolicyForMIMEType:dataSource:isDirectory:]):
(-[WebDefaultControllerPolicyHandler unableToImplementFileURLPolicy:forDataSource:]):
(-[WebDefaultControllerPolicyHandler requestContentPolicyForMIMEType:dataSource:]):
(-[WebDefaultControllerPolicyHandler unableToImplementURLPolicyForURL:error:]):
(-[WebDefaultControllerPolicyHandler unableToImplementContentPolicy:forDataSource:]):
(-[WebDefaultControllerPolicyHandler pluginNotFoundForMIMEType:pluginPageURL:]):
* WebView.subproj/WebFrame.m:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 41da884..e2a3dcf 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,45 @@
+2002-07-23 Richard Williamson (Local) <rjw at apple.com>
+
+ Cleaned up LocationChangeHandler. We now have one per controller.
+
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController policyHandler]):
+ (-[WebController setLocationChangeHandler:]):
+ (-[WebController locationChangeHandler]):
+ * WebView.subproj/WebControllerPolicyHandler.h:
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate dealloc]):
+
+ (-[WebDataSource _setIsDummy:)
+ (-[WebDataSource _isDummy]):
+ Hack on hack. MJS will remove when the dummy data source hack is removed.
+
+ (-[WebDataSource _locationChangeHandler]):
+ (-[WebDataSource _removeFromFrame]):
+ (-[WebFrame initWithName:webView:provisionalDataSource:controller:]):
+ (-[WebFrame setProvisionalDataSource:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFramePrivate dealloc]):
+
+ Added default policy handler. This is used if no policy handler is
+ set on the controller.
+
+ * WebView.subproj/WebDefaultControllerPolicyHandler.h: Added.
+ * WebView.subproj/WebDefaultControllerPolicyHandler.m: Added.
+ (-[WebDefaultControllerPolicyHandler initWithWebController:]):
+ (-[WebDefaultControllerPolicyHandler URLPolicyForURL:]):
+ (-[WebDefaultControllerPolicyHandler fileURLPolicyForMIMEType:dataSource:isDirectory:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementFileURLPolicy:forDataSource:]):
+ (-[WebDefaultControllerPolicyHandler requestContentPolicyForMIMEType:dataSource:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementURLPolicyForURL:error:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementContentPolicy:forDataSource:]):
+ (-[WebDefaultControllerPolicyHandler pluginNotFoundForMIMEType:pluginPageURL:]):
+ * WebView.subproj/WebFrame.m:
+
2002-07-23 Darin Adler <darin at apple.com>
* Makefile.am: Clean based on all, not all-am, so it happens before subdirs
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 41da884..e2a3dcf 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,45 @@
+2002-07-23 Richard Williamson (Local) <rjw at apple.com>
+
+ Cleaned up LocationChangeHandler. We now have one per controller.
+
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController policyHandler]):
+ (-[WebController setLocationChangeHandler:]):
+ (-[WebController locationChangeHandler]):
+ * WebView.subproj/WebControllerPolicyHandler.h:
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate dealloc]):
+
+ (-[WebDataSource _setIsDummy:)
+ (-[WebDataSource _isDummy]):
+ Hack on hack. MJS will remove when the dummy data source hack is removed.
+
+ (-[WebDataSource _locationChangeHandler]):
+ (-[WebDataSource _removeFromFrame]):
+ (-[WebFrame initWithName:webView:provisionalDataSource:controller:]):
+ (-[WebFrame setProvisionalDataSource:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFramePrivate dealloc]):
+
+ Added default policy handler. This is used if no policy handler is
+ set on the controller.
+
+ * WebView.subproj/WebDefaultControllerPolicyHandler.h: Added.
+ * WebView.subproj/WebDefaultControllerPolicyHandler.m: Added.
+ (-[WebDefaultControllerPolicyHandler initWithWebController:]):
+ (-[WebDefaultControllerPolicyHandler URLPolicyForURL:]):
+ (-[WebDefaultControllerPolicyHandler fileURLPolicyForMIMEType:dataSource:isDirectory:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementFileURLPolicy:forDataSource:]):
+ (-[WebDefaultControllerPolicyHandler requestContentPolicyForMIMEType:dataSource:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementURLPolicyForURL:error:]):
+ (-[WebDefaultControllerPolicyHandler unableToImplementContentPolicy:forDataSource:]):
+ (-[WebDefaultControllerPolicyHandler pluginNotFoundForMIMEType:pluginPageURL:]):
+ * WebView.subproj/WebFrame.m:
+
2002-07-23 Darin Adler <darin at apple.com>
* Makefile.am: Clean based on all, not all-am, so it happens before subdirs
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 9ef746f..66ea33e 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -260,6 +260,7 @@
F53444D002E87CBA018635CA,
F53444D302E87D4B018635CA,
F5934C8A02E894F50197FBCF,
+ F649E40602EE0D1901CA2ACD,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -339,6 +340,7 @@
F508472502DED36E01257167,
F53444D102E87CBA018635CA,
F5934C8B02E894F50197FBCF,
+ F649E40702EE0D1901CA2ACD,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -1055,6 +1057,8 @@
F5143A370221DCCE01A80181,
9CF0E249021361B00ECA16EA,
9CF0E24A021361B00ECA16EA,
+ F649E40402EE0D1901CA2ACD,
+ F649E40502EE0D1901CA2ACD,
);
isa = PBXGroup;
name = WebView;
@@ -2258,6 +2262,40 @@
//F52
//F53
//F54
+//F60
+//F61
+//F62
+//F63
+//F64
+ F649E40402EE0D1901CA2ACD = {
+ isa = PBXFileReference;
+ name = WebDefaultControllerPolicyHandler.h;
+ path = ../src/Labyrinth/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.h;
+ refType = 3;
+ };
+ F649E40502EE0D1901CA2ACD = {
+ isa = PBXFileReference;
+ name = WebDefaultControllerPolicyHandler.m;
+ path = ../src/Labyrinth/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.m;
+ refType = 3;
+ };
+ F649E40602EE0D1901CA2ACD = {
+ fileRef = F649E40402EE0D1901CA2ACD;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F649E40702EE0D1901CA2ACD = {
+ fileRef = F649E40502EE0D1901CA2ACD;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//F60
+//F61
+//F62
+//F63
+//F64
//F80
//F81
//F82
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 85e4e02..78c1e91 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -154,6 +154,9 @@
- (void)setPolicyHandler: (id<WebControllerPolicyHandler>)handler;
- (id<WebControllerPolicyHandler>)policyHandler;
+- (void)setLocationChangeHandler:(id <WebLocationChangeHandler>)handler;
+- (id <WebLocationChangeHandler>)locationChangeHandler;
+
- (void)setDirectsAllLinksToSystemBrowser: (BOOL)flag;
- (BOOL)directsAllLinksToSystemBrowser;
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index d638493..31264f1 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -1,24 +1,25 @@
/*
WebController.mm
- Copyright 2001, 2002 Apple, Inc. All rights reserved.
+ Copyright 2001, 2002 Apple, Inc. All rights reserved.
*/
#import <WebKit/WebController.h>
+#import <WebKit/WebController.h>
+#import <WebKit/WebControllerPolicyHandler.h>
+#import <WebKit/WebControllerPrivate.h>
+#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebDefaultControllerPolicyHandler.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebException.h>
-#import <WebKit/WebPluginDatabase.h>
-#import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFramePrivate.h>
-#import <WebKit/WebController.h>
-#import <WebKit/WebControllerPolicyHandler.h>
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebKitDebug.h>
+#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebViewPrivate.h>
#import <WebFoundation/WebFoundation.h>
@@ -133,9 +134,21 @@
- (id<WebControllerPolicyHandler>)policyHandler
{
+ if (!_private->policyHandler)
+ _private->policyHandler = [[WebDefaultControllerPolicyHandler alloc] initWithWebController: self];
return _private->policyHandler;
}
+- (void)setLocationChangeHandler:(id <WebLocationChangeHandler>)handler
+{
+ [_private->locationChangeHandler autorelease];
+ _private->locationChangeHandler = [handler retain];
+}
+
+- (id <WebLocationChangeHandler>)locationChangeHandler
+{
+ return _private->locationChangeHandler;
+}
- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
{
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index 73e79ad..207a546 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -36,8 +36,6 @@ typedef enum {
@protocol WebControllerPolicyHandler <NSObject>
-- (id <WebLocationChangeHandler>)provideLocationChangeHandlerForDataSource: (WebDataSource *)dataSource;
-
// URLPolicyForURL: is used to determine what to do BEFORE a URL is loaded, i.e.
// before it is clicked or loaded via a URL bar. Clients can choose to handle the
// URL normally, hand the URL off to launch services, or
diff --git a/WebKit/WebView.subproj/WebControllerPolicyHandler.h b/WebKit/WebView.subproj/WebControllerPolicyHandler.h
index 73e79ad..207a546 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyHandler.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyHandler.h
@@ -36,8 +36,6 @@ typedef enum {
@protocol WebControllerPolicyHandler <NSObject>
-- (id <WebLocationChangeHandler>)provideLocationChangeHandlerForDataSource: (WebDataSource *)dataSource;
-
// URLPolicyForURL: is used to determine what to do BEFORE a URL is loaded, i.e.
// before it is clicked or loaded via a URL bar. Clients can choose to handle the
// URL normally, hand the URL off to launch services, or
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 786c299..165925a 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -17,6 +17,7 @@
id<WebResourceProgressHandler> resourceProgressHandler;
id<WebResourceProgressHandler> downloadProgressHandler;
id<WebControllerPolicyHandler> policyHandler;
+ id<WebLocationChangeHandler> locationChangeHandler;
WebBackForwardList *backForwardList;
BOOL openedByScript;
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index aec6088..bb30849 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -74,6 +74,13 @@
NSURL *iconURL;
WebIconLoader *iconLoader;
+
+
+ // Horrible hack to workaround another horrible hack.
+ // A 'fake' data source is created for every frame to guarantee
+ // that it has a part. This flag is set if the data source
+ // in a 'fake' data source.
+ BOOL _isDummy;
}
@end
@@ -95,7 +102,6 @@
- (void)_setTitle: (NSString *)title;
- (void)_setFinalURL: (NSURL *)url;
- (id <WebLocationChangeHandler>)_locationChangeHandler;
-- (void)_setLocationChangeHandler: (id <WebLocationChangeHandler>)l;
- (void)_setDownloadPath:(NSString *)path;
- (void)_setContentPolicy:(WebContentPolicy)policy;
- (void)_setContentType:(NSString *)type;
@@ -110,6 +116,8 @@
- (void)_loadIcon;
- (void)_setIconURL:(NSURL *)url;
- (void)_setIconURL:(NSURL *)url withType:(NSString *)iconType;
+- (BOOL)_isDummy;
+- (void)_setIsDummy: (BOOL)f;
// Convenience interface for getting here from an WebDataSource.
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 892966a..c7ddc79 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -72,11 +72,11 @@
[contentType release];
[errors release];
[mainDocumentError release];
- [locationChangeHandler release];
[iconLoader setDelegate:nil];
[iconLoader release];
[iconURL release];
+
[super dealloc];
}
@@ -291,16 +291,21 @@
[[self _locationChangeHandler] serverRedirectTo:url forDataSource:self];
}
-- (id <WebLocationChangeHandler>)_locationChangeHandler
+- (void)_setIsDummy: (BOOL)f
{
- return _private->locationChangeHandler;
+ _private->_isDummy = f;
}
-- (void)_setLocationChangeHandler: (id <WebLocationChangeHandler>)l
+- (BOOL)_isDummy
{
- [l retain];
- [_private->locationChangeHandler release];
- _private->locationChangeHandler = l;
+ return _private->_isDummy;
+}
+
+- (id <WebLocationChangeHandler>)_locationChangeHandler
+{
+ if ([self _isDummy])
+ return nil;
+ return [_private->controller locationChangeHandler];
}
- (void)_setDownloadPath:(NSString *)path
@@ -327,32 +332,6 @@
_private->encoding = [encoding retain];
}
-- (WebDataSource *) _recursiveDataSourceForLocationChangeHandler:(id <WebLocationChangeHandler>)handler;
-{
- WebDataSource *childProvisionalDataSource, *childDataSource, *dataSource;
- WebFrame *nextFrame;
- NSArray *frames;
- uint i;
-
- if(_private->locationChangeHandler == handler)
- return self;
-
- frames = [self children];
- for (i = 0; i < [frames count]; i++){
- nextFrame = [frames objectAtIndex: i];
- childDataSource = [nextFrame dataSource];
- dataSource = [childDataSource _recursiveDataSourceForLocationChangeHandler:handler];
- if(dataSource)
- return dataSource;
-
- childProvisionalDataSource = [nextFrame provisionalDataSource];
- dataSource = [childProvisionalDataSource _recursiveDataSourceForLocationChangeHandler:handler];
- if(dataSource)
- return dataSource;
- }
- return nil;
-}
-
- (void)_setMainDocumentError: (WebError *)error
{
[error retain];
@@ -423,7 +402,6 @@
WEBKIT_ASSERT(_private->committed);
[[self _bridge] removeFromFrame];
[self _setController:nil];
- [self _setLocationChangeHandler:nil];
}
- (WebBridge *)_bridge
diff --git a/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.h b/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.h
new file mode 100644
index 0000000..27ddcdb
--- /dev/null
+++ b/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.h
@@ -0,0 +1,16 @@
+/*
+ WebDefaultControllerPolicyHandler.h
+ Copyright 2002, Apple Computer, Inc.
+
+ Public header file.
+*/
+
+ at class WebController;
+
+ at interface WebDefaultControllerPolicyHandler : NSObject <WebControllerPolicyHandler>
+{
+ WebController *webController;
+}
+- initWithWebController: (WebController *)wc;
+ at end
+
diff --git a/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.m b/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.m
new file mode 100644
index 0000000..b52b323
--- /dev/null
+++ b/WebKit/WebView.subproj/WebDefaultControllerPolicyHandler.m
@@ -0,0 +1,67 @@
+/*
+ WebDefaultControllerPolicyHandler.h
+ Copyright 2002, Apple Computer, Inc.
+
+ Public header file.
+*/
+#import <WebKit/WebDataSource.h>
+#import <WebKit/WebDefaultControllerPolicyHandler.h>
+#import <WebKit/WebFrame.h>
+
+
+ at implementation WebDefaultControllerPolicyHandler
+
+- initWithWebController: (WebController *)wc
+{
+ [super init];
+ webController = wc; // Non-retained, like a delegate.
+ return self;
+}
+
+- (WebURLPolicy)URLPolicyForURL: (NSURL *)url
+{
+ return [WebController defaultURLPolicyForURL: url];
+}
+
+- (WebFileURLPolicy)fileURLPolicyForMIMEType: (NSString *)type dataSource: (WebDataSource *)dataSource isDirectory:(BOOL)isDirectory
+{
+ if(isDirectory)
+ return WebFileURLPolicyIgnore;
+ if([WebController canShowMIMEType:type])
+ return WebFileURLPolicyUseContentPolicy;
+ return WebFileURLPolicyIgnore;
+}
+
+- (void)unableToImplementFileURLPolicy: (WebError *)error forDataSource: (WebDataSource *)dataSource
+{
+ NSLog (@"unableToImplementFileURLPolicy:forDataSource: - error %@\n", error);
+}
+
+- (void)requestContentPolicyForMIMEType: (NSString *)type dataSource: (WebDataSource *)dataSource
+{
+ if([WebController canShowMIMEType:type]){
+ [webController haveContentPolicy:WebContentPolicyShow andPath:nil forDataSource:dataSource];
+ }
+ else{
+ [webController haveContentPolicy:WebContentPolicyIgnore andPath:nil forDataSource:dataSource];
+ }
+}
+
+- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (WebError *)error
+{
+ NSLog (@"unableToImplementURLPolicyForURL:error: - URL %@, error %@\n", url, error);
+}
+
+
+- (void)unableToImplementContentPolicy: (WebError *)error forDataSource: (WebDataSource *)dataSource
+{
+ NSLog (@"unableToImplementContentPolicy:forDataSource: - error %@\n", error);
+}
+
+- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url
+{
+ NSLog (@"pluginNotFoundForMIMEType:pluginPageURL: - MIME %@, URL \n", mime, url);
+}
+
+ at end
+
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 7e2a36b..0526c04 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -53,6 +53,7 @@
[_private setProvisionalDataSource: dummyDataSource];
[self _setState: WebFrameStateProvisional];
+ [dummyDataSource _setIsDummy:YES]; // hack on hack!
[dummyDataSource _setContentType:@"text/html"];
[dummyDataSource _setContentPolicy:WebContentPolicyShow];
[dummyDataSource _receivedData:[NSData data]];
@@ -161,10 +162,8 @@
// returns YES if we should show the data source
if([self _shouldShowDataSource:newDataSource]){
- locationChangeHandler = [[[self controller] policyHandler] provideLocationChangeHandlerForDataSource: newDataSource];
-
- [newDataSource _setLocationChangeHandler: locationChangeHandler];
-
+ locationChangeHandler = [[self controller] locationChangeHandler];
+
oldDataSource = [self dataSource];
// Is this the top frame? If so set the data source's parent to nil.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index d9e85e0..03429e0 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -41,9 +41,7 @@ static const char * const stateNames[6] = {
[webView _setController: nil];
[dataSource _setController: nil];
- [dataSource _setLocationChangeHandler: nil];
[provisionalDataSource _setController: nil];
- [provisionalDataSource _setLocationChangeHandler: nil];
[name release];
[webView release];
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index 73e79ad..207a546 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -36,8 +36,6 @@ typedef enum {
@protocol WebControllerPolicyHandler <NSObject>
-- (id <WebLocationChangeHandler>)provideLocationChangeHandlerForDataSource: (WebDataSource *)dataSource;
-
// URLPolicyForURL: is used to determine what to do BEFORE a URL is loaded, i.e.
// before it is clicked or loaded via a URL bar. Clients can choose to handle the
// URL normally, hand the URL off to launch services, or
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 85e4e02..78c1e91 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -154,6 +154,9 @@
- (void)setPolicyHandler: (id<WebControllerPolicyHandler>)handler;
- (id<WebControllerPolicyHandler>)policyHandler;
+- (void)setLocationChangeHandler:(id <WebLocationChangeHandler>)handler;
+- (id <WebLocationChangeHandler>)locationChangeHandler;
+
- (void)setDirectsAllLinksToSystemBrowser: (BOOL)flag;
- (BOOL)directsAllLinksToSystemBrowser;
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index d638493..31264f1 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -1,24 +1,25 @@
/*
WebController.mm
- Copyright 2001, 2002 Apple, Inc. All rights reserved.
+ Copyright 2001, 2002 Apple, Inc. All rights reserved.
*/
#import <WebKit/WebController.h>
+#import <WebKit/WebController.h>
+#import <WebKit/WebControllerPolicyHandler.h>
+#import <WebKit/WebControllerPrivate.h>
+#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebDefaultControllerPolicyHandler.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebException.h>
-#import <WebKit/WebPluginDatabase.h>
-#import <WebKit/WebControllerPrivate.h>
-#import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFramePrivate.h>
-#import <WebKit/WebController.h>
-#import <WebKit/WebControllerPolicyHandler.h>
#import <WebKit/WebKitErrors.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebKitDebug.h>
+#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebViewPrivate.h>
#import <WebFoundation/WebFoundation.h>
@@ -133,9 +134,21 @@
- (id<WebControllerPolicyHandler>)policyHandler
{
+ if (!_private->policyHandler)
+ _private->policyHandler = [[WebDefaultControllerPolicyHandler alloc] initWithWebController: self];
return _private->policyHandler;
}
+- (void)setLocationChangeHandler:(id <WebLocationChangeHandler>)handler
+{
+ [_private->locationChangeHandler autorelease];
+ _private->locationChangeHandler = [handler retain];
+}
+
+- (id <WebLocationChangeHandler>)locationChangeHandler
+{
+ return _private->locationChangeHandler;
+}
- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
{
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 786c299..165925a 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -17,6 +17,7 @@
id<WebResourceProgressHandler> resourceProgressHandler;
id<WebResourceProgressHandler> downloadProgressHandler;
id<WebControllerPolicyHandler> policyHandler;
+ id<WebLocationChangeHandler> locationChangeHandler;
WebBackForwardList *backForwardList;
BOOL openedByScript;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list