[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:31:58 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 015f3d550e51e5389249733fd481e6a561276178
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 27 19:59:14 2003 +0000
Tools:
Reviewed by Trey
Moved to final NSURLResponse and NSHTTPURLResponse API.
* WebDiskCacheInspector/Controller.m:
(-[Controller tableView:objectValueForTableColumn:row:]):
(-[Controller setCacheObject:]):
Tests:
Reviewed by Trey
Moved to final NSURLResponse and NSHTTPURLResponse API.
* SnippetEditor/DataResourceRequest.m:
(-[DataProtocolHandler startLoadingWithCacheObject:]):
WebFoundation:
Reviewed by Trey
Moved to final NSURLResponse and NSHTTPURLResponse API.
Includes these method name changes:
replacemethod "resultCode" with "statusCode"
replacemethod "setResultCode:" with "setStatusCode:"
replacemethod "localizedStringForResultCode:" with "localizedStringForStatusCode:"
replacemethod "isErrorResultCode:" with "isErrorStatusCode:"
replacemethod "contentType" with "MIMEType" /* for NSURLResponse */
replacemethod "contentLength" with "expectedContentLength"
replacemethod "setContentType:" with "setMIMEType:"
replacemethod "setContentLength:" with "setExpectedContentLength:"
Other changes:
Bumped NSURLResponseVersion.
Removed WebError from NSURLResponse. Error object now tracked in WebResource.
Moved NSHTTPURLResponse into NSURLResponse header.
Bumped WebCacheObjectVersion.
* CacheLoader.subproj/NSURLResponse.h:
* CacheLoader.subproj/NSURLResponse.m:
(-[NSURLResponseInternal init]):
(-[NSURLResponseInternal dealloc]):
(-[NSURLResponse initWithCoder:]):
(-[NSURLResponse encodeWithCoder:]):
(-[NSURLResponse MIMEType]):
(-[NSURLResponse expectedContentLength]):
(-[NSURLResponse setExpectedContentLength:]):
(-[NSURLResponse setMIMEType:]):
(-[NSURLResponse createdDate]):
(-[NSURLResponse lastModifiedDate]):
(-[NSHTTPURLResponseInternal initWithCoder:]):
(-[NSHTTPURLResponseInternal encodeWithCoder:]):
(-[NSHTTPURLResponseInternal dealloc]):
(-[NSHTTPURLResponse init]):
(-[NSHTTPURLResponse initWithCoder:]):
(-[NSHTTPURLResponse encodeWithCoder:]):
(-[NSHTTPURLResponse allHeaderFields]):
(-[NSHTTPURLResponse statusCode]):
(-[NSHTTPURLResponse setStatusCode:]):
(-[NSHTTPURLResponse setHeader:]):
(-[NSHTTPURLResponse dealloc]):
(+[NSHTTPURLResponse localizedStringForStatusCode:]):
(+[NSHTTPURLResponse isErrorStatusCode:]):
* CacheLoader.subproj/NSURLResponsePrivate.h:
* CacheLoader.subproj/WebCacheObject.m:
* CacheLoader.subproj/WebMutableResponse.h:
* CacheLoader.subproj/WebResource.m:
(-[WebResource _sendWillSendRequestCallback]):
(-[WebResource _sendDidFailLoadingCallback]):
(-[WebResource _redirectedToRequest:permanent:]):
(-[WebResource _responseAvailable:]):
(-[WebResource _didLoadBytes:length:]):
(-[WebResource _finishedLoading]):
(-[WebResource _failedWithError:]):
(-[WebResource _setError:]):
(-[WebResourceInternal dealloc]):
(-[WebResourceInternal failedWithError:]):
* CacheLoader.subproj/WebSynchronousDelegate.m:
(-[WebSynchronousDelegate result]):
* Misc.subproj/WebFoundation.h:
* ProtocolHandlers.subproj/NSHTTPURLResponse.h:
* ProtocolHandlers.subproj/NSHTTPURLResponse.m:
(-[NSHTTPURLResponse statusCode]):
(-[NSHTTPURLResponse setStatusCode:]):
(+[NSHTTPURLResponse localizedStringForStatusCode:]):
(+[NSHTTPURLResponse isErrorStatusCode:]):
* ProtocolHandlers.subproj/NSHTTPURLResponsePrivate.h:
* ProtocolHandlers.subproj/WebAboutProtocol.m:
(-[WebAboutProtocol startLoadingWithCacheObject:]):
* ProtocolHandlers.subproj/WebCFNetworkHTTPProtocol.m:
(-[WebCFNetworkHTTPProtocol performHTTPHeaderRead:andCall:]):
* ProtocolHandlers.subproj/WebFTPProtocol.m:
(-[WebFTPProtocol sendResponseAvailableCallback]):
* ProtocolHandlers.subproj/WebFileProtocol.m:
(-[WebFileProtocol didLoadData:]):
* ProtocolHandlers.subproj/WebHTTPProtocol.h:
* ProtocolHandlers.subproj/WebHTTPProtocol.m:
(-[WebHTTPProtocol sendResponseAvailableCallback]):
(-[WebHTTPProtocol canStoreCacheObject:]):
* ProtocolHandlers.subproj/WebSimpleHTTPProtocol.m:
(-[WebSimpleHTTPProtocol _processHTTPResultCode]):
* WebFoundation.pbproj/project.pbxproj:
WebKit:
Reviewed by Trey
Moved to final NSURLResponse and NSHTTPURLResponse API.
* Downloads.subproj/WebDownload.m:
* Misc.subproj/WebNSURLResponseExtras.m:
(-[NSURLResponse suggestedFilenameForSaving]):
(-[NSHTTPURLResponse suggestedFilenameForSaving]):
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(-[WebBaseNetscapePluginStream setResponse:]):
* Plugins.subproj/WebNetscapePluginDocumentView.m:
(-[WebNetscapePluginDocumentView setDataSource:]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _representationClass]):
(-[WebDataSource _commitIfReady:]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _opened]):
(-[WebFrame _loadItem:fromItem:withLoadType:]):
* WebView.subproj/WebFrameViewPrivate.m:
(-[WebFrameView _makeDocumentViewForDataSource:]):
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient continueAfterContentPolicy:response:]):
(-[WebMainResourceClient checkContentPolicyForResponse:]):
(-[WebMainResourceClient resource:didReceiveResponse:]):
(-[WebMainResourceClient startLoading:]):
* WebView.subproj/WebTextRepresentation.m:
(-[WebTextRepresentation setDataSource:]):
* WebView.subproj/WebTextView.m:
(-[WebTextView dataSourceUpdated:]):
WebBrowser:
Reviewed by Trey
Moved to final NSURLResponse and NSHTTPURLResponse API.
* BrowserDocument.m:
(-[BrowserDocument fileType]):
* DownloadMonitor.m:
(-[DownloadMonitor download:didReceiveResponse:]):
* DownloadProgressEntry.m:
(-[DownloadProgressEntry setResponse:]):
* LoadProgressMonitor.m:
(-[LoadProgressMonitor webView:resource:didReceiveResponse:fromDataSource:]):
* ResourceProgressEntry.h:
* ResourceProgressEntry.m:
(-[ResourceProgressEntry statusCode]):
(-[ResourceProgressEntry setStatusCode:]):
(-[ResourceProgressEntry statusString]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e2dd00b..4965522 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,35 @@
+2003-03-27 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Trey
+
+ Moved to final NSURLResponse and NSHTTPURLResponse API.
+
+ * Downloads.subproj/WebDownload.m:
+ * Misc.subproj/WebNSURLResponseExtras.m:
+ (-[NSURLResponse suggestedFilenameForSaving]):
+ (-[NSHTTPURLResponse suggestedFilenameForSaving]):
+ * Plugins.subproj/WebBaseNetscapePluginStream.m:
+ (-[WebBaseNetscapePluginStream setResponse:]):
+ * Plugins.subproj/WebNetscapePluginDocumentView.m:
+ (-[WebNetscapePluginDocumentView setDataSource:]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _representationClass]):
+ (-[WebDataSource _commitIfReady:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _opened]):
+ (-[WebFrame _loadItem:fromItem:withLoadType:]):
+ * WebView.subproj/WebFrameViewPrivate.m:
+ (-[WebFrameView _makeDocumentViewForDataSource:]):
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+ (-[WebMainResourceClient checkContentPolicyForResponse:]):
+ (-[WebMainResourceClient resource:didReceiveResponse:]):
+ (-[WebMainResourceClient startLoading:]):
+ * WebView.subproj/WebTextRepresentation.m:
+ (-[WebTextRepresentation setDataSource:]):
+ * WebView.subproj/WebTextView.m:
+ (-[WebTextView dataSourceUpdated:]):
+
=== Safari-69 ===
2003-03-26 Richard Williamson <rjw at apple.com>
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 2f55dbb..569d0ea 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -24,6 +24,7 @@
#import <WebFoundation/NSURLRequest.h>
#import <WebFoundation/WebResource.h>
#import <WebFoundation/NSURLResponse.h>
+#import <WebFoundation/NSURLResponsePrivate.h>
typedef struct WebFSForkIOParam
{
diff --git a/WebKit/Misc.subproj/WebNSURLResponseExtras.m b/WebKit/Misc.subproj/WebNSURLResponseExtras.m
index 762b18e..30180eb 100644
--- a/WebKit/Misc.subproj/WebNSURLResponseExtras.m
+++ b/WebKit/Misc.subproj/WebNSURLResponseExtras.m
@@ -10,7 +10,6 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebFileTypeMappings.h>
-#import <WebFoundation/NSHTTPURLResponse.h>
#import <WebFoundation/WebLocalizableStrings.h>
#import <WebFoundation/WebNSStringExtras.h>
@@ -25,7 +24,7 @@
ASSERT([self URL]);
// Get the filename from the URL and the MIME type. Always returns something valid.
- return [[self URL] _web_suggestedFilenameForSavingWithMIMEType:[self contentType]];
+ return [[self URL] _web_suggestedFilenameForSavingWithMIMEType:[self MIMEType]];
}
@end
@@ -37,7 +36,7 @@
NSString *filename = nil;
// Use the content disposition of the filename if present.
- NSString *contentDispositionHeader = [[self header] objectForKey:@"Content-Disposition"];
+ NSString *contentDispositionHeader = [[self allHeaderFields] objectForKey:@"Content-Disposition"];
filename = [contentDispositionHeader _web_fileNameFromContentDispositionHeader];
filename = [filename _web_filenameByFixingIllegalCharacters];
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
index ecbc63e..959ab79 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
@@ -9,6 +9,7 @@
#import <WebKit/WebNetscapePluginPackage.h>
#import <WebFoundation/NSURLResponse.h>
+#import <WebFoundation/NSURLResponsePrivate.h>
#import <WebFoundation/WebNSFileManagerExtras.h>
@implementation WebBaseNetscapePluginStream
@@ -61,7 +62,7 @@
stream.ndata = self;
stream.URL = cURL;
- stream.end = [r contentLength];
+ stream.end = [r expectedContentLength];
stream.lastmodified = [[r lastModifiedDate] timeIntervalSince1970];
stream.notifyData = notifyData;
@@ -70,7 +71,7 @@
// FIXME: Need a way to check if stream is seekable
NPError npErr;
- npErr = NPP_NewStream(instance, (char *)[[r contentType] cString], &stream, NO, &transferMode);
+ npErr = NPP_NewStream(instance, (char *)[[r MIMEType] cString], &stream, NO, &transferMode);
LOG(Plugins, "NPP_NewStream: %d %@", npErr, URL);
if (npErr != NPERR_NO_ERROR) {
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 55e9fa3..c9bd056 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -71,7 +71,7 @@
[dataSource release];
dataSource = [theDataSource retain];
- NSString *MIME = [[dataSource response] contentType];
+ NSString *MIME = [[dataSource response] MIMEType];
[self setMIMEType:MIME];
[self setBaseURL:[[dataSource request] URL]];
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 617971c..8b46021 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -30,13 +30,13 @@
#import <WebKit/WebViewPrivate.h>
#import <WebFoundation/WebError.h>
-#import <WebFoundation/NSHTTPURLResponse.h>
#import <WebFoundation/WebNSDictionaryExtras.h>
#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebNSURLExtras.h>
#import <WebFoundation/WebResource.h>
#import <WebFoundation/NSURLRequest.h>
#import <WebFoundation/NSURLResponse.h>
+#import <WebFoundation/NSURLResponsePrivate.h>
@implementation WebDataSourcePrivate
@@ -91,7 +91,7 @@
- (Class)_representationClass
{
- return [[[self class] _repTypes] _web_objectForMIMEType:[[self response] contentType]];
+ return [[[self class] _repTypes] _web_objectForMIMEType:[[self response] MIMEType]];
}
- (void)_setLoading:(BOOL)loading
@@ -478,7 +478,7 @@
|| loadType == WebFrameLoadTypeReloadAllowingStaleData;
NSDictionary *headers = [_private->response isKindOfClass:[NSHTTPURLResponse class]]
- ? [(NSHTTPURLResponse *)_private->response header] : nil;
+ ? [(NSHTTPURLResponse *)_private->response allHeaderFields] : nil;
[frame _closeOldDataSources];
@@ -498,7 +498,7 @@
[[self _bridge] openURL:urlString
reload:reload
- contentType:[_private->response contentType]
+ contentType:[_private->response MIMEType]
refresh:[headers objectForKey:@"Refresh"]
lastModified:(pageCache ? nil : [_private->response lastModifiedDate])
pageCache:pageCache];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index aa6f0b0..9c09ca6 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -832,7 +832,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
response = [responses objectAtIndex: i];
[_private->bridge objectLoadedFromCacheWithURL: [[response URL] absoluteString]
response: response
- size: [response contentLength]];
+ size: [response expectedContentLength]];
}
// Release the resources kept in the page cache. They will be
@@ -1104,8 +1104,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
// have the item vanish when we try to use it in the ensuing nav. This should be
// extremely rare, but in that case the user will get an error on the navigation.
[request setCachePolicy:NSURLRequestReturnCacheDataDontLoad];
- WebSynchronousResult *result = [WebResource sendSynchronousRequest:request];
- if ([[result response] error]) {
+ /* WebFoundation API FIXME: fix when new synchronous code is implemented */
+ //WebSynchronousResult *result = [WebResource sendSynchronousRequest:request];
+ if (NO) {
// Not in WF cache
[request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
action = [self _actionInformationForNavigationType:WebNavigationTypeFormResubmitted event:nil originalURL:itemURL];
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 951d1c2..3339ecc 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -83,7 +83,7 @@
-(NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource
{
- Class viewClass = [[[self class] _viewTypes] _web_objectForMIMEType:[[dataSource response] contentType]];
+ Class viewClass = [[[self class] _viewTypes] _web_objectForMIMEType:[[dataSource response] MIMEType]];
NSView <WebDocumentView> *documentView = viewClass ? [[viewClass alloc] init] : nil;
[self _setDocumentView:documentView];
[documentView release];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 28528a7..bc62a27 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -145,7 +145,7 @@
switch (contentPolicy) {
case WebPolicyUse:
- if (![WebView canShowMIMEType:[r contentType]]) {
+ if (![WebView canShowMIMEType:[r MIMEType]]) {
[[dataSource webFrame] _handleUnimplementablePolicyWithErrorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
[self stopLoadingForPolicyChange];
return;
@@ -195,7 +195,7 @@
WebView *c = [dataSource _controller];
[c setDefersCallbacks:YES];
- [[c _policyDelegateForwarder] webView:c decideContentPolicyForMIMEType:[r contentType]
+ [[c _policyDelegateForwarder] webView:c decideContentPolicyForMIMEType:[r MIMEType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]
decisionListener:listener];
@@ -208,10 +208,10 @@
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
- LOG(Loading, "main content type: %@", [r contentType]);
+ LOG(Loading, "main content type: %@", [r MIMEType]);
[dataSource _setResponse:r];
- _contentLength = [r contentLength];
+ _contentLength = [r expectedContentLength];
// Figure out the content policy.
[self checkContentPolicyForResponse:r];
@@ -276,8 +276,8 @@
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
- [rsp setContentType:@"text/html"];
- [rsp setContentLength:0];
+ [rsp setMIMEType:@"text/html"];
+ [rsp setExpectedContentLength:0];
[self resource:resource didReceiveResponse:rsp];
[rsp release];
} else {
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 28528a7..bc62a27 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -145,7 +145,7 @@
switch (contentPolicy) {
case WebPolicyUse:
- if (![WebView canShowMIMEType:[r contentType]]) {
+ if (![WebView canShowMIMEType:[r MIMEType]]) {
[[dataSource webFrame] _handleUnimplementablePolicyWithErrorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
[self stopLoadingForPolicyChange];
return;
@@ -195,7 +195,7 @@
WebView *c = [dataSource _controller];
[c setDefersCallbacks:YES];
- [[c _policyDelegateForwarder] webView:c decideContentPolicyForMIMEType:[r contentType]
+ [[c _policyDelegateForwarder] webView:c decideContentPolicyForMIMEType:[r MIMEType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]
decisionListener:listener];
@@ -208,10 +208,10 @@
ASSERT(![self defersCallbacks]);
ASSERT(![[dataSource _controller] defersCallbacks]);
- LOG(Loading, "main content type: %@", [r contentType]);
+ LOG(Loading, "main content type: %@", [r MIMEType]);
[dataSource _setResponse:r];
- _contentLength = [r contentLength];
+ _contentLength = [r expectedContentLength];
// Figure out the content policy.
[self checkContentPolicyForResponse:r];
@@ -276,8 +276,8 @@
NSURLResponse *rsp = [[NSURLResponse alloc] init];
[rsp setURL:[[[self dataSource] request] URL]];
- [rsp setContentType:@"text/html"];
- [rsp setContentLength:0];
+ [rsp setMIMEType:@"text/html"];
+ [rsp setExpectedContentLength:0];
[self resource:resource didReceiveResponse:rsp];
[rsp release];
} else {
diff --git a/WebKit/WebView.subproj/WebTextRepresentation.m b/WebKit/WebView.subproj/WebTextRepresentation.m
index e7e8e5f..bf60a22 100644
--- a/WebKit/WebView.subproj/WebTextRepresentation.m
+++ b/WebKit/WebView.subproj/WebTextRepresentation.m
@@ -18,7 +18,7 @@
- (void)setDataSource:(WebDataSource *)dataSource
{
- hasRTFSource = [[[dataSource response] contentType] isEqualToString:@"text/rtf"];
+ hasRTFSource = [[[dataSource response] MIMEType] isEqualToString:@"text/rtf"];
if (hasRTFSource){
RTFSource = [[dataSource _stringWithData: [dataSource data]] retain];
}
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 4bd16e5..cab72e3 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -65,7 +65,7 @@
{
// FIXME: This needs to be more efficient for progressively loading documents.
- if ([[[dataSource response] contentType] isEqualToString:@"text/rtf"]) {
+ if ([[[dataSource response] MIMEType] isEqualToString:@"text/rtf"]) {
[self setRichText:YES];
[self replaceCharactersInRange:NSMakeRange(0, [[self string] length]) withRTF:[dataSource data]];
} else {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list