[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:19:10 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cc83f0ec6e6ec3c293918981e34e9e9d8ea71349
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jun 15 02:12:10 2002 +0000

        Added handlers to IFWebController.  Should eventually be possible to use
        IFWebController w/o subclassing.
    
        Changed IFResourceProgressHandler to pass back resource handle instead of
        string description.  This will address the needs descibed in 2954160.
    
        Fixed many incorrect references to datasource reps.
    
    	* Plugins.subproj/IFNullPluginView.mm:
    	(-[IFNullPluginView drawRect:]):
    	* Plugins.subproj/IFPluginStream.mm:
    	(-[IFPluginStream IFURLHandle:resourceDataDidBecomeAvailable:]):
    	(-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]):
    	(-[IFPluginStream IFURLHandleResourceDidCancelLoading:]):
    	(-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]):
    	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
    	(-[IFWebDataSource _bridge]):
    	(-[IFWebCoreBridge createNewFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
    	* WebView.subproj/IFDocument.h:
    	* WebView.subproj/IFHTMLRepresentation.h:
    	* WebView.subproj/IFHTMLRepresentationPrivate.h:
    	* WebView.subproj/IFHTMLView.mm:
    	(-[IFHTMLView provisionalDataSourceChanged:]):
    	(-[IFHTMLView viewWillStartLiveResize]):
    	(-[IFHTMLView viewDidEndLiveResize]):
    	* WebView.subproj/IFImageView.m:
    	* WebView.subproj/IFMainURLHandleClient.mm:
    	(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
    	(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
    	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
    	(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
    	(-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]):
    	* WebView.subproj/IFWebController.h:
    	* WebView.subproj/IFWebController.mm:
    	(-[IFWebController createFrameNamed:for:inParent:allowsScrolling:]):
    	(-[IFWebController setResourceProgressHandler:]):
    	(-[IFWebController resourceProgressHandler]):
    	(-[IFWebController setPolicyHandler:]):
    	(-[IFWebController policyHandler]):
    	(+[IFWebController defaultURLPolicyForURL:]):
    	* WebView.subproj/IFWebControllerPrivate.h:
    	* WebView.subproj/IFWebControllerPrivate.mm:
    	(-[IFWebControllerPrivate dealloc]):
    	(-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:]):
    	(-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:]):
    	(-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
    	(-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
    	* WebView.subproj/IFWebDataSource.h:
    	* WebView.subproj/IFWebDataSource.mm:
    	(-[IFWebDataSource representation]):
    	(-[IFWebDataSource isDocumentHTML]):
    	(-[IFWebDataSource documentTextFromDOM]):
    	* WebView.subproj/IFWebDataSourcePrivate.h:
    	* WebView.subproj/IFWebDataSourcePrivate.mm:
    	(-[IFWebDataSourcePrivate dealloc]):
    	(-[IFWebDataSource _setRepresentation:]):
    	(-[IFWebDataSource _stopLoading]):
    	(-[IFWebDataSource _isDocumentHTML]):
    	* WebView.subproj/IFWebFrame.mm:
    	(-[IFWebFrame setProvisionalDataSource:]):
    	* WebView.subproj/IFWebFramePrivate.mm:
    	(-[IFWebFrame _isLoadComplete]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1364 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d6f4976..2090620 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,68 @@
+2002-06-14  Richard Williamson  <rjw at apple.com>
+
+    Added handlers to IFWebController.  Should eventually be possible to use
+    IFWebController w/o subclassing.
+    
+    Changed IFResourceProgressHandler to pass back resource handle instead of
+    string description.  This will address the needs descibed in 2954160.
+    
+    Fixed many incorrect references to datasource reps.
+    
+	* Plugins.subproj/IFNullPluginView.mm:
+	(-[IFNullPluginView drawRect:]):
+	* Plugins.subproj/IFPluginStream.mm:
+	(-[IFPluginStream IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFPluginStream IFURLHandleResourceDidCancelLoading:]):
+	(-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]):
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebDataSource _bridge]):
+	(-[IFWebCoreBridge createNewFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
+	* WebView.subproj/IFDocument.h:
+	* WebView.subproj/IFHTMLRepresentation.h:
+	* WebView.subproj/IFHTMLRepresentationPrivate.h:
+	* WebView.subproj/IFHTMLView.mm:
+	(-[IFHTMLView provisionalDataSourceChanged:]):
+	(-[IFHTMLView viewWillStartLiveResize]):
+	(-[IFHTMLView viewDidEndLiveResize]):
+	* WebView.subproj/IFImageView.m:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
+	(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+	(-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]):
+	* WebView.subproj/IFWebController.h:
+	* WebView.subproj/IFWebController.mm:
+	(-[IFWebController createFrameNamed:for:inParent:allowsScrolling:]):
+	(-[IFWebController setResourceProgressHandler:]):
+	(-[IFWebController resourceProgressHandler]):
+	(-[IFWebController setPolicyHandler:]):
+	(-[IFWebController policyHandler]):
+	(+[IFWebController defaultURLPolicyForURL:]):
+	* WebView.subproj/IFWebControllerPrivate.h:
+	* WebView.subproj/IFWebControllerPrivate.mm:
+	(-[IFWebControllerPrivate dealloc]):
+	(-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:]):
+	(-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:]):
+	(-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
+	(-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFWebDataSource.h:
+	* WebView.subproj/IFWebDataSource.mm:
+	(-[IFWebDataSource representation]):
+	(-[IFWebDataSource isDocumentHTML]):
+	(-[IFWebDataSource documentTextFromDOM]):
+	* WebView.subproj/IFWebDataSourcePrivate.h:
+	* WebView.subproj/IFWebDataSourcePrivate.mm:
+	(-[IFWebDataSourcePrivate dealloc]):
+	(-[IFWebDataSource _setRepresentation:]):
+	(-[IFWebDataSource _stopLoading]):
+	(-[IFWebDataSource _isDocumentHTML]):
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame setProvisionalDataSource:]):
+	* WebView.subproj/IFWebFramePrivate.mm:
+	(-[IFWebFrame _isLoadComplete]):
+
 2002-06-14  Darin Adler  <darin at apple.com>
 
 	* Panels.subproj/IFStandardPanels.m: Use the real PTHREAD_ONCE_INIT,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index d6f4976..2090620 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,68 @@
+2002-06-14  Richard Williamson  <rjw at apple.com>
+
+    Added handlers to IFWebController.  Should eventually be possible to use
+    IFWebController w/o subclassing.
+    
+    Changed IFResourceProgressHandler to pass back resource handle instead of
+    string description.  This will address the needs descibed in 2954160.
+    
+    Fixed many incorrect references to datasource reps.
+    
+	* Plugins.subproj/IFNullPluginView.mm:
+	(-[IFNullPluginView drawRect:]):
+	* Plugins.subproj/IFPluginStream.mm:
+	(-[IFPluginStream IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFPluginStream IFURLHandleResourceDidCancelLoading:]):
+	(-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]):
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebDataSource _bridge]):
+	(-[IFWebCoreBridge createNewFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
+	* WebView.subproj/IFDocument.h:
+	* WebView.subproj/IFHTMLRepresentation.h:
+	* WebView.subproj/IFHTMLRepresentationPrivate.h:
+	* WebView.subproj/IFHTMLView.mm:
+	(-[IFHTMLView provisionalDataSourceChanged:]):
+	(-[IFHTMLView viewWillStartLiveResize]):
+	(-[IFHTMLView viewDidEndLiveResize]):
+	* WebView.subproj/IFImageView.m:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
+	(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+	(-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]):
+	* WebView.subproj/IFWebController.h:
+	* WebView.subproj/IFWebController.mm:
+	(-[IFWebController createFrameNamed:for:inParent:allowsScrolling:]):
+	(-[IFWebController setResourceProgressHandler:]):
+	(-[IFWebController resourceProgressHandler]):
+	(-[IFWebController setPolicyHandler:]):
+	(-[IFWebController policyHandler]):
+	(+[IFWebController defaultURLPolicyForURL:]):
+	* WebView.subproj/IFWebControllerPrivate.h:
+	* WebView.subproj/IFWebControllerPrivate.mm:
+	(-[IFWebControllerPrivate dealloc]):
+	(-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:]):
+	(-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:]):
+	(-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
+	(-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFWebDataSource.h:
+	* WebView.subproj/IFWebDataSource.mm:
+	(-[IFWebDataSource representation]):
+	(-[IFWebDataSource isDocumentHTML]):
+	(-[IFWebDataSource documentTextFromDOM]):
+	* WebView.subproj/IFWebDataSourcePrivate.h:
+	* WebView.subproj/IFWebDataSourcePrivate.mm:
+	(-[IFWebDataSourcePrivate dealloc]):
+	(-[IFWebDataSource _setRepresentation:]):
+	(-[IFWebDataSource _stopLoading]):
+	(-[IFWebDataSource _isDocumentHTML]):
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame setProvisionalDataSource:]):
+	* WebView.subproj/IFWebFramePrivate.mm:
+	(-[IFWebFrame _isLoadComplete]):
+
 2002-06-14  Darin Adler  <darin at apple.com>
 
 	* Panels.subproj/IFStandardPanels.m: Use the real PTHREAD_ONCE_INIT,
diff --git a/WebKit/Plugins.subproj/IFNullPluginView.mm b/WebKit/Plugins.subproj/IFNullPluginView.mm
index d730fcf..0768420 100644
--- a/WebKit/Plugins.subproj/IFNullPluginView.mm
+++ b/WebKit/Plugins.subproj/IFNullPluginView.mm
@@ -62,7 +62,7 @@ static NSImage *image = nil;
         errorSent = YES;
         webView = [self _IF_superviewWithName:@"IFWebView"];
         webController = [webView controller];
-        [webController pluginNotFoundForMIMEType:mimeType pluginPageURL:pluginPage];
+        [[webController policyHandler] pluginNotFoundForMIMEType:mimeType pluginPageURL:pluginPage];
     }
 }
 
diff --git a/WebKit/Plugins.subproj/IFPluginStream.mm b/WebKit/Plugins.subproj/IFPluginStream.mm
index 7b06fa5..f0bf1a0 100644
--- a/WebKit/Plugins.subproj/IFPluginStream.mm
+++ b/WebKit/Plugins.subproj/IFPluginStream.mm
@@ -138,8 +138,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = [sender contentLength];
     loadProgress->bytesSoFar = [sender contentLengthReceived];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
 }
 
@@ -174,8 +174,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = [data length];
     loadProgress->bytesSoFar = [data length];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
     
     [self stop];
@@ -188,8 +188,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = -1;
     loadProgress->bytesSoFar = -1;
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
     
     [self stop];
@@ -203,7 +203,7 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->bytesSoFar = [sender contentLengthReceived];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
     
-    [[view webController] receivedError: result forResource: [[sender url] absoluteString] 
+    [[[view webController] resourceProgressHandler] receivedError: result forResourceHandle: sender 
         partialProgress: loadProgress fromDataSource: [view webDataSource]];
     [loadProgress release];
     
diff --git a/WebKit/Plugins.subproj/WebNullPluginView.m b/WebKit/Plugins.subproj/WebNullPluginView.m
index d730fcf..0768420 100644
--- a/WebKit/Plugins.subproj/WebNullPluginView.m
+++ b/WebKit/Plugins.subproj/WebNullPluginView.m
@@ -62,7 +62,7 @@ static NSImage *image = nil;
         errorSent = YES;
         webView = [self _IF_superviewWithName:@"IFWebView"];
         webController = [webView controller];
-        [webController pluginNotFoundForMIMEType:mimeType pluginPageURL:pluginPage];
+        [[webController policyHandler] pluginNotFoundForMIMEType:mimeType pluginPageURL:pluginPage];
     }
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginStream.m b/WebKit/Plugins.subproj/WebPluginStream.m
index 7b06fa5..f0bf1a0 100644
--- a/WebKit/Plugins.subproj/WebPluginStream.m
+++ b/WebKit/Plugins.subproj/WebPluginStream.m
@@ -138,8 +138,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = [sender contentLength];
     loadProgress->bytesSoFar = [sender contentLengthReceived];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
 }
 
@@ -174,8 +174,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = [data length];
     loadProgress->bytesSoFar = [data length];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
     
     [self stop];
@@ -188,8 +188,8 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->totalToLoad = -1;
     loadProgress->bytesSoFar = -1;
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
-    [[view webController] receivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: [view webDataSource]];
+    [[[view webController] resourceProgressHandler] receivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: [view webDataSource]];
     [loadProgress release];
     
     [self stop];
@@ -203,7 +203,7 @@ static NSString *getCarbonPath(NSString *posixPath);
     loadProgress->bytesSoFar = [sender contentLengthReceived];
     loadProgress->type = IF_LOAD_TYPE_PLUGIN;
     
-    [[view webController] receivedError: result forResource: [[sender url] absoluteString] 
+    [[[view webController] resourceProgressHandler] receivedError: result forResourceHandle: sender 
         partialProgress: loadProgress fromDataSource: [view webDataSource]];
     [loadProgress release];
     
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index df2bbde..9203360 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -6,15 +6,16 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <WebKit/IFWebCoreBridge.h>
-
+#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFWebController.h>
-#import <WebKit/IFWebFramePrivate.h>
+#import <WebKit/IFWebCoreBridge.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFramePrivate.h>
 #import <WebKit/IFWebViewPrivate.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFHTMLViewPrivate.h>
+
 #import <WebFoundation/IFURLCacheLoaderConstants.h>
+
 #import <KWQKHTMLPartImpl.h>
 
 #import <WebKit/WebKitDebug.h>
@@ -31,7 +32,7 @@
 
 - (IFWebCoreBridge *)_bridge
 {
-    return [[self representation] _bridge];
+    return [(IFHTMLRepresentation *)[self representation] _bridge];
 }
 
 @end
@@ -117,7 +118,7 @@
     withURL:(NSURL *)URL renderPart:(khtml::RenderPart *)renderPart
     allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
 {
-    IFWebFrame *frame = [[self controller] createFrameNamed:frameName for:nil inParent:dataSource inScrollView:allowsScrolling];
+    IFWebFrame *frame = [[self controller] createFrameNamed:frameName for:nil inParent:dataSource allowsScrolling:allowsScrolling];
     if (frame == nil) {
         return NO;
     }
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index df2bbde..9203360 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -6,15 +6,16 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <WebKit/IFWebCoreBridge.h>
-
+#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFWebController.h>
-#import <WebKit/IFWebFramePrivate.h>
+#import <WebKit/IFWebCoreBridge.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFramePrivate.h>
 #import <WebKit/IFWebViewPrivate.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFHTMLViewPrivate.h>
+
 #import <WebFoundation/IFURLCacheLoaderConstants.h>
+
 #import <KWQKHTMLPartImpl.h>
 
 #import <WebKit/WebKitDebug.h>
@@ -31,7 +32,7 @@
 
 - (IFWebCoreBridge *)_bridge
 {
-    return [[self representation] _bridge];
+    return [(IFHTMLRepresentation *)[self representation] _bridge];
 }
 
 @end
@@ -117,7 +118,7 @@
     withURL:(NSURL *)URL renderPart:(khtml::RenderPart *)renderPart
     allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
 {
-    IFWebFrame *frame = [[self controller] createFrameNamed:frameName for:nil inParent:dataSource inScrollView:allowsScrolling];
+    IFWebFrame *frame = [[self controller] createFrameNamed:frameName for:nil inParent:dataSource allowsScrolling:allowsScrolling];
     if (frame == nil) {
         return NO;
     }
diff --git a/WebKit/WebView.subproj/IFDocument.h b/WebKit/WebView.subproj/IFDocument.h
index ac9509f..f5c3223 100644
--- a/WebKit/WebView.subproj/IFDocument.h
+++ b/WebKit/WebView.subproj/IFDocument.h
@@ -8,7 +8,7 @@
 @class IFWebDataSource;
 @class IFError;
 
- at protocol IFDocumentLoading
+ at protocol IFDocumentView <NSObject>
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource;
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource; 
@@ -26,7 +26,7 @@
 - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag;
 @end
 
- at protocol IFDocumentRepresentation
+ at protocol IFDocumentRepresentation <NSObject>
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)dataSource;
 - (void)receivedError:(IFError *)error withDataSource:(IFWebDataSource *)dataSource;
 - (void)finishedLoadingWithDataSource:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/IFHTMLRepresentation.h b/WebKit/WebView.subproj/IFHTMLRepresentation.h
index 7dc0f38..a40beba 100644
--- a/WebKit/WebView.subproj/IFHTMLRepresentation.h
+++ b/WebKit/WebView.subproj/IFHTMLRepresentation.h
@@ -21,7 +21,6 @@ class KHTMLPart;
     IFHTMLRepresentationPrivate *_private;
 }
 
-- (KHTMLPart *)part;
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)dataSource;
 - (void)receivedError:(IFError *)error withDataSource:(IFWebDataSource *)dataSource;
 - (void)finishedLoadingWithDataSource:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/IFHTMLRepresentationPrivate.h b/WebKit/WebView.subproj/IFHTMLRepresentationPrivate.h
index 4242361..7205f73 100644
--- a/WebKit/WebView.subproj/IFHTMLRepresentationPrivate.h
+++ b/WebKit/WebView.subproj/IFHTMLRepresentationPrivate.h
@@ -5,6 +5,7 @@
 
 #import <WebKit/IFHTMLRepresentation.h>
 
- at interface IFHTMLRepresentation <IFPrivate>
+ at interface IFHTMLRepresentation (IFPrivate)
 - (IFWebCoreBridge *)_bridge;
+- (KHTMLPart *)part;
 @end
diff --git a/WebKit/WebView.subproj/IFHTMLView.mm b/WebKit/WebView.subproj/IFHTMLView.mm
index 5f148ac..c5ad0c8 100644
--- a/WebKit/WebView.subproj/IFHTMLView.mm
+++ b/WebKit/WebView.subproj/IFHTMLView.mm
@@ -2,19 +2,16 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFHTMLView.h>
-#import <WebKit/IFHTMLViewPrivate.h>
-#import <WebKit/IFWebView.h>
-#import <WebKit/IFWebViewPrivate.h>
-#import <WebKit/IFWebFrame.h>
-#import <WebKit/IFWebDataSource.h>
-#import <WebKit/IFWebDataSourcePrivate.h>
-#import <WebKit/IFWebController.h>
 #import <WebKit/IFDynamicScrollBarsView.h>
 #import <WebKit/IFException.h>
-#import <WebKit/WebKitDebug.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLViewPrivate.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFNSViewExtras.h>
+#import <WebKit/IFWebController.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebKit/IFWebViewPrivate.h>
+#import <WebKit/WebKitDebug.h>
 
 // Needed for the mouse move notification.
 #import <AppKit/NSResponder_Private.h>
@@ -102,7 +99,7 @@
     
     // Nasty!  Setup the cross references between the KHTMLView and
     // the KHTMLPart.
-    KHTMLPart *part = [[dataSource representation] part];
+    KHTMLPart *part = [(IFHTMLRepresentation *)[dataSource representation] part];
 
     _private->provisionalWidget = new KHTMLView (part, 0);
     part->impl->setView (_private->provisionalWidget);
@@ -411,23 +408,23 @@
 
 - (void)viewWillStartLiveResize
 {
-    //id scrollView = [[self superview] superview];
-    //_private->liveAllowsScrolling = [scrollView allowsScrolling];
-    //[scrollView setAllowsScrolling: NO];
+    [super viewWillStartLiveResize];
 }
 
 - (void)viewDidEndLiveResize
 {
     id scrollView = [[self superview] superview];
 
-    //[scrollView setAllowsScrolling: _private->liveAllowsScrolling];
-
-    [scrollView updateScrollers];
-    [scrollView tile];
+    [super viewDidEndLiveResize];
+    
+    if ([scrollView isKindOfClass: [NSScrollView class]]){
+        [scrollView updateScrollers];
+        [scrollView tile];
+        [scrollView setNeedsDisplay: YES];
+    }
 
     [self setNeedsLayout: YES];
     [self setNeedsDisplay: YES];
-    [scrollView setNeedsDisplay: YES];
 }
 
 
diff --git a/WebKit/WebView.subproj/IFImageView.m b/WebKit/WebView.subproj/IFImageView.m
index d6dc566..f53d35a 100644
--- a/WebKit/WebView.subproj/IFImageView.m
+++ b/WebKit/WebView.subproj/IFImageView.m
@@ -3,8 +3,9 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import "IFImageView.h"
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFDynamicScrollBarsView.h>
+#import <WebKit/IFImageView.h>
 #import <WebKit/IFImageRenderer.h>
 #import <WebKit/IFImageRepresentation.h>
 #import <WebKit/IFNSViewExtras.h>
@@ -30,11 +31,13 @@
     [super dealloc];
 }
 
+
 - (BOOL)isFlipped 
 {
     return YES;
 }
 
+
 - (void)drawRect:(NSRect)rect {
     IFImageRenderer *image;
     
@@ -44,25 +47,24 @@
     }
 }
 
+
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource
 {
 
 }
 
+
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource
 {
     representation = [[dataSource representation] retain];
 }
 
+
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource
 {
 
 }
 
-- (void)setFrame:(NSRect)frameRect
-{
-    [super setFrame:frameRect];
-}
 
 - (void)layout
 {
@@ -77,6 +79,7 @@
 
 }
 
+
 - (void)setCanDragFrom: (BOOL)flag
 {
     canDragFrom = flag;
@@ -87,11 +90,13 @@
     return canDragFrom;
 }
 
+
 - (void)setCanDragTo: (BOOL)flag
 {
     canDragTo = flag;
 }
 
+
 - (BOOL)canDragTo
 {
     return canDragTo;
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 55ec0ee..7f74fdb 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -6,7 +6,7 @@
 
 #import <WebKit/IFDocument.h>
 #import <WebKit/IFDownloadHandler.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
 #import <WebKit/IFMainURLHandleClient.h>
@@ -68,7 +68,7 @@
     loadProgress->totalToLoad = -1;
     loadProgress->bytesSoFar = -1;
     [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
@@ -99,13 +99,18 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = [data length];
     loadProgress->bytesSoFar = [data length];
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
+    IFError *nonTerminalError = [sender error];
+    if (nonTerminalError){
+        [[dataSource controller] _mainReceivedError:nonTerminalError forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    }
+    
     [downloadHandler finishedLoading];
     [downloadHandler release];
     downloadHandler = nil;
@@ -186,8 +191,8 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = contentLength;
     loadProgress->bytesSoFar = contentLengthReceived;
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     
     isFirstChunk = NO;
@@ -204,8 +209,8 @@
     loadProgress->totalToLoad = [sender contentLength];
     loadProgress->bytesSoFar = [sender contentLengthReceived];
 
-    [(IFWebController *)[dataSource controller] _mainReceivedError:result forResource:[[sender url] absoluteString] partialProgress:loadProgress fromDataSource:dataSource];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _mainReceivedError:result forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
@@ -221,14 +226,14 @@
     
     WEBKIT_ASSERT(url != nil);
     
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [newURL retain];
     [url release];
     url = newURL;
-    [(IFWebController *)[dataSource controller] _didStartLoading:url];
+    [[dataSource controller] _didStartLoading:url];
 
-    if([dataSource isDocumentHTML]) 
-        [[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
+    if([dataSource _isDocumentHTML]) 
+        [(IFHTMLRepresentation *)[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
     [dataSource _setFinalURL:url];
     
     [[dataSource _locationChangeHandler] serverRedirectTo:url forDataSource:dataSource];
diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index e280fbc..212611f 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -31,11 +31,12 @@
 @class IFDownloadHandler;
 @class IFError;
 @class IFLoadProgress;
+ at class IFURLHandle;
+ at class IFWebController;
+ at class IFWebControllerPrivate;
 @class IFWebDataSource;
 @class IFWebFrame;
 @class IFWebView;
- at class IFWebController;
- at class IFWebControllerPrivate;
 
 @protocol IFDocumentLoading;
 
@@ -59,9 +60,42 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+
+ at end
+
+
+/*
+   ============================================================================= 
+
+   ============================================================================= 
+*/
+
+typedef enum {
+    IFURLPolicyUseContentPolicy,
+    IFURLPolicyOpenExternally,
+    IFURLPolicyIgnore
+} IFURLPolicy;
+
+
+ at protocol IFWebControllerPolicyHandler <NSObject>
+
+- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
+
+// 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
+// ignore the URL.  The default implementation could return +defaultURLPolicyForURL:.
+- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
+
+// We may have different errors that cause the the policy to be un-implementable, i.e.
+// launch services failure, etc.
+- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
+
+// Called when a plug-in for a certain mime type is not installed
+- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
 
 @end
 
@@ -96,13 +130,7 @@
    ============================================================================= 
 */
 
-typedef enum {
-    IFURLPolicyUseContentPolicy,
-    IFURLPolicyOpenExternally,
-    IFURLPolicyIgnore
-} IFURLPolicy;
-
- at interface IFWebController : NSObject <IFResourceProgressHandler, IFScriptContextHandler>
+ at interface IFWebController : NSObject <IFScriptContextHandler>
 {
 @private
     IFWebControllerPrivate *_private;
@@ -114,12 +142,21 @@ typedef enum {
 // Designated initializer.
 - initWithView: (IFWebView *)view provisionalDataSource: (IFWebDataSource *)dataSource;
 
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler;
+- (id<IFResourceProgressHandler>)resourceProgressHandler;
+
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url;
+
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler;
+- (id<IFWebControllerPolicyHandler>)policyHandler;
+
 - (void)setDirectsAllLinksToSystemBrowser: (BOOL)flag;
 - (BOOL)directsAllLinksToSystemBrowser;
 
+// FIXME:  Should this method be private?
 // Called when a data source needs to create a frame.  This method encapsulates the
 // specifics of creating and initializaing a view of the appropriate class.
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent allowsScrolling: (BOOL)allowsScrolling;
 
 // Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
@@ -133,34 +170,14 @@ typedef enum {
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 // Return the frame associated with the view.  Traverses the
-// frame tree to find the data source.  Typically aView is
-// an IFWebView.
+// frame tree to find the view. 
 - (IFWebFrame *)frameForView: (IFWebView *)aView;
 
-// DEPRECATED
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
-
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url;
-
-// 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 (i.e. Alexander), hand the URL off to launch services (i.e. Mail), or
-// ignore the URL (i.e. Help Viewer?).  This API could potentially be used by mac manager
-// to filter allowable URLs.
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
-
-// We may have different errors that cause the the policy to be un-implementable, i.e.
-// launch services failure, etc.
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
-
-// FIXME:  this method should be moved to a protocol
-// Called when a plug-in for a certain mime type is not installed
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
-
-// Typically called after requestContentPolicyForContentMIMEType: is sent to a locationChangeHander.
-// The content policy of HTML URLs should always be IFContentPolicyShow.  Setting the policy to 
-// IFContentPolicyIgnore will cancel the load of the URL if it is still pending.  The path argument 
-// is only used when the policy is either IFContentPolicySave or IFContentPolicyOpenExternally.
+// Typically called after requestContentPolicyForContentMIMEType: is sent to a
+// locationChangeHander.  The content policy of HTML URLs should always be IFContentPolicyShow.
+// Setting the policy to IFContentPolicyIgnore will cancel the load of the URL if it is still
+// pending.  The path argument is only used when the policy is either IFContentPolicySave or
+// IFContentPolicyOpenExternally.
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler;
 
 // API to manage animated images.
diff --git a/WebKit/WebView.subproj/IFWebController.mm b/WebKit/WebView.subproj/IFWebController.mm
index e268503..8226598 100644
--- a/WebKit/WebView.subproj/IFWebController.mm
+++ b/WebKit/WebView.subproj/IFWebController.mm
@@ -53,7 +53,7 @@
     return NO;
 }
 
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource inScrollView: (BOOL)inScrollView
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource allowsScrolling: (BOOL)allowsScrolling
 {
     IFWebView *childView;
     IFWebFrame *newFrame;
@@ -67,7 +67,7 @@
     [childView _setController: self];
     [childDataSource _setController: self];
 
-    [childView setAllowsScrolling: inScrollView];
+    [childView setAllowsScrolling: allowsScrolling];
         
     return newFrame;
 }
@@ -96,39 +96,31 @@
 }
 
 
-// ---------------------------------------------------------------------
-// IFLoadHandler
-// ---------------------------------------------------------------------
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->resourceProgressHandler autorelease];
+    _private->resourceProgressHandler = [handler retain];
 }
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-// ---------------------------------------------------------------------
-// IFLocationChangeHandler
-// ---------------------------------------------------------------------
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame
+- (id<IFResourceProgressHandler>)resourceProgressHandler
 {
-    return nil;
+    return _private->resourceProgressHandler;
 }
 
 
-- (void)receivedPageTitle: (NSString *)title forDataSource: (IFWebDataSource *)dataSource
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->policyHandler autorelease];
+    _private->policyHandler = [handler retain];
 }
 
-
-- (void)serverRedirectTo: (NSURL *)url forDataSource: (IFWebDataSource *)dataSource
+- (id<IFWebControllerPolicyHandler>)policyHandler
 {
-    // Do nothing.  Subclasses typically override this method.
+    return _private->policyHandler;
 }
 
+
 - (IFWebFrame *)_frameForDataSource: (IFWebDataSource *)dataSource fromFrame: (IFWebFrame *)frame
 {
     NSArray *frames;
@@ -220,17 +212,8 @@
     return _private->mainFrame;
 }
 
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url
-{
-    return nil;
-}
-
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url
 {
     if([IFURLHandle canInitWithURL:url]){
         return IFURLPolicyUseContentPolicy;
@@ -239,10 +222,6 @@
     }
 }
 
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error
-{
-}
-
 
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler
 {
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.h b/WebKit/WebView.subproj/IFWebControllerPrivate.h
index bf07746..c1d198b 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.h
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.h
@@ -4,7 +4,6 @@
 */
 
 #import <WebKit/IFWebController.h>
-//#import <WebKit/IFDocument.h>
 
 @class IFError;
 @class IFLoadProgress;
@@ -13,14 +12,16 @@
 @interface IFWebControllerPrivate : NSObject
 {
     IFWebFrame *mainFrame;
+    id<IFResourceProgressHandler> resourceProgressHandler;
+    id<IFWebControllerPolicyHandler> policyHandler;
 }
 @end
 
 @interface IFWebController (IFPrivate);
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
 - (void)_didStartLoading: (NSURL *)url;
 - (void)_didStopLoading: (NSURL *)url;
 @end
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.mm b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
index 68b4c27..686ccac 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
@@ -2,21 +2,23 @@
     IFWebController.mm
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFPreferencesPrivate.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
 #import <WebKit/IFWebControllerPrivate.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
-#import <WebKit/IFWebViewPrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
-#import <WebKit/IFPreferencesPrivate.h>
-#import <WebKit/IFLoadProgress.h>
-#import <WebKit/IFWebController.h>
-#import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/IFWebViewPrivate.h>
+
+#import <WebKit/WebKitDebug.h>
 
 #import <WebFoundation/IFError.h>
 #import <WebFoundation/IFURLCacheLoaderConstants.h>
+#import <WebFoundation/IFURLHandle.h>
+
 #import <khtml_part.h>
 #import <rendering/render_frames.h>
 
-#import <WebKit/WebKitDebug.h>
 
 @implementation IFWebControllerPrivate
 
@@ -51,6 +53,7 @@
 
     [mainFrame reset];
     [mainFrame autorelease];
+    [resourceProgressHandler autorelease];
 
     [super dealloc];
 }
@@ -60,7 +63,7 @@
 
 @implementation IFWebController (IFPrivate)
 
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     
@@ -70,15 +73,15 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         if (frame != nil) {
             IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-            [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
-            [dataSource _addError: error forResource: resourceDescription];
+            [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
+            [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
             [error release];
             [frame _checkLoadComplete];
         }
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     // This resouce has completed, so check if the load is complete for all frames.
     if (progress->bytesSoFar == progress->totalToLoad){
@@ -89,7 +92,7 @@
     }
 }
 
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     IFContentPolicy contentPolicy = [dataSource contentPolicy];
@@ -100,14 +103,14 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         [dataSource _setPrimaryLoadComplete: YES];
         IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-        [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+        [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
         [dataSource _setMainDocumentError: error];
         [error release];
         [frame _checkLoadComplete];
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     if(progress->bytesSoFar == progress->totalToLoad){
         if(contentPolicy == IFContentPolicyOpenExternally || contentPolicy == IFContentPolicySave)
@@ -145,28 +148,28 @@
 
 
 
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
 
     if ([dataSource _isStopping])
         return;
     
     WEBKIT_ASSERT (frame != nil);
 
-    [dataSource _addError: error forResource: resourceDescription];
+    [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
     
     [frame _checkLoadComplete];
 }
 
 
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
     
     if ([dataSource _isStopping])
         return;
diff --git a/WebKit/WebView.subproj/IFWebDataSource.h b/WebKit/WebView.subproj/IFWebDataSource.h
index ca53666..89136cf 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.h
+++ b/WebKit/WebView.subproj/IFWebDataSource.h
@@ -46,7 +46,7 @@
 
 - (NSData *)data;
 
-- (id)representation;
+- (id <IFDocumentRepresentation>)representation;
 
 // Returns YES if this is the main document.  The main document is the 'top'
 // document, typically either a frameset or a normal HTML document.
diff --git a/WebKit/WebView.subproj/IFWebDataSource.mm b/WebKit/WebView.subproj/IFWebDataSource.mm
index 6c160d7..02e782a 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.mm
+++ b/WebKit/WebView.subproj/IFWebDataSource.mm
@@ -3,19 +3,15 @@
 	Copyright 2001, 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFWebDataSource.h>
-#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFException.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebController.h>
 #import <WebKit/IFWebFramePrivate.h>
+#import <WebKit/WebKitDebug.h>
+
 #import <WebFoundation/WebFoundation.h>
-#import <WebKit/IFHTMLView.h>
-#import <WebKit/IFImageView.h>
-#import <WebKit/IFTextView.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFTextRepresentation.h>
 
 #import <xml/dom_docimpl.h>
 
@@ -63,7 +59,7 @@
     }
 }
 
-- (id) representation
+- (id <IFDocumentRepresentation>) representation
 {
     return _private->representation;
 }
@@ -241,7 +237,7 @@
 
 - (BOOL)isDocumentHTML
 {
-    return [[[self representation] className] isEqualToString:@"IFHTMLRepresentation"];
+    return [[self representation] isKindOfClass: [IFHTMLRepresentation class]];
 }
 
 // Get the actual source of the docment.
@@ -261,7 +257,7 @@
     if([self isDocumentHTML]){
         DOM::DocumentImpl *doc;
         NSString *string = nil;
-        KHTMLPart *part = [[self representation] part];
+        KHTMLPart *part = [(IFHTMLRepresentation *)[self representation] part];
         
         if (part != 0){
             doc = part->xmlDocImpl();
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index 56fd24c..9ea4478 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -19,7 +19,7 @@
 {
     NSData *resourceData;
 
-    id representation;
+    id <IFDocumentRepresentation> representation;
     
     IFWebDataSource *parent;
     NSMutableArray *children;
@@ -77,7 +77,7 @@
 - (void)_setController: (IFWebController *)controller;
 - (void)_setParent: (IFWebDataSource *)p;
 - (void)_startLoading: (BOOL)forceRefresh;
-
+- (BOOL)_isDocumentHTML;
 - (void)_stopLoading;
 - (BOOL)_isStopping;
 - (void)_recursiveStopLoading;
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index ee8b00c..ce04f16 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -6,20 +6,23 @@
         NSWebPageDataSource.
 */
 
-#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFDocument.h>
+#import <WebKit/IFException.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
+#import <WebKit/IFImageRepresentation.h>
+#import <WebKit/IFLocationChangeHandler.h>
 #import <WebKit/IFMainURLHandleClient.h>
+#import <WebKit/IFTextRepresentation.h>
+#import <WebKit/IFWebController.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
-#import <WebKit/IFException.h>
 #import <WebKit/WebKitDebug.h>
-#import <WebFoundation/IFURLHandle.h>
+
 #import <WebFoundation/IFError.h>
 #import <WebFoundation/IFNSStringExtensions.h>
-#import <WebKit/IFLocationChangeHandler.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFTextRepresentation.h>
+#import <WebFoundation/IFURLHandle.h>
+
 #import <KWQKHTMLPartImpl.h>
-#import "IFWebController.h"
 
 #import <kurl.h>
 
@@ -67,7 +70,6 @@ static NSMutableDictionary *_repTypes=nil;
     [errors release];
     [mainDocumentError release];
 
-
     [super dealloc];
 }
 
@@ -81,7 +83,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->resourceData = [data retain];
 }
 
-- (void)_setRepresentation:(id) representation
+- (void)_setRepresentation:(id <IFDocumentRepresentation>) representation
 {
     [_private->representation release];
     _private->representation = [representation retain];
@@ -209,8 +211,8 @@ static NSMutableDictionary *_repTypes=nil;
         [[_private->urlHandles objectAtIndex: i] cancelLoadInBackground];
     }
 
-    if ([self isDocumentHTML])
-        [[self representation] part]->closeURL();        
+    if ([self _isDocumentHTML])
+        [(IFHTMLRepresentation *)[self representation] part]->closeURL();        
 }
 
 - (void)_recursiveStopLoading
@@ -348,6 +350,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->mainDocumentError = nil;
 }
 
+
 - (void)_addError: (IFError *)error forResource: (NSString *)resourceDescription
 {
     if (_private->errors == 0)
@@ -356,6 +359,13 @@ static NSMutableDictionary *_repTypes=nil;
     [_private->errors setObject: error forKey: resourceDescription];
 }
 
+
+- (BOOL)_isDocumentHTML
+{
+    return [[self representation] isKindOfClass: [IFHTMLRepresentation class]];
+}
+
+
 + (NSMutableDictionary *)_repTypes
 {
     if(!_repTypes){
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index 6e81489..db6abc5 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -128,7 +128,7 @@
     // KDE drop we should fix this dependency.
     WEBKIT_ASSERT ([self webView] != nil);
 
-    urlPolicy = [[self controller] URLPolicyForURL:[newDataSource inputURL]];
+    urlPolicy = [[[self controller] policyHandler] URLPolicyForURL:[newDataSource inputURL]];
 
     if(urlPolicy == IFURLPolicyUseContentPolicy){
             
@@ -136,7 +136,7 @@
             [self stopLoading];
         }
         
-        locationChangeHandler = [[self controller] provideLocationChangeHandlerForFrame: self];
+        locationChangeHandler = [[[self controller] policyHandler] provideLocationChangeHandlerForFrame: self];
     
         [newDataSource _setLocationChangeHandler: locationChangeHandler];
     
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index dbe458e..ffe867f 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -4,7 +4,7 @@
     Copyright 2001, Apple, Inc. All rights reserved.
 */
 #import <WebKit/IFDynamicScrollBarsView.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFHTMLView.h>
 #import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFLocationChangeHandler.h>
@@ -348,8 +348,8 @@ static const char * const stateNames[6] = {
 
                 [self _setState: IFWEBFRAMESTATE_COMPLETE];
                 
-                if([ds isDocumentHTML])
-                    [[ds representation] part]->end();
+                if([ds _isDocumentHTML])
+                    [(IFHTMLRepresentation *)[ds representation] part]->end();
                 
                 // We have to layout the main document as
                 // it may change the size of frames.
@@ -366,8 +366,8 @@ static const char * const stateNames[6] = {
                 [[thisView documentView] layout];
 
                 // Jump to anchor point, if necessary.
-                if ([ds isDocumentHTML])
-                    [[ds representation] part]->impl->gotoBaseAnchor();
+                if ([ds _isDocumentHTML])
+                    [(IFHTMLRepresentation *)[ds representation] part]->impl->gotoBaseAnchor();
                                    
                 // FIXME:  We have to draw the whole document hierarchy.  We should be 
                 // able to just draw the document associated with this
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index e280fbc..212611f 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -31,11 +31,12 @@
 @class IFDownloadHandler;
 @class IFError;
 @class IFLoadProgress;
+ at class IFURLHandle;
+ at class IFWebController;
+ at class IFWebControllerPrivate;
 @class IFWebDataSource;
 @class IFWebFrame;
 @class IFWebView;
- at class IFWebController;
- at class IFWebControllerPrivate;
 
 @protocol IFDocumentLoading;
 
@@ -59,9 +60,42 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+
+ at end
+
+
+/*
+   ============================================================================= 
+
+   ============================================================================= 
+*/
+
+typedef enum {
+    IFURLPolicyUseContentPolicy,
+    IFURLPolicyOpenExternally,
+    IFURLPolicyIgnore
+} IFURLPolicy;
+
+
+ at protocol IFWebControllerPolicyHandler <NSObject>
+
+- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
+
+// 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
+// ignore the URL.  The default implementation could return +defaultURLPolicyForURL:.
+- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
+
+// We may have different errors that cause the the policy to be un-implementable, i.e.
+// launch services failure, etc.
+- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
+
+// Called when a plug-in for a certain mime type is not installed
+- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
 
 @end
 
@@ -96,13 +130,7 @@
    ============================================================================= 
 */
 
-typedef enum {
-    IFURLPolicyUseContentPolicy,
-    IFURLPolicyOpenExternally,
-    IFURLPolicyIgnore
-} IFURLPolicy;
-
- at interface IFWebController : NSObject <IFResourceProgressHandler, IFScriptContextHandler>
+ at interface IFWebController : NSObject <IFScriptContextHandler>
 {
 @private
     IFWebControllerPrivate *_private;
@@ -114,12 +142,21 @@ typedef enum {
 // Designated initializer.
 - initWithView: (IFWebView *)view provisionalDataSource: (IFWebDataSource *)dataSource;
 
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler;
+- (id<IFResourceProgressHandler>)resourceProgressHandler;
+
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url;
+
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler;
+- (id<IFWebControllerPolicyHandler>)policyHandler;
+
 - (void)setDirectsAllLinksToSystemBrowser: (BOOL)flag;
 - (BOOL)directsAllLinksToSystemBrowser;
 
+// FIXME:  Should this method be private?
 // Called when a data source needs to create a frame.  This method encapsulates the
 // specifics of creating and initializaing a view of the appropriate class.
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent allowsScrolling: (BOOL)allowsScrolling;
 
 // Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
@@ -133,34 +170,14 @@ typedef enum {
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 // Return the frame associated with the view.  Traverses the
-// frame tree to find the data source.  Typically aView is
-// an IFWebView.
+// frame tree to find the view. 
 - (IFWebFrame *)frameForView: (IFWebView *)aView;
 
-// DEPRECATED
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
-
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url;
-
-// 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 (i.e. Alexander), hand the URL off to launch services (i.e. Mail), or
-// ignore the URL (i.e. Help Viewer?).  This API could potentially be used by mac manager
-// to filter allowable URLs.
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
-
-// We may have different errors that cause the the policy to be un-implementable, i.e.
-// launch services failure, etc.
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
-
-// FIXME:  this method should be moved to a protocol
-// Called when a plug-in for a certain mime type is not installed
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
-
-// Typically called after requestContentPolicyForContentMIMEType: is sent to a locationChangeHander.
-// The content policy of HTML URLs should always be IFContentPolicyShow.  Setting the policy to 
-// IFContentPolicyIgnore will cancel the load of the URL if it is still pending.  The path argument 
-// is only used when the policy is either IFContentPolicySave or IFContentPolicyOpenExternally.
+// Typically called after requestContentPolicyForContentMIMEType: is sent to a
+// locationChangeHander.  The content policy of HTML URLs should always be IFContentPolicyShow.
+// Setting the policy to IFContentPolicyIgnore will cancel the load of the URL if it is still
+// pending.  The path argument is only used when the policy is either IFContentPolicySave or
+// IFContentPolicyOpenExternally.
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler;
 
 // API to manage animated images.
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index e268503..8226598 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -53,7 +53,7 @@
     return NO;
 }
 
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource inScrollView: (BOOL)inScrollView
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource allowsScrolling: (BOOL)allowsScrolling
 {
     IFWebView *childView;
     IFWebFrame *newFrame;
@@ -67,7 +67,7 @@
     [childView _setController: self];
     [childDataSource _setController: self];
 
-    [childView setAllowsScrolling: inScrollView];
+    [childView setAllowsScrolling: allowsScrolling];
         
     return newFrame;
 }
@@ -96,39 +96,31 @@
 }
 
 
-// ---------------------------------------------------------------------
-// IFLoadHandler
-// ---------------------------------------------------------------------
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->resourceProgressHandler autorelease];
+    _private->resourceProgressHandler = [handler retain];
 }
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-// ---------------------------------------------------------------------
-// IFLocationChangeHandler
-// ---------------------------------------------------------------------
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame
+- (id<IFResourceProgressHandler>)resourceProgressHandler
 {
-    return nil;
+    return _private->resourceProgressHandler;
 }
 
 
-- (void)receivedPageTitle: (NSString *)title forDataSource: (IFWebDataSource *)dataSource
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->policyHandler autorelease];
+    _private->policyHandler = [handler retain];
 }
 
-
-- (void)serverRedirectTo: (NSURL *)url forDataSource: (IFWebDataSource *)dataSource
+- (id<IFWebControllerPolicyHandler>)policyHandler
 {
-    // Do nothing.  Subclasses typically override this method.
+    return _private->policyHandler;
 }
 
+
 - (IFWebFrame *)_frameForDataSource: (IFWebDataSource *)dataSource fromFrame: (IFWebFrame *)frame
 {
     NSArray *frames;
@@ -220,17 +212,8 @@
     return _private->mainFrame;
 }
 
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url
-{
-    return nil;
-}
-
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url
 {
     if([IFURLHandle canInitWithURL:url]){
         return IFURLPolicyUseContentPolicy;
@@ -239,10 +222,6 @@
     }
 }
 
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error
-{
-}
-
 
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler
 {
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index bf07746..c1d198b 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -4,7 +4,6 @@
 */
 
 #import <WebKit/IFWebController.h>
-//#import <WebKit/IFDocument.h>
 
 @class IFError;
 @class IFLoadProgress;
@@ -13,14 +12,16 @@
 @interface IFWebControllerPrivate : NSObject
 {
     IFWebFrame *mainFrame;
+    id<IFResourceProgressHandler> resourceProgressHandler;
+    id<IFWebControllerPolicyHandler> policyHandler;
 }
 @end
 
 @interface IFWebController (IFPrivate);
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
 - (void)_didStartLoading: (NSURL *)url;
 - (void)_didStopLoading: (NSURL *)url;
 @end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 68b4c27..686ccac 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -2,21 +2,23 @@
     IFWebController.mm
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFPreferencesPrivate.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
 #import <WebKit/IFWebControllerPrivate.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
-#import <WebKit/IFWebViewPrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
-#import <WebKit/IFPreferencesPrivate.h>
-#import <WebKit/IFLoadProgress.h>
-#import <WebKit/IFWebController.h>
-#import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/IFWebViewPrivate.h>
+
+#import <WebKit/WebKitDebug.h>
 
 #import <WebFoundation/IFError.h>
 #import <WebFoundation/IFURLCacheLoaderConstants.h>
+#import <WebFoundation/IFURLHandle.h>
+
 #import <khtml_part.h>
 #import <rendering/render_frames.h>
 
-#import <WebKit/WebKitDebug.h>
 
 @implementation IFWebControllerPrivate
 
@@ -51,6 +53,7 @@
 
     [mainFrame reset];
     [mainFrame autorelease];
+    [resourceProgressHandler autorelease];
 
     [super dealloc];
 }
@@ -60,7 +63,7 @@
 
 @implementation IFWebController (IFPrivate)
 
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     
@@ -70,15 +73,15 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         if (frame != nil) {
             IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-            [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
-            [dataSource _addError: error forResource: resourceDescription];
+            [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
+            [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
             [error release];
             [frame _checkLoadComplete];
         }
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     // This resouce has completed, so check if the load is complete for all frames.
     if (progress->bytesSoFar == progress->totalToLoad){
@@ -89,7 +92,7 @@
     }
 }
 
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     IFContentPolicy contentPolicy = [dataSource contentPolicy];
@@ -100,14 +103,14 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         [dataSource _setPrimaryLoadComplete: YES];
         IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-        [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+        [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
         [dataSource _setMainDocumentError: error];
         [error release];
         [frame _checkLoadComplete];
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     if(progress->bytesSoFar == progress->totalToLoad){
         if(contentPolicy == IFContentPolicyOpenExternally || contentPolicy == IFContentPolicySave)
@@ -145,28 +148,28 @@
 
 
 
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
 
     if ([dataSource _isStopping])
         return;
     
     WEBKIT_ASSERT (frame != nil);
 
-    [dataSource _addError: error forResource: resourceDescription];
+    [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
     
     [frame _checkLoadComplete];
 }
 
 
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
     
     if ([dataSource _isStopping])
         return;
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index ca53666..89136cf 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -46,7 +46,7 @@
 
 - (NSData *)data;
 
-- (id)representation;
+- (id <IFDocumentRepresentation>)representation;
 
 // Returns YES if this is the main document.  The main document is the 'top'
 // document, typically either a frameset or a normal HTML document.
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 6c160d7..02e782a 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -3,19 +3,15 @@
 	Copyright 2001, 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFWebDataSource.h>
-#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFException.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebController.h>
 #import <WebKit/IFWebFramePrivate.h>
+#import <WebKit/WebKitDebug.h>
+
 #import <WebFoundation/WebFoundation.h>
-#import <WebKit/IFHTMLView.h>
-#import <WebKit/IFImageView.h>
-#import <WebKit/IFTextView.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFTextRepresentation.h>
 
 #import <xml/dom_docimpl.h>
 
@@ -63,7 +59,7 @@
     }
 }
 
-- (id) representation
+- (id <IFDocumentRepresentation>) representation
 {
     return _private->representation;
 }
@@ -241,7 +237,7 @@
 
 - (BOOL)isDocumentHTML
 {
-    return [[[self representation] className] isEqualToString:@"IFHTMLRepresentation"];
+    return [[self representation] isKindOfClass: [IFHTMLRepresentation class]];
 }
 
 // Get the actual source of the docment.
@@ -261,7 +257,7 @@
     if([self isDocumentHTML]){
         DOM::DocumentImpl *doc;
         NSString *string = nil;
-        KHTMLPart *part = [[self representation] part];
+        KHTMLPart *part = [(IFHTMLRepresentation *)[self representation] part];
         
         if (part != 0){
             doc = part->xmlDocImpl();
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 56fd24c..9ea4478 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -19,7 +19,7 @@
 {
     NSData *resourceData;
 
-    id representation;
+    id <IFDocumentRepresentation> representation;
     
     IFWebDataSource *parent;
     NSMutableArray *children;
@@ -77,7 +77,7 @@
 - (void)_setController: (IFWebController *)controller;
 - (void)_setParent: (IFWebDataSource *)p;
 - (void)_startLoading: (BOOL)forceRefresh;
-
+- (BOOL)_isDocumentHTML;
 - (void)_stopLoading;
 - (BOOL)_isStopping;
 - (void)_recursiveStopLoading;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index ee8b00c..ce04f16 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -6,20 +6,23 @@
         NSWebPageDataSource.
 */
 
-#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFDocument.h>
+#import <WebKit/IFException.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
+#import <WebKit/IFImageRepresentation.h>
+#import <WebKit/IFLocationChangeHandler.h>
 #import <WebKit/IFMainURLHandleClient.h>
+#import <WebKit/IFTextRepresentation.h>
+#import <WebKit/IFWebController.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
-#import <WebKit/IFException.h>
 #import <WebKit/WebKitDebug.h>
-#import <WebFoundation/IFURLHandle.h>
+
 #import <WebFoundation/IFError.h>
 #import <WebFoundation/IFNSStringExtensions.h>
-#import <WebKit/IFLocationChangeHandler.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFTextRepresentation.h>
+#import <WebFoundation/IFURLHandle.h>
+
 #import <KWQKHTMLPartImpl.h>
-#import "IFWebController.h"
 
 #import <kurl.h>
 
@@ -67,7 +70,6 @@ static NSMutableDictionary *_repTypes=nil;
     [errors release];
     [mainDocumentError release];
 
-
     [super dealloc];
 }
 
@@ -81,7 +83,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->resourceData = [data retain];
 }
 
-- (void)_setRepresentation:(id) representation
+- (void)_setRepresentation:(id <IFDocumentRepresentation>) representation
 {
     [_private->representation release];
     _private->representation = [representation retain];
@@ -209,8 +211,8 @@ static NSMutableDictionary *_repTypes=nil;
         [[_private->urlHandles objectAtIndex: i] cancelLoadInBackground];
     }
 
-    if ([self isDocumentHTML])
-        [[self representation] part]->closeURL();        
+    if ([self _isDocumentHTML])
+        [(IFHTMLRepresentation *)[self representation] part]->closeURL();        
 }
 
 - (void)_recursiveStopLoading
@@ -348,6 +350,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->mainDocumentError = nil;
 }
 
+
 - (void)_addError: (IFError *)error forResource: (NSString *)resourceDescription
 {
     if (_private->errors == 0)
@@ -356,6 +359,13 @@ static NSMutableDictionary *_repTypes=nil;
     [_private->errors setObject: error forKey: resourceDescription];
 }
 
+
+- (BOOL)_isDocumentHTML
+{
+    return [[self representation] isKindOfClass: [IFHTMLRepresentation class]];
+}
+
+
 + (NSMutableDictionary *)_repTypes
 {
     if(!_repTypes){
diff --git a/WebKit/WebView.subproj/WebDocument.h b/WebKit/WebView.subproj/WebDocument.h
index ac9509f..f5c3223 100644
--- a/WebKit/WebView.subproj/WebDocument.h
+++ b/WebKit/WebView.subproj/WebDocument.h
@@ -8,7 +8,7 @@
 @class IFWebDataSource;
 @class IFError;
 
- at protocol IFDocumentLoading
+ at protocol IFDocumentView <NSObject>
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource;
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource; 
@@ -26,7 +26,7 @@
 - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag;
 @end
 
- at protocol IFDocumentRepresentation
+ at protocol IFDocumentRepresentation <NSObject>
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)dataSource;
 - (void)receivedError:(IFError *)error withDataSource:(IFWebDataSource *)dataSource;
 - (void)finishedLoadingWithDataSource:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 6e81489..db6abc5 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -128,7 +128,7 @@
     // KDE drop we should fix this dependency.
     WEBKIT_ASSERT ([self webView] != nil);
 
-    urlPolicy = [[self controller] URLPolicyForURL:[newDataSource inputURL]];
+    urlPolicy = [[[self controller] policyHandler] URLPolicyForURL:[newDataSource inputURL]];
 
     if(urlPolicy == IFURLPolicyUseContentPolicy){
             
@@ -136,7 +136,7 @@
             [self stopLoading];
         }
         
-        locationChangeHandler = [[self controller] provideLocationChangeHandlerForFrame: self];
+        locationChangeHandler = [[[self controller] policyHandler] provideLocationChangeHandlerForFrame: self];
     
         [newDataSource _setLocationChangeHandler: locationChangeHandler];
     
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index dbe458e..ffe867f 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -4,7 +4,7 @@
     Copyright 2001, Apple, Inc. All rights reserved.
 */
 #import <WebKit/IFDynamicScrollBarsView.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFHTMLView.h>
 #import <WebKit/IFHTMLViewPrivate.h>
 #import <WebKit/IFLocationChangeHandler.h>
@@ -348,8 +348,8 @@ static const char * const stateNames[6] = {
 
                 [self _setState: IFWEBFRAMESTATE_COMPLETE];
                 
-                if([ds isDocumentHTML])
-                    [[ds representation] part]->end();
+                if([ds _isDocumentHTML])
+                    [(IFHTMLRepresentation *)[ds representation] part]->end();
                 
                 // We have to layout the main document as
                 // it may change the size of frames.
@@ -366,8 +366,8 @@ static const char * const stateNames[6] = {
                 [[thisView documentView] layout];
 
                 // Jump to anchor point, if necessary.
-                if ([ds isDocumentHTML])
-                    [[ds representation] part]->impl->gotoBaseAnchor();
+                if ([ds _isDocumentHTML])
+                    [(IFHTMLRepresentation *)[ds representation] part]->impl->gotoBaseAnchor();
                                    
                 // FIXME:  We have to draw the whole document hierarchy.  We should be 
                 // able to just draw the document associated with this
diff --git a/WebKit/WebView.subproj/WebHTMLRepresentation.h b/WebKit/WebView.subproj/WebHTMLRepresentation.h
index 7dc0f38..a40beba 100644
--- a/WebKit/WebView.subproj/WebHTMLRepresentation.h
+++ b/WebKit/WebView.subproj/WebHTMLRepresentation.h
@@ -21,7 +21,6 @@ class KHTMLPart;
     IFHTMLRepresentationPrivate *_private;
 }
 
-- (KHTMLPart *)part;
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)dataSource;
 - (void)receivedError:(IFError *)error withDataSource:(IFWebDataSource *)dataSource;
 - (void)finishedLoadingWithDataSource:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/WebHTMLRepresentationPrivate.h b/WebKit/WebView.subproj/WebHTMLRepresentationPrivate.h
index 4242361..7205f73 100644
--- a/WebKit/WebView.subproj/WebHTMLRepresentationPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLRepresentationPrivate.h
@@ -5,6 +5,7 @@
 
 #import <WebKit/IFHTMLRepresentation.h>
 
- at interface IFHTMLRepresentation <IFPrivate>
+ at interface IFHTMLRepresentation (IFPrivate)
 - (IFWebCoreBridge *)_bridge;
+- (KHTMLPart *)part;
 @end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 5f148ac..c5ad0c8 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -2,19 +2,16 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFHTMLView.h>
-#import <WebKit/IFHTMLViewPrivate.h>
-#import <WebKit/IFWebView.h>
-#import <WebKit/IFWebViewPrivate.h>
-#import <WebKit/IFWebFrame.h>
-#import <WebKit/IFWebDataSource.h>
-#import <WebKit/IFWebDataSourcePrivate.h>
-#import <WebKit/IFWebController.h>
 #import <WebKit/IFDynamicScrollBarsView.h>
 #import <WebKit/IFException.h>
-#import <WebKit/WebKitDebug.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLViewPrivate.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFNSViewExtras.h>
+#import <WebKit/IFWebController.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebKit/IFWebViewPrivate.h>
+#import <WebKit/WebKitDebug.h>
 
 // Needed for the mouse move notification.
 #import <AppKit/NSResponder_Private.h>
@@ -102,7 +99,7 @@
     
     // Nasty!  Setup the cross references between the KHTMLView and
     // the KHTMLPart.
-    KHTMLPart *part = [[dataSource representation] part];
+    KHTMLPart *part = [(IFHTMLRepresentation *)[dataSource representation] part];
 
     _private->provisionalWidget = new KHTMLView (part, 0);
     part->impl->setView (_private->provisionalWidget);
@@ -411,23 +408,23 @@
 
 - (void)viewWillStartLiveResize
 {
-    //id scrollView = [[self superview] superview];
-    //_private->liveAllowsScrolling = [scrollView allowsScrolling];
-    //[scrollView setAllowsScrolling: NO];
+    [super viewWillStartLiveResize];
 }
 
 - (void)viewDidEndLiveResize
 {
     id scrollView = [[self superview] superview];
 
-    //[scrollView setAllowsScrolling: _private->liveAllowsScrolling];
-
-    [scrollView updateScrollers];
-    [scrollView tile];
+    [super viewDidEndLiveResize];
+    
+    if ([scrollView isKindOfClass: [NSScrollView class]]){
+        [scrollView updateScrollers];
+        [scrollView tile];
+        [scrollView setNeedsDisplay: YES];
+    }
 
     [self setNeedsLayout: YES];
     [self setNeedsDisplay: YES];
-    [scrollView setNeedsDisplay: YES];
 }
 
 
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index d6dc566..f53d35a 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -3,8 +3,9 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import "IFImageView.h"
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFDynamicScrollBarsView.h>
+#import <WebKit/IFImageView.h>
 #import <WebKit/IFImageRenderer.h>
 #import <WebKit/IFImageRepresentation.h>
 #import <WebKit/IFNSViewExtras.h>
@@ -30,11 +31,13 @@
     [super dealloc];
 }
 
+
 - (BOOL)isFlipped 
 {
     return YES;
 }
 
+
 - (void)drawRect:(NSRect)rect {
     IFImageRenderer *image;
     
@@ -44,25 +47,24 @@
     }
 }
 
+
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource
 {
 
 }
 
+
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource
 {
     representation = [[dataSource representation] retain];
 }
 
+
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource
 {
 
 }
 
-- (void)setFrame:(NSRect)frameRect
-{
-    [super setFrame:frameRect];
-}
 
 - (void)layout
 {
@@ -77,6 +79,7 @@
 
 }
 
+
 - (void)setCanDragFrom: (BOOL)flag
 {
     canDragFrom = flag;
@@ -87,11 +90,13 @@
     return canDragFrom;
 }
 
+
 - (void)setCanDragTo: (BOOL)flag
 {
     canDragTo = flag;
 }
 
+
 - (BOOL)canDragTo
 {
     return canDragTo;
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 55ec0ee..7f74fdb 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -6,7 +6,7 @@
 
 #import <WebKit/IFDocument.h>
 #import <WebKit/IFDownloadHandler.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
 #import <WebKit/IFMainURLHandleClient.h>
@@ -68,7 +68,7 @@
     loadProgress->totalToLoad = -1;
     loadProgress->bytesSoFar = -1;
     [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
@@ -99,13 +99,18 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = [data length];
     loadProgress->bytesSoFar = [data length];
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
+    IFError *nonTerminalError = [sender error];
+    if (nonTerminalError){
+        [[dataSource controller] _mainReceivedError:nonTerminalError forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    }
+    
     [downloadHandler finishedLoading];
     [downloadHandler release];
     downloadHandler = nil;
@@ -186,8 +191,8 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = contentLength;
     loadProgress->bytesSoFar = contentLengthReceived;
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     
     isFirstChunk = NO;
@@ -204,8 +209,8 @@
     loadProgress->totalToLoad = [sender contentLength];
     loadProgress->bytesSoFar = [sender contentLengthReceived];
 
-    [(IFWebController *)[dataSource controller] _mainReceivedError:result forResource:[[sender url] absoluteString] partialProgress:loadProgress fromDataSource:dataSource];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _mainReceivedError:result forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
@@ -221,14 +226,14 @@
     
     WEBKIT_ASSERT(url != nil);
     
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [newURL retain];
     [url release];
     url = newURL;
-    [(IFWebController *)[dataSource controller] _didStartLoading:url];
+    [[dataSource controller] _didStartLoading:url];
 
-    if([dataSource isDocumentHTML]) 
-        [[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
+    if([dataSource _isDocumentHTML]) 
+        [(IFHTMLRepresentation *)[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
     [dataSource _setFinalURL:url];
     
     [[dataSource _locationChangeHandler] serverRedirectTo:url forDataSource:dataSource];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 55ec0ee..7f74fdb 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -6,7 +6,7 @@
 
 #import <WebKit/IFDocument.h>
 #import <WebKit/IFDownloadHandler.h>
-#import <WebKit/IFHTMLRepresentation.h>
+#import <WebKit/IFHTMLRepresentationPrivate.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
 #import <WebKit/IFMainURLHandleClient.h>
@@ -68,7 +68,7 @@
     loadProgress->totalToLoad = -1;
     loadProgress->bytesSoFar = -1;
     [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
@@ -99,13 +99,18 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = [data length];
     loadProgress->bytesSoFar = [data length];
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
+    IFError *nonTerminalError = [sender error];
+    if (nonTerminalError){
+        [[dataSource controller] _mainReceivedError:nonTerminalError forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    }
+    
     [downloadHandler finishedLoading];
     [downloadHandler release];
     downloadHandler = nil;
@@ -186,8 +191,8 @@
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
     loadProgress->totalToLoad = contentLength;
     loadProgress->bytesSoFar = contentLengthReceived;
-    [(IFWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
-        forResource: [[sender url] absoluteString] fromDataSource: dataSource];
+    [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
+        forResourceHandle: sender fromDataSource: dataSource];
     [loadProgress release];
     
     isFirstChunk = NO;
@@ -204,8 +209,8 @@
     loadProgress->totalToLoad = [sender contentLength];
     loadProgress->bytesSoFar = [sender contentLengthReceived];
 
-    [(IFWebController *)[dataSource controller] _mainReceivedError:result forResource:[[sender url] absoluteString] partialProgress:loadProgress fromDataSource:dataSource];
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _mainReceivedError:result forResourceHandle:sender partialProgress:loadProgress fromDataSource:dataSource];
+    [[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
     
@@ -221,14 +226,14 @@
     
     WEBKIT_ASSERT(url != nil);
     
-    [(IFWebController *)[dataSource controller] _didStopLoading:url];
+    [[dataSource controller] _didStopLoading:url];
     [newURL retain];
     [url release];
     url = newURL;
-    [(IFWebController *)[dataSource controller] _didStartLoading:url];
+    [[dataSource controller] _didStartLoading:url];
 
-    if([dataSource isDocumentHTML]) 
-        [[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
+    if([dataSource _isDocumentHTML]) 
+        [(IFHTMLRepresentation *)[dataSource representation] part]->impl->setBaseURL([[url absoluteString] cString]);
     [dataSource _setFinalURL:url];
     
     [[dataSource _locationChangeHandler] serverRedirectTo:url forDataSource:dataSource];
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index e280fbc..212611f 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -31,11 +31,12 @@
 @class IFDownloadHandler;
 @class IFError;
 @class IFLoadProgress;
+ at class IFURLHandle;
+ at class IFWebController;
+ at class IFWebControllerPrivate;
 @class IFWebDataSource;
 @class IFWebFrame;
 @class IFWebView;
- at class IFWebController;
- at class IFWebControllerPrivate;
 
 @protocol IFDocumentLoading;
 
@@ -59,9 +60,42 @@
     typically for non-base URLs this should be done after a URL (i.e. image)
     has been completely downloaded.
 */
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+
+ at end
+
+
+/*
+   ============================================================================= 
+
+   ============================================================================= 
+*/
+
+typedef enum {
+    IFURLPolicyUseContentPolicy,
+    IFURLPolicyOpenExternally,
+    IFURLPolicyIgnore
+} IFURLPolicy;
+
+
+ at protocol IFWebControllerPolicyHandler <NSObject>
+
+- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
+
+// 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
+// ignore the URL.  The default implementation could return +defaultURLPolicyForURL:.
+- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
+
+// We may have different errors that cause the the policy to be un-implementable, i.e.
+// launch services failure, etc.
+- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
+
+// Called when a plug-in for a certain mime type is not installed
+- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
 
 @end
 
@@ -96,13 +130,7 @@
    ============================================================================= 
 */
 
-typedef enum {
-    IFURLPolicyUseContentPolicy,
-    IFURLPolicyOpenExternally,
-    IFURLPolicyIgnore
-} IFURLPolicy;
-
- at interface IFWebController : NSObject <IFResourceProgressHandler, IFScriptContextHandler>
+ at interface IFWebController : NSObject <IFScriptContextHandler>
 {
 @private
     IFWebControllerPrivate *_private;
@@ -114,12 +142,21 @@ typedef enum {
 // Designated initializer.
 - initWithView: (IFWebView *)view provisionalDataSource: (IFWebDataSource *)dataSource;
 
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler;
+- (id<IFResourceProgressHandler>)resourceProgressHandler;
+
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url;
+
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler;
+- (id<IFWebControllerPolicyHandler>)policyHandler;
+
 - (void)setDirectsAllLinksToSystemBrowser: (BOOL)flag;
 - (BOOL)directsAllLinksToSystemBrowser;
 
+// FIXME:  Should this method be private?
 // Called when a data source needs to create a frame.  This method encapsulates the
 // specifics of creating and initializaing a view of the appropriate class.
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent inScrollView: (BOOL)inScrollView;
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)child inParent: (IFWebDataSource *)parent allowsScrolling: (BOOL)allowsScrolling;
 
 // Look for a frame named name, recursively.
 - (IFWebFrame *)frameNamed: (NSString *)name;
@@ -133,34 +170,14 @@ typedef enum {
 - (IFWebFrame *)frameForDataSource: (IFWebDataSource *)dataSource;
 
 // Return the frame associated with the view.  Traverses the
-// frame tree to find the data source.  Typically aView is
-// an IFWebView.
+// frame tree to find the view. 
 - (IFWebFrame *)frameForView: (IFWebView *)aView;
 
-// DEPRECATED
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame;
-
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url;
-
-// 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 (i.e. Alexander), hand the URL off to launch services (i.e. Mail), or
-// ignore the URL (i.e. Help Viewer?).  This API could potentially be used by mac manager
-// to filter allowable URLs.
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url;
-
-// We may have different errors that cause the the policy to be un-implementable, i.e.
-// launch services failure, etc.
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error;
-
-// FIXME:  this method should be moved to a protocol
-// Called when a plug-in for a certain mime type is not installed
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url;
-
-// Typically called after requestContentPolicyForContentMIMEType: is sent to a locationChangeHander.
-// The content policy of HTML URLs should always be IFContentPolicyShow.  Setting the policy to 
-// IFContentPolicyIgnore will cancel the load of the URL if it is still pending.  The path argument 
-// is only used when the policy is either IFContentPolicySave or IFContentPolicyOpenExternally.
+// Typically called after requestContentPolicyForContentMIMEType: is sent to a
+// locationChangeHander.  The content policy of HTML URLs should always be IFContentPolicyShow.
+// Setting the policy to IFContentPolicyIgnore will cancel the load of the URL if it is still
+// pending.  The path argument is only used when the policy is either IFContentPolicySave or
+// IFContentPolicyOpenExternally.
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler;
 
 // API to manage animated images.
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index e268503..8226598 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -53,7 +53,7 @@
     return NO;
 }
 
-- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource inScrollView: (BOOL)inScrollView
+- (IFWebFrame *)createFrameNamed: (NSString *)fname for: (IFWebDataSource *)childDataSource inParent: (IFWebDataSource *)parentDataSource allowsScrolling: (BOOL)allowsScrolling
 {
     IFWebView *childView;
     IFWebFrame *newFrame;
@@ -67,7 +67,7 @@
     [childView _setController: self];
     [childDataSource _setController: self];
 
-    [childView setAllowsScrolling: inScrollView];
+    [childView setAllowsScrolling: allowsScrolling];
         
     return newFrame;
 }
@@ -96,39 +96,31 @@
 }
 
 
-// ---------------------------------------------------------------------
-// IFLoadHandler
-// ---------------------------------------------------------------------
-- (void)receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)setResourceProgressHandler: (id<IFResourceProgressHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->resourceProgressHandler autorelease];
+    _private->resourceProgressHandler = [handler retain];
 }
 
-- (void)receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-// ---------------------------------------------------------------------
-// IFLocationChangeHandler
-// ---------------------------------------------------------------------
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame
+- (id<IFResourceProgressHandler>)resourceProgressHandler
 {
-    return nil;
+    return _private->resourceProgressHandler;
 }
 
 
-- (void)receivedPageTitle: (NSString *)title forDataSource: (IFWebDataSource *)dataSource
+- (void)setPolicyHandler: (id<IFWebControllerPolicyHandler>)handler
 {
-    // Do nothing.  Subclasses typically override this method.
+    [_private->policyHandler autorelease];
+    _private->policyHandler = [handler retain];
 }
 
-
-- (void)serverRedirectTo: (NSURL *)url forDataSource: (IFWebDataSource *)dataSource
+- (id<IFWebControllerPolicyHandler>)policyHandler
 {
-    // Do nothing.  Subclasses typically override this method.
+    return _private->policyHandler;
 }
 
+
 - (IFWebFrame *)_frameForDataSource: (IFWebDataSource *)dataSource fromFrame: (IFWebFrame *)frame
 {
     NSArray *frames;
@@ -220,17 +212,8 @@
     return _private->mainFrame;
 }
 
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)url
-{
-    // Do nothing.  Subclasses typically override this method.
-}
 
-- (id <IFLocationChangeHandler>)provideLocationChangeHandlerForFrame: (IFWebFrame *)frame andURL: (NSURL *)url
-{
-    return nil;
-}
-
-- (IFURLPolicy)URLPolicyForURL: (NSURL *)url
++ (IFURLPolicy)defaultURLPolicyForURL: (NSURL *)url
 {
     if([IFURLHandle canInitWithURL:url]){
         return IFURLPolicyUseContentPolicy;
@@ -239,10 +222,6 @@
     }
 }
 
-- (void)unableToImplementURLPolicyForURL: (NSURL *)url error: (IFError *)error
-{
-}
-
 
 - (void)haveContentPolicy: (IFContentPolicy)policy andPath: (NSString *)path forLocationChangeHandler: (id <IFLocationChangeHandler>)handler
 {
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index bf07746..c1d198b 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -4,7 +4,6 @@
 */
 
 #import <WebKit/IFWebController.h>
-//#import <WebKit/IFDocument.h>
 
 @class IFError;
 @class IFLoadProgress;
@@ -13,14 +12,16 @@
 @interface IFWebControllerPrivate : NSObject
 {
     IFWebFrame *mainFrame;
+    id<IFResourceProgressHandler> resourceProgressHandler;
+    id<IFWebControllerPolicyHandler> policyHandler;
 }
 @end
 
 @interface IFWebController (IFPrivate);
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
 - (void)_didStartLoading: (NSURL *)url;
 - (void)_didStopLoading: (NSURL *)url;
 @end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 68b4c27..686ccac 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -2,21 +2,23 @@
     IFWebController.mm
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
+#import <WebKit/IFLoadProgress.h>
+#import <WebKit/IFPreferencesPrivate.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
 #import <WebKit/IFWebControllerPrivate.h>
 #import <WebKit/IFWebDataSourcePrivate.h>
-#import <WebKit/IFWebViewPrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
-#import <WebKit/IFPreferencesPrivate.h>
-#import <WebKit/IFLoadProgress.h>
-#import <WebKit/IFWebController.h>
-#import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/IFWebViewPrivate.h>
+
+#import <WebKit/WebKitDebug.h>
 
 #import <WebFoundation/IFError.h>
 #import <WebFoundation/IFURLCacheLoaderConstants.h>
+#import <WebFoundation/IFURLHandle.h>
+
 #import <khtml_part.h>
 #import <rendering/render_frames.h>
 
-#import <WebKit/WebKitDebug.h>
 
 @implementation IFWebControllerPrivate
 
@@ -51,6 +53,7 @@
 
     [mainFrame reset];
     [mainFrame autorelease];
+    [resourceProgressHandler autorelease];
 
     [super dealloc];
 }
@@ -60,7 +63,7 @@
 
 @implementation IFWebController (IFPrivate)
 
-- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     
@@ -70,15 +73,15 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         if (frame != nil) {
             IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-            [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
-            [dataSource _addError: error forResource: resourceDescription];
+            [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
+            [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
             [error release];
             [frame _checkLoadComplete];
         }
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     // This resouce has completed, so check if the load is complete for all frames.
     if (progress->bytesSoFar == progress->totalToLoad){
@@ -89,7 +92,7 @@
     }
 }
 
-- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
     IFContentPolicy contentPolicy = [dataSource contentPolicy];
@@ -100,14 +103,14 @@
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         [dataSource _setPrimaryLoadComplete: YES];
         IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
-        [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+        [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
         [dataSource _setMainDocumentError: error];
         [error release];
         [frame _checkLoadComplete];
         return;
     }
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle fromDataSource: dataSource];
 
     if(progress->bytesSoFar == progress->totalToLoad){
         if(contentPolicy == IFContentPolicyOpenExternally || contentPolicy == IFContentPolicySave)
@@ -145,28 +148,28 @@
 
 
 
-- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
 
     if ([dataSource _isStopping])
         return;
     
     WEBKIT_ASSERT (frame != nil);
 
-    [dataSource _addError: error forResource: resourceDescription];
+    [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
     
     [frame _checkLoadComplete];
 }
 
 
-- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
+- (void)_mainReceivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource
 {
     IFWebFrame *frame = [dataSource webFrame];
 
-    [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+    [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
     
     if ([dataSource _isStopping])
         return;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list