Reviewed by Brady.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Aug 2006 00:01:52 +0000 (00:01 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Aug 2006 00:01:52 +0000 (00:01 +0000)
        - pull a bit of WebDataSource code into WebFrameLoader

        * Loader/WebFrameLoader.m:
        (-[WebFrameLoader _receivedError:]):
        (-[WebFrameLoader webFrame]):
        (-[WebFrameLoader _handleFallbackContent]):
        (+[WebFrameLoader _canShowMIMEType:]):
        (+[WebFrameLoader _representationExistsForURLScheme:]):
        (+[WebFrameLoader _generatedMIMETypeForURLScheme:]):
        * WebView/WebDataSource.m:
        * WebView/WebDataSourceInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Loader/WebFrameLoader.m
WebKit/WebView/WebDataSource.m
WebKit/WebView/WebDataSourceInternal.h

index 11c9232e100fbbc7a74a96fdebd63479bcf17c51..0d99b86b373df425e52daf9e92badb8514140796 100644 (file)
@@ -1,3 +1,19 @@
+2006-08-17  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Brady.
+        
+        - pull a bit of WebDataSource code into WebFrameLoader
+
+        * Loader/WebFrameLoader.m:
+        (-[WebFrameLoader _receivedError:]):
+        (-[WebFrameLoader webFrame]):
+        (-[WebFrameLoader _handleFallbackContent]):
+        (+[WebFrameLoader _canShowMIMEType:]):
+        (+[WebFrameLoader _representationExistsForURLScheme:]):
+        (+[WebFrameLoader _generatedMIMETypeForURLScheme:]):
+        * WebView/WebDataSource.m:
+        * WebView/WebDataSourceInternal.h:
+
 2006-08-17  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Kevin Decker.
index 43620ab8ed777d3d70e70a091ae8bb87ee81ab50..3f9c4d824b54764a8be029617cad2e48bf9d8308 100644 (file)
@@ -38,6 +38,7 @@
 #import <WebKit/WebKitErrorsPrivate.h>
 #import <WebKit/WebResourcePrivate.h>
 #import <WebKit/DOMHTML.h>
+#import <WebKit/WebFrameBridge.h>
 
 @implementation WebFrameLoader
 
@@ -426,7 +427,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (void)_receivedError:(NSError *)error
 {
-    return [[self activeDataSource] _receivedError:error];
+    [[self webFrame] _checkLoadComplete];
 }
 
 - (void)_addSubresourceLoader:(WebLoader *)loader
@@ -446,7 +447,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (WebFrame *)webFrame
 {
-    return [[self activeDataSource] webFrame];
+    return webFrame;
 }
 
 - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
@@ -479,7 +480,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (void)_handleFallbackContent
 {
-    [[self activeDataSource] _handleFallbackContent];
+    [[webFrame _bridge] handleFallbackContent];
 }
 
 - (BOOL)_isStopping
@@ -681,17 +682,17 @@ static BOOL isCaseInsensitiveEqual(NSString *a, NSString *b)
 
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType
 {
-    return [WebDataSource _canShowMIMEType:MIMEType];
+    return [WebView canShowMIMEType:MIMEType];
 }
 
 + (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme
 {
-    return [WebDataSource _representationExistsForURLScheme:URLScheme];
+    return [WebView _representationExistsForURLScheme:URLScheme];
 }
 
 + (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme
 {
-    return [WebDataSource _generatedMIMETypeForURLScheme:URLScheme];
+    return [WebView _generatedMIMETypeForURLScheme:URLScheme];
 }
 
 @end
index 92395fdfa56894df272e65b466cc7337e69842f5..cf378654ee82fefb2f4b2b4dd1b7c0f7c52851b3 100644 (file)
@@ -1261,11 +1261,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class class,
     }
 }
 
-- (void)_receivedError:(NSError *)error
-{
-    [[self webFrame] _checkLoadComplete];
-}
-
 - (void)_mainReceivedError:(NSError *)error complete:(BOOL)isComplete
 {
     if (![self webFrame])
@@ -1279,26 +1274,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class class,
     }
 }
 
-+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme
-{
-    return [WebView _generatedMIMETypeForURLScheme:URLScheme];
-}
-
-+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme
-{
-    return [WebView _representationExistsForURLScheme:URLScheme];
-}
-
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType
-{
-    return [WebView canShowMIMEType:MIMEType];
-}
-
-- (void)_handleFallbackContent
-{
-    [[[self webFrame] _bridge] handleFallbackContent];
-}
-
 - (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener
 {
     WebView *wv = [self _webView];
index 76334dc43828eaf1beb47d7e75414d557a27173b..7b5e570f90b81c2bdbe2d7fb4281aab4acb365d7 100644 (file)
 - (DOMElement *)_imageElementWithImageResource:(WebResource *)resource;
 - (void)_finishedLoadingResource;
 - (void)_mainReceivedBytesSoFar:(unsigned)bytesSoFar complete:(BOOL)isComplete;
-- (void)_receivedError:(NSError *)error;
 - (void)_mainReceivedError:(NSError *)error complete:(BOOL)isComplete;
 - (BOOL)_defersCallbacks;
 - (id)_identifierForInitialRequest:(NSURLRequest *)clientRequest;
 - (void)_didFailLoadingWithError:(NSError *)error forResource:(id)identifier;
 - (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(WKNSURLConnectionDelegateProxyPtr) proxy;
 - (BOOL)_privateBrowsingEnabled;
-+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
-+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
-- (void)_handleFallbackContent;
 - (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener;
 
 @end