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

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:46:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7d1d28f105fbc38795586d14e9c6f861d24171cd
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 2 19:12:12 2002 +0000

    WebKit:
    
    	Replaced contentType on WebDataSource to response.
    
            * Plugins.subproj/WebNetscapePluginDocumentView.m:
            (-[WebNetscapePluginDocumentView setDataSource:]):
            * Plugins.subproj/WebPluginStream.m:
            (-[WebNetscapePluginStream receivedData:]):
            (-[WebNetscapePluginStream setResponse:]):
            (-[WebNetscapePluginStream setDataSource:]):
            (-[WebNetscapePluginStream receivedData:withDataSource:]):
            (-[WebNetscapePluginStream handle:didReceiveResponse:]):
            (-[WebNetscapePluginStream handle:didReceiveData:]):
            * WebView.subproj/WebDataSource.h:
            * WebView.subproj/WebDataSource.m:
            (-[WebDataSource response]):
            (-[WebDataSource fileType]):
            * WebView.subproj/WebDataSourcePrivate.h:
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSourcePrivate dealloc]):
            (-[WebDataSource _representationClass]):
            (-[WebDataSource _setResponse:]):
            (-[WebDataSource _setContentPolicy:]):
            * WebView.subproj/WebMainResourceClient.h:
            * WebView.subproj/WebMainResourceClient.m:
            (-[WebMainResourceClient dealloc]):
            (-[WebMainResourceClient handleDidFinishLoading:]):
            (-[WebMainResourceClient handle:didReceiveResponse:]):
            (-[WebMainResourceClient handle:didReceiveData:]):
            * WebView.subproj/WebTextView.m:
            (-[WebTextView dataSourceUpdated:]):
            * WebView.subproj/WebViewPrivate.m:
            (-[WebView _makeDocumentViewForDataSource:]):
    
    WebBrowser:
    
    	Replaced contentType on WebDataSource to response.
    
            * BrowserWebController.m:
            (-[BrowserWebController receivedProgress:forResourceHandle:fromDataSource:complete:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 65e7387..90d6bfe 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,37 @@
+2002-10-02  Chris Blumenberg  <cblu at apple.com>
+
+	Replaced contentType on WebDataSource to response.
+
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):
+        * Plugins.subproj/WebPluginStream.m:
+        (-[WebNetscapePluginStream receivedData:]):
+        (-[WebNetscapePluginStream setResponse:]):
+        (-[WebNetscapePluginStream setDataSource:]):
+        (-[WebNetscapePluginStream receivedData:withDataSource:]):
+        (-[WebNetscapePluginStream handle:didReceiveResponse:]):
+        (-[WebNetscapePluginStream handle:didReceiveData:]):
+        * WebView.subproj/WebDataSource.h:
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource response]):
+        (-[WebDataSource fileType]):
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]):
+        (-[WebDataSource _representationClass]):
+        (-[WebDataSource _setResponse:]):
+        (-[WebDataSource _setContentPolicy:]):
+        * WebView.subproj/WebMainResourceClient.h:
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient dealloc]):
+        (-[WebMainResourceClient handleDidFinishLoading:]):
+        (-[WebMainResourceClient handle:didReceiveResponse:]):
+        (-[WebMainResourceClient handle:didReceiveData:]):
+        * WebView.subproj/WebTextView.m:
+        (-[WebTextView dataSourceUpdated:]):
+        * WebView.subproj/WebViewPrivate.m:
+        (-[WebView _makeDocumentViewForDataSource:]):
+
 2002-10-02  Darin Adler  <darin at apple.com>
 
 	More work on "open window behind".
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 65e7387..90d6bfe 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,37 @@
+2002-10-02  Chris Blumenberg  <cblu at apple.com>
+
+	Replaced contentType on WebDataSource to response.
+
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):
+        * Plugins.subproj/WebPluginStream.m:
+        (-[WebNetscapePluginStream receivedData:]):
+        (-[WebNetscapePluginStream setResponse:]):
+        (-[WebNetscapePluginStream setDataSource:]):
+        (-[WebNetscapePluginStream receivedData:withDataSource:]):
+        (-[WebNetscapePluginStream handle:didReceiveResponse:]):
+        (-[WebNetscapePluginStream handle:didReceiveData:]):
+        * WebView.subproj/WebDataSource.h:
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource response]):
+        (-[WebDataSource fileType]):
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]):
+        (-[WebDataSource _representationClass]):
+        (-[WebDataSource _setResponse:]):
+        (-[WebDataSource _setContentPolicy:]):
+        * WebView.subproj/WebMainResourceClient.h:
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient dealloc]):
+        (-[WebMainResourceClient handleDidFinishLoading:]):
+        (-[WebMainResourceClient handle:didReceiveResponse:]):
+        (-[WebMainResourceClient handle:didReceiveData:]):
+        * WebView.subproj/WebTextView.m:
+        (-[WebTextView dataSourceUpdated:]):
+        * WebView.subproj/WebViewPrivate.m:
+        (-[WebView _makeDocumentViewForDataSource:]):
+
 2002-10-02  Darin Adler  <darin at apple.com>
 
 	More work on "open window behind".
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 7809a20..da4eed0 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -13,6 +13,8 @@
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebView.h>
 
+#import <WebFoundation/WebResourceResponse.h>
+
 @implementation WebNetscapePluginDocumentView
 
 - initWithFrame:(NSRect)frame
@@ -53,7 +55,7 @@
     [dataSource release];
     dataSource = [theDataSource retain];
 
-    NSString *MIME = [dataSource contentType];
+    NSString *MIME = [[dataSource response] contentType];
     
     [self setMIMEType:MIME];
     [self setBaseURL:[dataSource URL]];
diff --git a/WebKit/Plugins.subproj/WebPluginStream.m b/WebKit/Plugins.subproj/WebPluginStream.m
index cd36d06..4590064 100644
--- a/WebKit/Plugins.subproj/WebPluginStream.m
+++ b/WebKit/Plugins.subproj/WebPluginStream.m
@@ -21,9 +21,10 @@
 #import <WebFoundation/WebResourceResponse.h>
 
 @interface WebNetscapePluginStream (ClassInternal)
-- (void)receivedData:(NSData *)data withHandle:(WebResourceHandle *)handle;
+- (void)receivedData:(NSData *)data;
 - (void)receivedError:(NPError)error;
 - (void)finishedLoadingWithData:(NSData *)data;
+- (void)setResponse:(WebResourceResponse *)theReponse;
 - (void)cancel;
 @end
 
@@ -114,7 +115,7 @@
     view = nil;
 }
 
-- (void)receivedData:(NSData *)data withHandle:(WebResourceHandle *)handle
+- (void)receivedData:(NSData *)data
 {    
     if(isFirstChunk){
 
@@ -228,10 +229,17 @@
     [self stop];
 }
 
+- (void)setResponse:(WebResourceResponse *)theResponse
+{
+    [response release];
+    response = [theResponse retain];
+}
+
 #pragma mark WebDocumentRepresentation
 
 - (void)setDataSource:(WebDataSource *)dataSource
 {
+    [self setResponse:[dataSource response]];
 }
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
@@ -251,7 +259,7 @@
         [self getFunctionPointersFromPluginView:view];
     }
 
-    [self receivedData:data withHandle:[dataSource _mainHandle]];
+    [self receivedData:data];
 }
 
 - (void)receivedError:(WebError *)error withDataSource:(WebDataSource *)dataSource
@@ -285,16 +293,14 @@
 
 - (void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)theResponse
 {
-    [theResponse retain];
-    [response release];
-    response = theResponse;
+    [self setResponse:theResponse];
 }
 
 - (void)handle:(WebResourceHandle *)handle didReceiveData:(NSData *)data
 {
     ASSERT(resource == handle);
 
-    [self receivedData:data withHandle:handle];
+    [self receivedData:data];
     
     [[view controller] _receivedProgress:[WebLoadProgress progressWithResourceHandle:handle]
         forResourceHandle: handle fromDataSource: [view dataSource] complete: NO];
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index b1829c4..20ac804 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -14,6 +14,7 @@
 @class WebFrame;
 @class WebResourceHandle;
 @class WebResourceRequest;
+ at class WebResourceResponse;
 
 @protocol WebDocumentRepresentation;
 
@@ -133,6 +134,12 @@
 -(WebResourceRequest *)request;
 
 /*!
+    @method response
+    @result returns the WebResourceResponse for the data source.
+*/
+- (WebResourceResponse *)response;
+
+/*!
     @method URL
     @discussion The value of URL will change if a redirect occurs.
     To monitor change in the URL, override the <WebLocationChangeHandler> 
@@ -194,12 +201,6 @@
 - (WebContentPolicy *)contentPolicy;
 
 /*!
-    @method contentType
-    @result returns the MIME type for the data source.
-*/
-- (NSString *)contentType;
-
-/*!
     @method fileType
     @result The extension based on the MIME type 
 */
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 266e2b4..6629da7 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -19,6 +19,7 @@
 #import <WebFoundation/WebFileTypeMappings.h>
 #import <WebFoundation/WebResourceHandle.h>
 #import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
 #import <WebFoundation/WebNSDictionaryExtras.h>
 
 @implementation WebDataSource
@@ -149,6 +150,11 @@
     return _private->request;
 }
 
+- (WebResourceResponse *)response
+{
+    return _private->response;
+}
+
 // May return nil if not initialized with a URL.
 - (NSURL *)URL
 {
@@ -230,14 +236,9 @@
     return _private->contentPolicy;
 }
 
-- (NSString *)contentType
-{
-    return _private->contentType;
-}
-
 - (NSString *)fileType
 {
-    return [[WebFileTypeMappings sharedMappings] preferredExtensionForMIMEType:[self contentType]];
+    return [[WebFileTypeMappings sharedMappings] preferredExtensionForMIMEType:[[self response] contentType]];
 }
 
 - (NSDictionary *)errors
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 1c5957c..4a98a21 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -14,6 +14,7 @@
 @class WebMainResourceClient;
 @class WebResourceHandle;
 @class WebResourceRequest;
+ at class WebResourceResponse;
 @class WebSubresourceClient;
 
 @protocol WebDocumentRepresentation;
@@ -33,6 +34,7 @@
     NSURL *inputURL;
     WebResourceRequest *originalRequest;
     WebResourceRequest *request;
+    WebResourceResponse *response;
 
     // The original URL we may have been redirected to.
     NSURL *finalURL;
@@ -59,8 +61,6 @@
     NSString *encoding;
     NSString *overrideEncoding;
 
-    NSString *contentType;
-
     // Errors associated with resources.
     NSMutableDictionary *errors;
 
@@ -100,9 +100,9 @@
 - (void)_setTitle:(NSString *)title;
 - (void)_setURL:(NSURL *)URL;
 - (void)_setRequest:(WebResourceRequest *)request;
-- (void)_setContentPolicy:(WebContentPolicy *)policy;
-- (void)_setContentType:(NSString *)type;
+- (void)_setResponse:(WebResourceResponse *)response;
 - (void)_setEncoding:(NSString *)encoding;
+- (void) _setContentPolicy:(WebContentPolicy *)policy;
 - (void)_layoutChildren;
 - (void)_clearErrors;
 - (void)_setMainDocumentError:(WebError *)error;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index d9ea286..a1533f9 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -35,6 +35,7 @@
 #import <WebFoundation/WebResourceHandle.h>
 #import <WebFoundation/WebResourceHandlePrivate.h>
 #import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
 #import <WebFoundation/WebHTTPResourceRequest.h>
 
 #import <WebCore/WebCoreEncodings.h>
@@ -71,7 +72,7 @@
     [subresourceClients release];
     [pageTitle release];
     [encoding release];
-    [contentType release];
+    [response release];
     [errors release];
     [mainDocumentError release];
     [contentPolicy release];
@@ -100,7 +101,7 @@
 
 - (Class)_representationClass
 {
-    return [[[self class] _repTypes] _web_objectForMIMEType:[self contentType]];
+    return [[[self class] _repTypes] _web_objectForMIMEType:[[self response] contentType]];
 }
 
 - (void)_setLoading:(BOOL)loading
@@ -313,6 +314,12 @@
     }
 }
 
+- (void)_setResponse:(WebResourceResponse *)response
+{
+    [_private->response release];
+    _private->response = [response retain];
+}
+
 - (void) _setContentPolicy:(WebContentPolicy *)policy
 {
     [_private->contentPolicy release];
@@ -320,13 +327,6 @@
     [self _commitIfReady];
 }
 
-- (void)_setContentType:(NSString *)type
-{
-    NSString *copy = [type copy];
-    [_private->contentType release];
-    _private->contentType = copy;
-}
-
 - (void)_setEncoding:(NSString *)encoding
 {
     NSString *copy = [encoding copy];
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 7243c8e..51c8c7c 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -17,6 +17,7 @@
 #import <WebKit/WebTextView.h>
 
 #import <WebFoundation/WebNSDictionaryExtras.h>
+#import <WebFoundation/WebResourceResponse.h>
 
 @implementation WebViewPrivate
 
@@ -68,7 +69,7 @@
 
 -(void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource
 {
-    Class viewClass = [[[self class] _viewTypes] _web_objectForMIMEType:[dataSource contentType]];
+    Class viewClass = [[[self class] _viewTypes] _web_objectForMIMEType:[[dataSource response] contentType]];
     id documentView = viewClass ? [[viewClass alloc] init] : nil;
     [self _setDocumentView:(id<WebDocumentView>)documentView];
     [documentView release];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.h b/WebKit/WebView.subproj/WebMainResourceClient.h
index bd741eb..a29f80a 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.h
+++ b/WebKit/WebView.subproj/WebMainResourceClient.h
@@ -20,7 +20,6 @@
 @interface WebMainResourceClient : NSObject <WebResourceHandleDelegate>
 {
     NSURL *currentURL;
-    WebResourceResponse *response;
     WebDataSource *dataSource;
     BOOL isFirstChunk;
     BOOL suppressErrors;
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 29504ee..956f07c 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -73,7 +73,6 @@
     [downloadProgressDelegate release];
     [resourceData release];
     [dataSource release];
-    [response release];
     
     [super dealloc];
 }
@@ -174,7 +173,7 @@
     }
     
     // Either send a final error message or a final progress message.
-    WebError *nonTerminalError = [response error];
+    WebError *nonTerminalError = [[dataSource response] error];
     if (nonTerminalError) {
         [self receivedError:nonTerminalError forHandle:handle];
     } else {
@@ -212,16 +211,15 @@
     [self didStartLoadingWithURL:URL];
 }
 
--(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)theResponse
+-(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)response
 {
-    [theResponse retain];
-    [response release];
-    response = theResponse;
+    [dataSource _setResponse:response];
 }
 
 - (void)handle:(WebResourceHandle *)handle didReceiveData:(NSData *)data
 {
     WebController *controller = [dataSource controller];
+    WebResourceResponse *response = [dataSource response];
     NSString *contentType = [response contentType];
     WebFrame *frame = [dataSource webFrame];
     WebError *downloadError = nil;
@@ -235,7 +233,6 @@
         if([contentType isEqualToString:@"application/octet-stream"] && [[[currentURL path] pathExtension] isEqualToString:@""])
             contentType = @"text/html";
         
-        [dataSource _setContentType:contentType];
         [dataSource _setEncoding:[response textEncodingName]];
         
         // retain the downloadProgressDelegate just in case this is a download.
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.h b/WebKit/WebView.subproj/WebMainResourceLoader.h
index bd741eb..a29f80a 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.h
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.h
@@ -20,7 +20,6 @@
 @interface WebMainResourceClient : NSObject <WebResourceHandleDelegate>
 {
     NSURL *currentURL;
-    WebResourceResponse *response;
     WebDataSource *dataSource;
     BOOL isFirstChunk;
     BOOL suppressErrors;
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 29504ee..956f07c 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -73,7 +73,6 @@
     [downloadProgressDelegate release];
     [resourceData release];
     [dataSource release];
-    [response release];
     
     [super dealloc];
 }
@@ -174,7 +173,7 @@
     }
     
     // Either send a final error message or a final progress message.
-    WebError *nonTerminalError = [response error];
+    WebError *nonTerminalError = [[dataSource response] error];
     if (nonTerminalError) {
         [self receivedError:nonTerminalError forHandle:handle];
     } else {
@@ -212,16 +211,15 @@
     [self didStartLoadingWithURL:URL];
 }
 
--(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)theResponse
+-(void)handle:(WebResourceHandle *)handle didReceiveResponse:(WebResourceResponse *)response
 {
-    [theResponse retain];
-    [response release];
-    response = theResponse;
+    [dataSource _setResponse:response];
 }
 
 - (void)handle:(WebResourceHandle *)handle didReceiveData:(NSData *)data
 {
     WebController *controller = [dataSource controller];
+    WebResourceResponse *response = [dataSource response];
     NSString *contentType = [response contentType];
     WebFrame *frame = [dataSource webFrame];
     WebError *downloadError = nil;
@@ -235,7 +233,6 @@
         if([contentType isEqualToString:@"application/octet-stream"] && [[[currentURL path] pathExtension] isEqualToString:@""])
             contentType = @"text/html";
         
-        [dataSource _setContentType:contentType];
         [dataSource _setEncoding:[response textEncodingName]];
         
         // retain the downloadProgressDelegate just in case this is a download.
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 4e166a5..56c62c5 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -8,6 +8,8 @@
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebPreferences.h>
 
+#import <WebFoundation/WebResourceResponse.h>
+
 @implementation WebTextView
 
 - (id)initWithFrame:(NSRect)frame
@@ -51,7 +53,7 @@
     
     // FIXME: This needs to be more efficient for progressively loading documents.
     
-    if ([[dataSource contentType] isEqualToString:@"text/rtf"]) {
+    if ([[[dataSource response] contentType] isEqualToString:@"text/rtf"]) {
         [self setRichText:YES];
         [self replaceCharactersInRange:NSMakeRange(0,0) withRTF:[dataSource data]];
     } else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list