Reviewed by Beth.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2006 05:38:32 +0000 (05:38 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2006 05:38:32 +0000 (05:38 +0000)
        - remove many (but not all) WebKit dependencies from WebNetscapePlugInStreamLoader (it still
        depends on WebNetscapePluginStream).

        * Loader/WebFrameLoader.h:
        * Loader/WebFrameLoader.m:
        (-[WebFrameLoader fileDoesNotExistErrorWithResponse:]):
        * Loader/WebNetscapePlugInStreamLoader.h:
        * Loader/WebNetscapePlugInStreamLoader.m:
        (-[WebNetscapePlugInStreamLoader initWithStream:frameLoader:]):
        (-[WebNetscapePlugInStreamLoader releaseResources]):
        (-[WebNetscapePlugInStreamLoader didReceiveResponse:]):
        * Plugins/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):

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

WebKit/ChangeLog
WebKit/Loader/WebFrameLoader.h
WebKit/Loader/WebFrameLoader.m
WebKit/Loader/WebNetscapePlugInStreamLoader.h
WebKit/Loader/WebNetscapePlugInStreamLoader.m
WebKit/Plugins/WebNetscapePluginStream.m

index f14011b9f877ab3a6fd868496483528fab1c201c..b93aca89197d5109f3cf8bbd9fcf4c9845c3ac94 100644 (file)
@@ -1,3 +1,21 @@
+2006-08-14  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Beth.
+        
+        - remove many (but not all) WebKit dependencies from WebNetscapePlugInStreamLoader (it still 
+        depends on WebNetscapePluginStream).
+
+        * Loader/WebFrameLoader.h:
+        * Loader/WebFrameLoader.m:
+        (-[WebFrameLoader fileDoesNotExistErrorWithResponse:]):
+        * Loader/WebNetscapePlugInStreamLoader.h:
+        * Loader/WebNetscapePlugInStreamLoader.m:
+        (-[WebNetscapePlugInStreamLoader initWithStream:frameLoader:]):
+        (-[WebNetscapePlugInStreamLoader releaseResources]):
+        (-[WebNetscapePlugInStreamLoader didReceiveResponse:]):
+        * Plugins/WebNetscapePluginStream.m:
+        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
+
 2006-08-14  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Tim Omernick.
index 8777e03fcac2a61c7f9ab09b3de2eba13cbf9282..bb77325d7df2f7ac4841f80c859eef1fb15aecf4 100644 (file)
 - (NSURL *)_URL;
 
 - (NSError *)cancelledErrorWithRequest:(NSURLRequest *)request;
+- (NSError *)fileDoesNotExistErrorWithResponse:(NSURLResponse *)response;
 - (BOOL)willUseArchiveForRequest:(NSURLRequest *)r originalURL:(NSURL *)originalURL loader:(WebLoader *)loader;
 - (BOOL)archiveLoadPendingForLoader:(WebLoader *)loader;
 - (void)deliverArchivedResourcesAfterDelay;
index 0de4a35d4912f0a112f2b1f7c8e480a76104f9f6..ae282b9d12eea83c5c6e0c08073190c0c4a5ed77 100644 (file)
@@ -534,6 +534,13 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                                        URL:[request URL]];
 }
 
+- (NSError *)fileDoesNotExistErrorWithResponse:(NSURLResponse *)response
+{
+    return [NSError _webKitErrorWithDomain:NSURLErrorDomain
+                                                code:NSURLErrorFileDoesNotExist
+                                                 URL:[response URL]];    
+}
+
 - (void)clearArchivedResources
 {
     [pendingArchivedResources removeAllObjects];
index 976361b0babc0b5203b22a2c037f2fc00ed1a6f7..ccc3c23e91e02d7b1d89ec3ee7951be124ce5644 100644 (file)
 #import <WebKit/WebLoader.h>
 
 @class WebNetscapePluginStream;
-@class WebBaseNetscapePluginView;
 
 @interface WebNetscapePlugInStreamLoader : WebLoader
 {
     WebNetscapePluginStream *stream;
-    WebBaseNetscapePluginView *view;
 }
-- initWithStream:(WebNetscapePluginStream *)theStream view:(WebBaseNetscapePluginView *)theView;
+- (id)initWithStream:(WebNetscapePluginStream *)theStream frameLoader:(WebFrameLoader *)fl;
 - (BOOL)isDone;
 @end
 
index 0db41eda3dd92d1cc82ce6c143aa6d7aa65baba7..6c097c29f3d25c786115f49c1559a9d4d1cdc9ad 100644 (file)
 #import <WebKit/WebFrameLoader.h>
 
 #import <WebKit/WebNetscapePluginStream.h>
-#import <WebKit/WebKitErrorsPrivate.h>
-#import <WebKit/WebFrameInternal.h>
 
 @implementation WebNetscapePlugInStreamLoader
 
-- (id)initWithStream:(WebNetscapePluginStream *)theStream view:(WebBaseNetscapePluginView *)theView
+- (id)initWithStream:(WebNetscapePluginStream *)theStream frameLoader:(WebFrameLoader *)fl
 {
     [super init];
     stream = [theStream retain];
-    view = [theView retain];
-    [self setFrameLoader:[[theView webFrame] _frameLoader]];
+    [self setFrameLoader:fl];
     return self;
 }
 
@@ -54,8 +51,6 @@
 {
     [stream release];
     stream = nil;
-    [view release];
-    view = nil;
     [super releaseResources];
 }
 
@@ -72,9 +67,7 @@
         if (stream) {
             if ([theResponse isKindOfClass:[NSHTTPURLResponse class]] &&
                 ([(NSHTTPURLResponse *)theResponse statusCode] >= 400 || [(NSHTTPURLResponse *)theResponse statusCode] < 100)) {
-                NSError *error = [NSError _webKitErrorWithDomain:NSURLErrorDomain
-                                                            code:NSURLErrorFileDoesNotExist
-                                                            URL:[theResponse URL]];
+                NSError *error = [frameLoader fileDoesNotExistErrorWithResponse:theResponse];
                 [stream cancelLoadAndDestroyStreamWithError:error];
             }
         }
index 0e4cd43415dcbb8ef99a4d7890e9201aec5eaf84..cb2f0264514126509388da5da64ad69ed7ce3853 100644 (file)
@@ -72,8 +72,7 @@
         [(NSMutableURLRequest *)request _web_setHTTPReferrer:nil];
     }
 
-    _loader = [[WebNetscapePlugInStreamLoader alloc] initWithStream:self view:view]; 
-    [_loader setFrameLoader:[[view webFrame] _frameLoader]];
+    _loader = [[WebNetscapePlugInStreamLoader alloc] initWithStream:self frameLoader:[[view webFrame] _frameLoader]]; 
     
     isTerminated = NO;