[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:27:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f65f23c6604ace4b1a0a78e7d432ed0be91d795b
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 6 22:33:12 2003 +0000

    WebKit:
            Tweaks to WebKit API.
            Dropped URL on WebDataSource.
            Dropped start/stop loading on WebDataSource.
            Drop frameForView and frameForDataSource from WebController.
            Moved canShowXX to WebCapabilities.
    
            Reviewed by hyatt.
    
            * Downloads.subproj/WebDownload.m:
            (-[WebDownload errorWithCode:]):
            * Misc.subproj/WebNSPasteboardExtras.m:
            (-[NSPasteboard _web_bestURL]):
            * Misc.subproj/WebNSViewExtras.m:
            (-[NSView _web_printViewHierarchy:]):
            * Plugins.subproj/WebNetscapePluginDocumentView.m:
            (-[WebNetscapePluginDocumentView setDataSource:]):
            * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
            (-[WebNetscapePluginEmbeddedView dataSource]):
            * WebCoreSupport.subproj/WebSubresourceClient.m:
            (+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
            * WebKit.exp:
            * WebView.subproj/WebController.h:
            * WebView.subproj/WebController.m:
            (+[WebCapabilities canShowMIMEType:]):
            (+[WebCapabilities canShowFile:]):
            (-[WebController mainFrame]):
            * WebView.subproj/WebControllerPrivate.h:
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebController _frameForDataSource:fromFrame:]):
            (-[WebController _frameForDataSource:]):
            (-[WebController _frameForView:fromFrame:]):
            (-[WebController _frameForView:]):
            * WebView.subproj/WebDataSource.h:
            * WebView.subproj/WebDataSource.m:
            * WebView.subproj/WebDataSourcePrivate.h:
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _startLoading]):
            (-[WebDataSource _stopLoading]):
            (-[WebDataSource _stopLoadingInternal]):
            (-[WebDataSource _recursiveStopLoading]):
            (-[WebDataSource _updateIconDatabaseWithURL:]):
            (-[WebDataSource _loadIcon]):
            (-[WebDataSource _URL]):
            * WebView.subproj/WebDefaultContextMenuDelegate.m:
            (-[WebDefaultContextMenuDelegate openFrameInNewWindow:]):
            * WebView.subproj/WebDefaultPolicyDelegate.m:
            * WebView.subproj/WebFrame.m:
            (-[WebFrame stopLoading]):
            * WebView.subproj/WebFramePrivate.m:
            (if):
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _frame]):
            (-[WebHTMLView _elementAtPoint:]):
            * WebView.subproj/WebImageRepresentation.m:
            (-[WebImageRepresentation setDataSource:]):
            * WebView.subproj/WebImageView.m:
            (-[WebImageView menuForEvent:]):
            * WebView.subproj/WebMainResourceClient.m:
            (-[WebMainResourceClient cancel]):
            (-[WebMainResourceClient continueAfterContentPolicy:response:]):
            (-[WebMainResourceClient resource:didReceiveData:]):
            (-[WebMainResourceClient resourceDidFinishLoading:]):
            * WebView.subproj/WebTextView.m:
            (-[WebTextView menuForEvent:]):
            * WebView.subproj/WebView.m:
            (-[WebView webFrame]):
            * WebView.subproj/WebViewPrivate.m:
            (-[WebView _isMainFrame]):
    WebBrowser:
            Tweaks to WebKit API.
            Dropped URL on WebDataSource.
            Dropped start/stop loading on WebDataSource.
            Drop frameForView and frameForDataSource from WebController.
            Moved canShowXX to WebCapabilities.
    
            Reviewed by hyatt.
    
            * BrowserDocument.m:
            (-[BrowserDocument provisionalURL]):
            * BrowserDocumentController.m:
            (-[BrowserDocumentController openHTMLSourceDocumentWithDataSource:]):
            * BrowserWebController.m:
            (-[BrowserWebController contentPolicyForMIMEType:andRequest:inFrame:]):
            (-[BrowserWebController currentURL]):
            (-[BrowserWebController stopNonDownloadingDataSource:]):
            * BrowserWebViewExtras.m:
            (-[WebView largestScrollableWebView]):
            * DownloadProgressEntry.m:
            (-[DownloadProgressEntry stop]):
            * FormCompletionController.m:
            (domainFromFrame):
            (+[AutoFillController autoFillInController:]):
            * FrameProgressEntry.m:
            (-[FrameProgressEntry URL]):
            * HTMLSourceDocument.m:
            (-[HTMLSourceDocument fileName]):
            (-[HTMLSourceDocument displayName]):
            (-[HTMLSourceDocument browserDocumentLoadingFinished:]):
            * LoadProgressMonitor.m:
            (-[LoadProgressMonitor _busyStatus]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3768 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ffc9b40..abed39b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,74 @@
+2003-03-06  Richard Williamson   <rjw at apple.com>
+
+        Tweaks to WebKit API.
+        Dropped URL on WebDataSource.
+        Dropped start/stop loading on WebDataSource.
+        Drop frameForView and frameForDataSource from WebController.
+        Moved canShowXX to WebCapabilities.
+        
+        Reviewed by hyatt.
+
+        * Downloads.subproj/WebDownload.m:
+        (-[WebDownload errorWithCode:]):
+        * Misc.subproj/WebNSPasteboardExtras.m:
+        (-[NSPasteboard _web_bestURL]):
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_printViewHierarchy:]):
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):
+        * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
+        (-[WebNetscapePluginEmbeddedView dataSource]):
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        (+[WebSubresourceClient startLoadingResource:withURL:referrer:forDataSource:]):
+        * WebKit.exp:
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        (+[WebCapabilities canShowMIMEType:]):
+        (+[WebCapabilities canShowFile:]):
+        (-[WebController mainFrame]):
+        * WebView.subproj/WebControllerPrivate.h:
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebController _frameForDataSource:fromFrame:]):
+        (-[WebController _frameForDataSource:]):
+        (-[WebController _frameForView:fromFrame:]):
+        (-[WebController _frameForView:]):
+        * WebView.subproj/WebDataSource.h:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _startLoading]):
+        (-[WebDataSource _stopLoading]):
+        (-[WebDataSource _stopLoadingInternal]):
+        (-[WebDataSource _recursiveStopLoading]):
+        (-[WebDataSource _updateIconDatabaseWithURL:]):
+        (-[WebDataSource _loadIcon]):
+        (-[WebDataSource _URL]):
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultContextMenuDelegate openFrameInNewWindow:]):
+        * WebView.subproj/WebDefaultPolicyDelegate.m:
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame stopLoading]):
+        * WebView.subproj/WebFramePrivate.m:
+        (if):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _frame]):
+        (-[WebHTMLView _elementAtPoint:]):
+        * WebView.subproj/WebImageRepresentation.m:
+        (-[WebImageRepresentation setDataSource:]):
+        * WebView.subproj/WebImageView.m:
+        (-[WebImageView menuForEvent:]):
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient cancel]):
+        (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+        (-[WebMainResourceClient resource:didReceiveData:]):
+        (-[WebMainResourceClient resourceDidFinishLoading:]):
+        * WebView.subproj/WebTextView.m:
+        (-[WebTextView menuForEvent:]):
+        * WebView.subproj/WebView.m:
+        (-[WebView webFrame]):
+        * WebView.subproj/WebViewPrivate.m:
+        (-[WebView _isMainFrame]):
+
 2003-03-06  Ed Voas  voas at apple.com
 
         Reviewed by Richard.
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 5a09c04..efee4db 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -466,7 +466,7 @@ static void DeleteCompletionCallback(ParmBlkPtr paramBlock);
 {
     return [WebError errorWithCode:code
                           inDomain:WebErrorDomainWebKit
-                        failingURL:[[_private->dataSource URL] absoluteString]];
+                        failingURL:[[_private->dataSource _URL] absoluteString]];
 }
 
 - (void)cancelWithError:(WebError *)error
diff --git a/WebKit/Misc.subproj/WebNSPasteboardExtras.m b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
index 5825777..0771bbd 100644
--- a/WebKit/Misc.subproj/WebNSPasteboardExtras.m
+++ b/WebKit/Misc.subproj/WebNSPasteboardExtras.m
@@ -66,7 +66,7 @@ NSString *WebURLNamePboardType = nil;
             NSString *file = [files objectAtIndex:0];
             BOOL isDirectory;
             if([[NSFileManager defaultManager] fileExistsAtPath:file isDirectory:&isDirectory] && !isDirectory){
-                if ([WebController canShowFile:file]) {
+                if ([WebCapabilities canShowFile:file]) {
                     return [[NSURL fileURLWithPath:file] _web_canonicalize];
                 }
             }
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 365f111..68a439f 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -18,7 +18,7 @@
 #ifdef DEBUG_VIEWS
 @interface NSObject (Foo)
 - (void*)_renderFramePart;
-- (id)frameForView: (id)aView;
+- (id)_frameForView: (id)aView;
 - (id)_controller;
 @end
 #endif
@@ -157,7 +157,7 @@
     
     if ([self respondsToSelector: @selector(_controller)]){
         id aController = [self _controller];
-        id aFrame = [aController frameForView: self];
+        id aFrame = [aController _frameForView: self];
         rfp = [aFrame _renderFramePart];
     }
     
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 1dca710..952201d 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -64,7 +64,7 @@
     NSString *MIME = [[dataSource response] contentType];
     
     [self setMIMEType:MIME];
-    [self setBaseURL:[dataSource URL]];
+    [self setBaseURL:[[dataSource request] URL]];
 
     WebNetscapePluginPackage *thePlugin;
     thePlugin = (WebNetscapePluginPackage *)[[WebPluginDatabase installedPlugins] pluginForMIMEType:MIME];
@@ -73,7 +73,7 @@
         // FIXME: It would be nice to stop the load here.
         
         WebPluginError *error = [WebPluginError pluginErrorWithCode:WebKitErrorCannotLoadPlugin
-                                                         contentURL:[[theDataSource URL] absoluteString]
+                                                         contentURL:[[[theDataSource request] URL] absoluteString]
                                                       pluginPageURL:nil
                                                          pluginName:[thePlugin name]
                                                            MIMEType:MIME];
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m b/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
index 5c144c5..b6df99a 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginEmbeddedView.m
@@ -61,7 +61,7 @@
 - (WebDataSource *)dataSource
 {
     WebView *webView = (WebView *)[self _web_superviewOfClass:[WebView class]];
-    WebFrame *webFrame = [[[webView webFrame] controller] frameForView:webView];
+    WebFrame *webFrame = [webView webFrame];
 
     return [webFrame dataSource];
 }
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 5dab6e3..f768497 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -52,7 +52,7 @@
     [newRequest setReferrer:referrer];
     
     WebController *_controller = [source _controller];
-    [newRequest setCookiePolicyBaseURL:[[[_controller mainFrame] dataSource] URL]];
+    [newRequest setCookiePolicyBaseURL:[[[[_controller mainFrame] dataSource]  request] URL]];
     [newRequest setUserAgent:[_controller userAgentForURL:URL]];
     
     BOOL succeeded = [client loadWithRequest:newRequest];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 5dab6e3..f768497 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -52,7 +52,7 @@
     [newRequest setReferrer:referrer];
     
     WebController *_controller = [source _controller];
-    [newRequest setCookiePolicyBaseURL:[[[_controller mainFrame] dataSource] URL]];
+    [newRequest setCookiePolicyBaseURL:[[[[_controller mainFrame] dataSource]  request] URL]];
     [newRequest setUserAgent:[_controller userAgentForURL:URL]];
     
     BOOL succeeded = [client loadWithRequest:newRequest];
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index f4d19cf..84c9a25 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -2,6 +2,7 @@
 .objc_class_name_WebBookmark
 .objc_class_name_WebBookmarkGroup
 .objc_class_name_WebBookmarkImporter
+.objc_class_name_WebCapabilities
 .objc_class_name_WebController
 .objc_class_name_WebCoreStatistics
 .objc_class_name_WebDataSource
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 7ad46e4..0ce09ae 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -19,6 +19,25 @@
 @class WebPreferences;
 @class WebView;
 
+ at interface WebCapabilities : NSObject
+/*!
+    @method canShowMIMEType:
+    @abstract Checks if the WebKit can show content of a certain MIME type.
+    @param MIMEType The MIME type to check.
+    @result YES if the WebKit can show content with MIMEtype.
+*/
++ (BOOL)canShowMIMEType:(NSString *)MIMEType;
+
+/*!
+    @method canShowFile:
+    @abstract Checks if the WebKit can show the content of the file at the specified path.
+    @param path The path of the file to check
+    @result YES if the WebKit can show the content of the file at the specified path.
+*/
++ (BOOL)canShowFile:(NSString *)path;
+
+ at end
+
 // These strings are keys into the element dictionary provided in
 // the WebContextMenuDelegate's contextMenuItemsForElement and the WebControllerPolicyDelegate's clickPolicyForElement.
 
@@ -78,22 +97,6 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 }
 
 /*!
-    @method canShowMIMEType:
-    @abstract Checks if the WebKit can show content of a certain MIME type.
-    @param MIMEType The MIME type to check.
-    @result YES if the WebKit can show content with MIMEtype.
-*/    
-+ (BOOL)canShowMIMEType:(NSString *)MIMEType;
-
-/*!
-    @method canShowFile:
-    @abstract Checks if the WebKit can show the content of the file at the specified path.
-    @param path The path of the file to check
-    @result YES if the WebKit can show the content of the file at the specified path.
-*/    
-+ (BOOL)canShowFile:(NSString *)path;
-
-/*!
     @method initWithView:
     @abstract This method is a convenience equivalent to initWithView:view frameName:nil setName:nil
     @param view The view to use.
@@ -207,25 +210,6 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 - (WebFrame *)mainFrame;
 
 /*!
-    @method frameForDataSource:
-    @abstract Return the frame associated with the data source.  
-    @discussion Traverses the frame tree to find the frame associated
-    with a datasource.
-    @param datasource The datasource to  match against each frame.
-    @result The frame that has the associated datasource.
-*/    
-- (WebFrame *)frameForDataSource: (WebDataSource *)dataSource;
-
-/*!
-    @method frameForView:
-    @abstract Return the frame associated with the view.  
-    @discussion Traverses the frame tree to find the view. 
-    @param aView The view to match against each frame.
-    @result The frame that has the associated view.
-*/    
-- (WebFrame *)frameForView: (WebView *)aView;
-
-/*!
     @method backForwardList
     @result The backforward list for this controller.
 */    
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 3168b6b..827b5dc 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -54,6 +54,29 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
 
 
 
+ at implementation WebCapabilities
++ (BOOL)canShowMIMEType:(NSString *)MIMEType
+{
+    if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType]){
+        return YES;
+    }else{
+        // Have the plug-ins register views and representations
+        [WebPluginDatabase installedPlugins];
+        if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType])
+            return YES;
+    }
+    return NO;
+}
+
++ (BOOL)canShowFile:(NSString *)path
+{
+    NSString *MIMEType;
+
+    MIMEType = [WebController _MIMETypeForFile:path];
+    return [[self class] canShowMIMEType:MIMEType];
+}
+
+ at end
 
 @implementation WebController
 
@@ -183,93 +206,11 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     return _private->locationChangeDelegate;
 }
 
-- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
-{
-    NSArray *frames;
-    int i, count;
-    WebFrame *result, *aFrame;
-    
-    if ([frame dataSource] == dataSource)
-        return frame;
-        
-    if ([frame provisionalDataSource] == dataSource)
-        return frame;
-        
-    frames = [frame children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-
-    return nil;       
-}
-
-
-- (WebFrame *)frameForDataSource: (WebDataSource *)dataSource
-{
-    WebFrame *frame = [self mainFrame];
-    
-    return [self _frameForDataSource: dataSource fromFrame: frame];
-}
-
-
-- (WebFrame *)_frameForView: (WebView *)aView fromFrame: (WebFrame *)frame
-{
-    NSArray *frames;
-    int i, count;
-    WebFrame *result, *aFrame;
-    
-    if ([frame webView] == aView)
-        return frame;
-        
-    frames = [frame children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForView: aView fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-
-    return nil;       
-}
-
-- (WebFrame *)frameForView: (WebView *)aView
-{
-    WebFrame *frame = [self mainFrame];
-    
-    return [self _frameForView: aView fromFrame: frame];
-}
-
 - (WebFrame *)mainFrame
 {
     return _private->mainFrame;
 }
 
-+ (BOOL)canShowMIMEType:(NSString *)MIMEType
-{
-    if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType]){
-        return YES;
-    }else{
-        // Have the plug-ins register views and representations
-        [WebPluginDatabase installedPlugins];
-        if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType])
-            return YES;
-    }
-    return NO;
-}
-
-+ (BOOL)canShowFile:(NSString *)path
-{    
-    NSString *MIMEType;
-    
-    MIMEType = [[self class] _MIMETypeForFile:path];   
-    return [[self class] canShowMIMEType:MIMEType];
-}
-
 - (WebBackForwardList *)backForwardList
 {
     if (_private->useBackForwardList)
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 4fa6afb..19bd75f 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -54,6 +54,26 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
 
 @interface WebController (WebPrivate)
 
+/*!
+ at method frameForDataSource:
+ @abstract Return the frame associated with the data source.
+ @discussion Traverses the frame tree to find the frame associated
+ with a datasource.
+ @param datasource The datasource to  match against each frame.
+ @result The frame that has the associated datasource.
+ */
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource;
+
+    /*!
+            @method frameForView:
+     @abstract Return the frame associated with the view.
+     @discussion Traverses the frame tree to find the view.
+     @param aView The view to match against each frame.
+     @result The frame that has the associated view.
+     */
+- (WebFrame *)_frameForView: (WebView *)aView;
+
+
 - (WebFrame *)_createFrameNamed:(NSString *)name inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling;
 
 - (void)_finishedLoadingResourceFromDataSource:(WebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 03727f8..dbb9aa2 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -434,6 +434,68 @@
     return [_WebSafeForwarder safeForwarderWithTarget: [self windowOperationsDelegate] defaultTarget: [WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] templateClass: [WebDefaultWindowOperationsDelegate class]];
 }
 
+
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
+{
+    NSArray *frames;
+    int i, count;
+    WebFrame *result, *aFrame;
+
+    if ([frame dataSource] == dataSource)
+        return frame;
+
+    if ([frame provisionalDataSource] == dataSource)
+        return frame;
+
+    frames = [frame children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+
+    return nil;
+}
+
+
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource
+{
+    WebFrame *frame = [self mainFrame];
+
+    return [self _frameForDataSource: dataSource fromFrame: frame];
+}
+
+
+- (WebFrame *)_frameForView: (WebView *)aView fromFrame: (WebFrame *)frame
+{
+    NSArray *frames;
+    int i, count;
+    WebFrame *result, *aFrame;
+
+    if ([frame webView] == aView)
+        return frame;
+
+    frames = [frame children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForView: aView fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+
+    return nil;
+}
+
+- (WebFrame *)_frameForView: (WebView *)aView
+{
+    WebFrame *frame = [self mainFrame];
+
+    return [self _frameForView: aView fromFrame: frame];
+}
+
 @end
 
 
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 1b02c3e..15a04db 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -84,30 +84,6 @@
 - (WebResponse *)response;
 
 /*!
-    @method URL
-    @discussion The value of URL will change if a redirect occurs.
-    To monitor change in the URL, override the WebLocationChangeDelegate 
-    serverRedirectedForDataSource: method.
-    @result Returns the current URL associated with the datasource.
-*/
-- (NSURL *)URL;
-
-/*!
-    @method startLoading
-    @discussion Start actually getting and parsing data. If the data source
-    is still performing a previous load it will be stopped.
-*/
-- (void)startLoading;
-
-/*!
-    @method stopLoading
-    @discussion Cancels any pending loads.  A data source is conceptually only ever loading
-    one document at a time, although one document may have many related
-    resources.  stopLoading will stop all loads related to the data source.
-*/
-- (void)stopLoading;
-
-/*!
     @method isLoading
     @discussion Returns YES if there are any pending loads.
 */
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index fc4adfd..24a2c81 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -84,29 +84,6 @@
     return _private->response;
 }
 
-// May return nil if not initialized with a URL.
-- (NSURL *)URL
-{
-    return [[self request] URL];
-}
-
-
-- (void)startLoading
-{
-    [self _startLoading: nil];
-}
-
-
-// Cancels any pending loads.  A data source is conceptually only ever loading
-// one document at a time, although one document may have many related
-// resources.  stopLoading will stop all loads related to the data source.  This
-// method will also stop loads that may be loading in child frames.
-- (void)stopLoading
-{
-    [self _recursiveStopLoading];
-}
-
-
 // Returns YES if there are any pending loads.
 - (BOOL)isLoading
 {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index c93d58b..5d4feb0 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -113,13 +113,16 @@
 
 @interface WebDataSource (WebPrivate)
 
+- (void)_startLoading;
+- (void)_stopLoading;
+- (NSURL *)_URL;
 - (WebController *)_controller;
 - (void)_setResourceData:(NSData *)data;
 - (Class)_representationClass;
 - (void)_setRepresentation:(id<WebDocumentRepresentation>)representation;
 - (void)_setController:(WebController *)controller;
 - (void)_startLoading: (NSDictionary *)pageCache;
-- (void)_stopLoading;
+- (void)_stopLoadingInternal;
 - (BOOL)_isStopping;
 - (void)_recursiveStopLoading;
 - (void)_addSubresourceClient:(WebSubresourceClient *)client;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 1a42a3d..5407512 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -154,6 +154,21 @@
     }
 }
 
+- (void)_startLoading
+{
+    [self _startLoading: nil];
+}
+
+
+// Cancels any pending loads.  A data source is conceptually only ever loading
+// one document at a time, although one document may have many related
+// resources.  stopLoading will stop all loads related to the data source.  This
+// method will also stop loads that may be loading in child frames.
+- (void)_stopLoading
+{
+    [self _recursiveStopLoading];
+}
+
 
 - (void)_startLoading: (NSDictionary *)pageCache
 {
@@ -192,11 +207,6 @@
     }
 }
 
-- (void)_startLoading
-{
-    [self _startLoading: nil];
-}
-
 - (void)_addSubresourceClient:(WebSubresourceClient *)client
 {
     if (_private->subresourceClients == nil) {
@@ -220,7 +230,7 @@
     return _private->stopping;
 }
 
-- (void)_stopLoading
+- (void)_stopLoadingInternal
 {
     if (!_private->loading) {
 	return;
@@ -235,7 +245,7 @@
         // Main handle is already done. Set the cancelled error.
         WebError *cancelledError = [WebError errorWithCode:WebFoundationErrorCancelled
                                                   inDomain:WebErrorDomainWebFoundation
-                                                failingURL:[[self URL] absoluteString]];
+                                                failingURL:[[self _URL] absoluteString]];
         [self _setMainDocumentError:cancelledError];
     }
     
@@ -256,8 +266,8 @@
     
     // We depend on the controller in webFrame and we release it in _stopLoading,
     // so call webFrame first so we don't send a message the released controller (3129503).
-    [[[self webFrame] children] makeObjectsPerformSelector:@selector(stopLoading)];
-    [self _stopLoading];
+    [[[self webFrame] children] makeObjectsPerformSelector:@selector(_stopLoading)];
+    [self _stopLoadingInternal];
     
     [self release];
 }
@@ -554,10 +564,10 @@
     WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
 
     // Bind the URL of the original request and the final URL to the icon URL.
-    [iconDB _setIconURL:[iconURL absoluteString] forURL:[[self URL] absoluteString]];
+    [iconDB _setIconURL:[iconURL absoluteString] forURL:[[self _URL] absoluteString]];
     [iconDB _setIconURL:[iconURL absoluteString] forURL:[[[self _originalRequest] URL] absoluteString]];
 
-    NSImage *icon = [iconDB iconForURL:[[self URL] absoluteString] withSize:WebIconSmallSize];
+    NSImage *icon = [iconDB iconForURL:[[self _URL] absoluteString] withSize:WebIconSmallSize];
     [[_private->controller _locationChangeDelegateForwarder] receivedPageIcon:icon forDataSource:self];
 }
 
@@ -575,10 +585,10 @@
     if(!_private->iconURL){
         // No icon URL from the LINK tag so try the server's root.
         // This is only really a feature of http or https, so don't try this with other protocols.
-        NSString *scheme = [[self URL] scheme];
+        NSString *scheme = [[self _URL] scheme];
         if([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]){
             _private->iconURL = [[[NSURL _web_URLWithString:@"/favicon.ico"
-                                              relativeToURL:[self URL]] absoluteURL] retain];
+                                              relativeToURL:[self _URL]] absoluteURL] retain];
         }
     }
 
@@ -750,4 +760,12 @@
     _private->webFrame = frame;
 }
 
+// May return nil if not initialized with a URL.
+- (NSURL *)_URL
+{
+    return [[self request] URL];
+}
+
+
+
 @end
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index a30ee87..d17b0b5 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -199,7 +199,7 @@ static WebDefaultContextMenuDelegate *sharedDelegate = nil;
 {
     WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
     WebDataSource *dataSource = [webFrame dataSource];
-    NSURL *URL = [dataSource URL];
+    NSURL *URL = [dataSource _URL];
     [self openNewWindowWithURL:URL];
 }
 
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index 8b9dc35..c4560a6 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -42,12 +42,12 @@ static WebDefaultPolicyDelegate *sharedDelegate = nil;
 	
 	if(isDirectory)
 	    return WebPolicyIgnore;
-	if([WebController canShowMIMEType:type])
+	if([WebCapabilities canShowMIMEType:type])
 	    return WebPolicyShow;
 	return WebPolicyIgnore;
     }
 
-    if ([WebController canShowMIMEType:type]) {
+    if ([WebCapabilities canShowMIMEType:type]) {
         return WebPolicyShow;
     } else {
         return WebPolicyIgnore;
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index e3c1313..a679160 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -132,8 +132,8 @@
     [self _invalidatePendingPolicyDecisionCallingDefaultAction:YES];
 
     if (_private->state != WebFrameStateComplete) {
-        [_private->provisionalDataSource stopLoading];
-        [_private->dataSource stopLoading];
+        [_private->provisionalDataSource _stopLoading];
+        [_private->dataSource _stopLoading];
         [_private->scheduledLayoutTimer fire];
     }
     ASSERT(_private->scheduledLayoutTimer == nil);
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index d57213c..047898d 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -763,7 +763,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
             && [[[self dataSource] representation] isKindOfClass: [WebHTMLRepresentation class]])
         {
             if (![item pageCache]){
-                LOG(PageCache, "Saving page to back/forward cache, %s\n", [[[[self dataSource] URL] absoluteString] cString]);
+                LOG(PageCache, "Saving page to back/forward cache, %s\n", [[[[self dataSource] _URL] absoluteString] cString]);
                 [item setHasPageCache: YES];
                 [[self dataSource] _setStoredInPageCache: YES];
                 [[item pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
@@ -1428,7 +1428,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         if (self == [[self controller] mainFrame] || f) {
             [request setCookiePolicyBaseURL:[request URL]];
         } else {
-            [request setCookiePolicyBaseURL:[[[[self controller] mainFrame] dataSource] URL]];
+            [request setCookiePolicyBaseURL:[[[[self controller] mainFrame] dataSource] _URL]];
         }
     }
 }
@@ -1767,7 +1767,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         if (formState) {
             [[[self controller] _formDelegate] frame:self willSubmitForm:[formState form] withValues:[formState values]];
         }
-        [_private->provisionalDataSource startLoading];
+        [_private->provisionalDataSource _startLoading];
     }
 }
 
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 172d887..cfa4a15 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -6,7 +6,7 @@
 
 #import <WebKit/WebClipView.h>
 #import <WebKit/WebCookieAdapter.h>
-#import <WebKit/WebController.h>
+#import <WebKit/WebControllerPrivate.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebDynamicScrollBarsView.h>
@@ -74,7 +74,7 @@ enum {
 
 - (WebFrame *)webFrame
 {
-    return [[self _controller] frameForView: self]; 
+    return [[self _controller] _frameForView: self]; 
 }
 
 
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index a775ff7..c4242de 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -288,7 +288,7 @@
 
 - (BOOL)_isMainFrame
 {
-    return [_private->controller mainFrame] == [_private->controller frameForView:self];
+    return [_private->controller mainFrame] == [self webFrame];
 }
 
 - (void)_reregisterDraggedTypes
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 4fd2101..3e589c4 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -142,7 +142,7 @@ static BOOL forceRealHitTest = NO;
 - (WebFrame *)_frame
 {
     WebView *webView = [self _web_parentWebView];
-    return [[webView _controller] frameForView:webView];
+    return [webView webFrame];
 }
 
 // Required so view can access the part's selection.
@@ -203,7 +203,7 @@ static BOOL forceRealHitTest = NO;
     
     WebView *webView = [self _web_parentWebView];
     ASSERT(webView);
-    WebFrame *webFrame = [[webView _controller] frameForView:webView];
+    WebFrame *webFrame = [webView webFrame];
     
     if (webFrame) {
         NSString *frameName = [elementInfoWC objectForKey:WebElementLinkTargetFrameKey];
diff --git a/WebKit/WebView.subproj/WebImageRepresentation.m b/WebKit/WebView.subproj/WebImageRepresentation.m
index 53b4406..e3c719d 100644
--- a/WebKit/WebView.subproj/WebImageRepresentation.m
+++ b/WebKit/WebView.subproj/WebImageRepresentation.m
@@ -10,6 +10,8 @@
 #import <WebKit/WebImageRenderer.h>
 #import <WebKit/WebImageRendererFactory.h>
 
+#import <WebFoundation/WebRequest.h>
+
 @implementation WebImageRepresentation
 
 - init
@@ -41,7 +43,7 @@
 
 - (void)setDataSource:(WebDataSource *)dataSource
 {
-    URL = [[dataSource URL] retain];
+    URL = [[[dataSource request] URL] retain];
 }
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index c0f849a..90cb40e 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -128,7 +128,7 @@
 {
     WebView *webView = [self _web_parentWebView];
     WebController *controller = [webView _controller];
-    WebFrame *frame = [controller frameForView:webView];
+    WebFrame *frame = [webView webFrame];
 
     ASSERT(frame);
     ASSERT(controller);
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 411ea7b..2fea522 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -87,7 +87,7 @@
 
 - (void)cancel
 {
-    LOG(Loading, "URL = %@", [dataSource URL]);
+    LOG(Loading, "URL = %@", [dataSource _URL]);
     
     // Calling receivedError will likely result in a call to release, so we must retain.
     [self retain];
@@ -172,7 +172,7 @@
 
     switch (contentPolicy) {
     case WebPolicyShow:
-	if (![WebController canShowMIMEType:[r contentType]]) {
+	if (![WebCapabilities canShowMIMEType:[r contentType]]) {
 	    [[dataSource webFrame] _handleUnimplementablePolicyWithErrorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
 	    [self stopLoadingForPolicyChange];
 	    return;
@@ -299,7 +299,7 @@
     ASSERT(![self defersCallbacks]);
     ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
  
-    LOG(Loading, "URL = %@, data = %p, length %d", [dataSource URL], data, [data length]);
+    LOG(Loading, "URL = %@, data = %p, length %d", [dataSource _URL], data, [data length]);
 
     WebError *downloadError= nil;
     
@@ -329,7 +329,7 @@
     ASSERT(![h defersCallbacks]);
     ASSERT(![self defersCallbacks]);
     ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
-    LOG(Loading, "URL = %@", [dataSource URL]);
+    LOG(Loading, "URL = %@", [dataSource _URL]);
         
     // Calls in this method will most likely result in a call to release, so we must retain.
     [self retain];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 411ea7b..2fea522 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -87,7 +87,7 @@
 
 - (void)cancel
 {
-    LOG(Loading, "URL = %@", [dataSource URL]);
+    LOG(Loading, "URL = %@", [dataSource _URL]);
     
     // Calling receivedError will likely result in a call to release, so we must retain.
     [self retain];
@@ -172,7 +172,7 @@
 
     switch (contentPolicy) {
     case WebPolicyShow:
-	if (![WebController canShowMIMEType:[r contentType]]) {
+	if (![WebCapabilities canShowMIMEType:[r contentType]]) {
 	    [[dataSource webFrame] _handleUnimplementablePolicyWithErrorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
 	    [self stopLoadingForPolicyChange];
 	    return;
@@ -299,7 +299,7 @@
     ASSERT(![self defersCallbacks]);
     ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
  
-    LOG(Loading, "URL = %@, data = %p, length %d", [dataSource URL], data, [data length]);
+    LOG(Loading, "URL = %@, data = %p, length %d", [dataSource _URL], data, [data length]);
 
     WebError *downloadError= nil;
     
@@ -329,7 +329,7 @@
     ASSERT(![h defersCallbacks]);
     ASSERT(![self defersCallbacks]);
     ASSERT([self isDownload] || ![[dataSource _controller] defersCallbacks]);
-    LOG(Loading, "URL = %@", [dataSource URL]);
+    LOG(Loading, "URL = %@", [dataSource _URL]);
         
     // Calls in this method will most likely result in a call to release, so we must retain.
     [self retain];
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 57146ee..e84354e 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -159,7 +159,7 @@
     
     WebView *webView = [self _web_parentWebView];
     WebController *controller = [webView _controller];
-    WebFrame *frame = [controller frameForView:webView];
+    WebFrame *frame = [webView webFrame];
 
     ASSERT(frame);
     ASSERT(controller);
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 7ad46e4..0ce09ae 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -19,6 +19,25 @@
 @class WebPreferences;
 @class WebView;
 
+ at interface WebCapabilities : NSObject
+/*!
+    @method canShowMIMEType:
+    @abstract Checks if the WebKit can show content of a certain MIME type.
+    @param MIMEType The MIME type to check.
+    @result YES if the WebKit can show content with MIMEtype.
+*/
++ (BOOL)canShowMIMEType:(NSString *)MIMEType;
+
+/*!
+    @method canShowFile:
+    @abstract Checks if the WebKit can show the content of the file at the specified path.
+    @param path The path of the file to check
+    @result YES if the WebKit can show the content of the file at the specified path.
+*/
++ (BOOL)canShowFile:(NSString *)path;
+
+ at end
+
 // These strings are keys into the element dictionary provided in
 // the WebContextMenuDelegate's contextMenuItemsForElement and the WebControllerPolicyDelegate's clickPolicyForElement.
 
@@ -78,22 +97,6 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 }
 
 /*!
-    @method canShowMIMEType:
-    @abstract Checks if the WebKit can show content of a certain MIME type.
-    @param MIMEType The MIME type to check.
-    @result YES if the WebKit can show content with MIMEtype.
-*/    
-+ (BOOL)canShowMIMEType:(NSString *)MIMEType;
-
-/*!
-    @method canShowFile:
-    @abstract Checks if the WebKit can show the content of the file at the specified path.
-    @param path The path of the file to check
-    @result YES if the WebKit can show the content of the file at the specified path.
-*/    
-+ (BOOL)canShowFile:(NSString *)path;
-
-/*!
     @method initWithView:
     @abstract This method is a convenience equivalent to initWithView:view frameName:nil setName:nil
     @param view The view to use.
@@ -207,25 +210,6 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 - (WebFrame *)mainFrame;
 
 /*!
-    @method frameForDataSource:
-    @abstract Return the frame associated with the data source.  
-    @discussion Traverses the frame tree to find the frame associated
-    with a datasource.
-    @param datasource The datasource to  match against each frame.
-    @result The frame that has the associated datasource.
-*/    
-- (WebFrame *)frameForDataSource: (WebDataSource *)dataSource;
-
-/*!
-    @method frameForView:
-    @abstract Return the frame associated with the view.  
-    @discussion Traverses the frame tree to find the view. 
-    @param aView The view to match against each frame.
-    @result The frame that has the associated view.
-*/    
-- (WebFrame *)frameForView: (WebView *)aView;
-
-/*!
     @method backForwardList
     @result The backforward list for this controller.
 */    
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 3168b6b..827b5dc 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -54,6 +54,29 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
 
 
 
+ at implementation WebCapabilities
++ (BOOL)canShowMIMEType:(NSString *)MIMEType
+{
+    if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType]){
+        return YES;
+    }else{
+        // Have the plug-ins register views and representations
+        [WebPluginDatabase installedPlugins];
+        if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType])
+            return YES;
+    }
+    return NO;
+}
+
++ (BOOL)canShowFile:(NSString *)path
+{
+    NSString *MIMEType;
+
+    MIMEType = [WebController _MIMETypeForFile:path];
+    return [[self class] canShowMIMEType:MIMEType];
+}
+
+ at end
 
 @implementation WebController
 
@@ -183,93 +206,11 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     return _private->locationChangeDelegate;
 }
 
-- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
-{
-    NSArray *frames;
-    int i, count;
-    WebFrame *result, *aFrame;
-    
-    if ([frame dataSource] == dataSource)
-        return frame;
-        
-    if ([frame provisionalDataSource] == dataSource)
-        return frame;
-        
-    frames = [frame children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-
-    return nil;       
-}
-
-
-- (WebFrame *)frameForDataSource: (WebDataSource *)dataSource
-{
-    WebFrame *frame = [self mainFrame];
-    
-    return [self _frameForDataSource: dataSource fromFrame: frame];
-}
-
-
-- (WebFrame *)_frameForView: (WebView *)aView fromFrame: (WebFrame *)frame
-{
-    NSArray *frames;
-    int i, count;
-    WebFrame *result, *aFrame;
-    
-    if ([frame webView] == aView)
-        return frame;
-        
-    frames = [frame children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        aFrame = [frames objectAtIndex: i];
-        result = [self _frameForView: aView fromFrame: aFrame];
-        if (result)
-            return result;
-    }
-
-    return nil;       
-}
-
-- (WebFrame *)frameForView: (WebView *)aView
-{
-    WebFrame *frame = [self mainFrame];
-    
-    return [self _frameForView: aView fromFrame: frame];
-}
-
 - (WebFrame *)mainFrame
 {
     return _private->mainFrame;
 }
 
-+ (BOOL)canShowMIMEType:(NSString *)MIMEType
-{
-    if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType]){
-        return YES;
-    }else{
-        // Have the plug-ins register views and representations
-        [WebPluginDatabase installedPlugins];
-        if([WebView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType])
-            return YES;
-    }
-    return NO;
-}
-
-+ (BOOL)canShowFile:(NSString *)path
-{    
-    NSString *MIMEType;
-    
-    MIMEType = [[self class] _MIMETypeForFile:path];   
-    return [[self class] canShowMIMEType:MIMEType];
-}
-
 - (WebBackForwardList *)backForwardList
 {
     if (_private->useBackForwardList)
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 4fa6afb..19bd75f 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -54,6 +54,26 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
 
 @interface WebController (WebPrivate)
 
+/*!
+ at method frameForDataSource:
+ @abstract Return the frame associated with the data source.
+ @discussion Traverses the frame tree to find the frame associated
+ with a datasource.
+ @param datasource The datasource to  match against each frame.
+ @result The frame that has the associated datasource.
+ */
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource;
+
+    /*!
+            @method frameForView:
+     @abstract Return the frame associated with the view.
+     @discussion Traverses the frame tree to find the view.
+     @param aView The view to match against each frame.
+     @result The frame that has the associated view.
+     */
+- (WebFrame *)_frameForView: (WebView *)aView;
+
+
 - (WebFrame *)_createFrameNamed:(NSString *)name inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling;
 
 - (void)_finishedLoadingResourceFromDataSource:(WebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 03727f8..dbb9aa2 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -434,6 +434,68 @@
     return [_WebSafeForwarder safeForwarderWithTarget: [self windowOperationsDelegate] defaultTarget: [WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] templateClass: [WebDefaultWindowOperationsDelegate class]];
 }
 
+
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource fromFrame: (WebFrame *)frame
+{
+    NSArray *frames;
+    int i, count;
+    WebFrame *result, *aFrame;
+
+    if ([frame dataSource] == dataSource)
+        return frame;
+
+    if ([frame provisionalDataSource] == dataSource)
+        return frame;
+
+    frames = [frame children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForDataSource: dataSource fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+
+    return nil;
+}
+
+
+- (WebFrame *)_frameForDataSource: (WebDataSource *)dataSource
+{
+    WebFrame *frame = [self mainFrame];
+
+    return [self _frameForDataSource: dataSource fromFrame: frame];
+}
+
+
+- (WebFrame *)_frameForView: (WebView *)aView fromFrame: (WebFrame *)frame
+{
+    NSArray *frames;
+    int i, count;
+    WebFrame *result, *aFrame;
+
+    if ([frame webView] == aView)
+        return frame;
+
+    frames = [frame children];
+    count = [frames count];
+    for (i = 0; i < count; i++){
+        aFrame = [frames objectAtIndex: i];
+        result = [self _frameForView: aView fromFrame: aFrame];
+        if (result)
+            return result;
+    }
+
+    return nil;
+}
+
+- (WebFrame *)_frameForView: (WebView *)aView
+{
+    WebFrame *frame = [self mainFrame];
+
+    return [self _frameForView: aView fromFrame: frame];
+}
+
 @end
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list