[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 08:29:07 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b5ab748ac7d92094c351d62987abaca6d0a92e91
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 10 21:50:26 2004 +0000
Made dragging of web archives work.
Reviewed by rjw.
* English.lproj/StringsNotToBeLocalized.txt: updated
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient connection:didReceiveResponse:]): added a FIXME about working around old Foundations that don't know about web archive files
* WebView.subproj/WebView.m:
(+[WebView canShowFile:]): tweak
(+[WebView suggestedFileExtensionForMIMEType:]): tweak
(+[WebView _MIMETypeForFile:]): handle web archive files since Foundation may be too old to know about them
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ec6b7da..e6975ca 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2004-03-10 Chris Blumenberg <cblu at apple.com>
+
+ Made dragging of web archives work.
+
+ Reviewed by rjw.
+
+ * English.lproj/StringsNotToBeLocalized.txt: updated
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient connection:didReceiveResponse:]): added a FIXME about working around old Foundations that don't know about web archive files
+ * WebView.subproj/WebView.m:
+ (+[WebView canShowFile:]): tweak
+ (+[WebView suggestedFileExtensionForMIMEType:]): tweak
+ (+[WebView _MIMETypeForFile:]): handle web archive files since Foundation may be too old to know about them
+
2004-03-09 Chris Blumenberg <cblu at apple.com>
Made web archives use NSPropertyListBinaryFormat_v1_0 instead of NSPropertyListXMLFormat_v1_0 because NSPropertyListBinaryFormat_v1_0 is 3-5 times faster to serialize and parse.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index c2c3966..796c9f4 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -58,7 +58,7 @@
"ATSUSetLayoutControls failed(%d)"
"ATSUSetTransientFontMatching failed(%d)"
"Apple Chancery"
-"Apple Web Kit pasteboard type"
+"Apple Web Archive pasteboard type"
"AppleFontSmoothing"
"AppleKeyboardUIMode"
"BP_CreatePluginMIMETypesPreferences"
@@ -256,6 +256,7 @@
"application/postscript"
"application/x-java-applet"
"application/x-javascript"
+"application/x-webarchive"
"application/xhtml+xml"
"application/xml"
"c"
@@ -299,6 +300,7 @@
"unexpected result from ATSUGetGlyphBounds(): actualNumBounds(%d) != 1"
"url_icon"
"visitCount"
+"webarchive"
"x"
"x-apple-web-kit/"
"~/Library/Icons"
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 4b721e3..3ae9c0a 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -279,8 +279,9 @@
ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "main content type: %@", [r MIMEType]);
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+
+ // FIXME: This is a workaround to make web archive files work with Foundations that
+ // are too old to know about web archive files. We should remove this before we ship.
NSURL *URL = [r URL];
if ([[[URL path] pathExtension] _web_isCaseInsensitiveEqualToString:@"webarchive"]) {
r = [[[NSURLResponse alloc] initWithURL:URL
@@ -288,7 +289,6 @@
expectedContentLength:[r expectedContentLength]
textEncodingName:[r textEncodingName]] autorelease];
}
-#endif
// retain/release self in this delegate method since the additional processing can do
// anything including possibly releasing self; one example of this is 3266216
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 4b721e3..3ae9c0a 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -279,8 +279,9 @@
ASSERT(![[dataSource _webView] defersCallbacks]);
LOG(Loading, "main content type: %@", [r MIMEType]);
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+
+ // FIXME: This is a workaround to make web archive files work with Foundations that
+ // are too old to know about web archive files. We should remove this before we ship.
NSURL *URL = [r URL];
if ([[[URL path] pathExtension] _web_isCaseInsensitiveEqualToString:@"webarchive"]) {
r = [[[NSURLResponse alloc] initWithURL:URL
@@ -288,7 +289,6 @@
expectedContentLength:[r expectedContentLength]
textEncodingName:[r textEncodingName]] autorelease];
}
-#endif
// retain/release self in this delegate method since the additional processing can do
// anything including possibly releasing self; one example of this is 3266216
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 2ae06a8..5049987 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -47,14 +47,14 @@
#import <WebCore/WebCoreEncodings.h>
#import <WebCore/WebCoreSettings.h>
-#import <Foundation/NSUserDefaults_NSURLExtras.h>
-#import <Foundation/NSURLConnection.h>
-
#import <Foundation/NSData_NSURLExtras.h>
#import <Foundation/NSDictionary_NSURLExtras.h>
+#import <Foundation/NSString_NSURLExtras.h>
+#import <Foundation/NSURLConnection.h>
#import <Foundation/NSURLDownloadPrivate.h>
#import <Foundation/NSURLFileTypeMappings.h>
#import <Foundation/NSURLRequestPrivate.h>
+#import <Foundation/NSUserDefaults_NSURLExtras.h>
NSString *WebElementFrameKey = @"WebElementFrame";
NSString *WebElementImageKey = @"WebElementImage";
@@ -213,16 +213,12 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
[WebTextRenderer _setAlwaysUseATSU:f];
}
-
+ (BOOL)canShowFile:(NSString *)path
{
- NSString *MIMEType;
-
- MIMEType = [WebView _MIMETypeForFile:path];
- return [[self class] canShowMIMEType:MIMEType];
+ return [[self class] canShowMIMEType:[WebView _MIMETypeForFile:path]];
}
-+ (NSString *)suggestedFileExtensionForMIMEType: (NSString *)type
++ (NSString *)suggestedFileExtensionForMIMEType:(NSString *)type
{
return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:type];
}
@@ -302,7 +298,6 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
}
}
-
- (void)_receivedError: (NSError *)error fromDataSource: (WebDataSource *)dataSource
{
WebFrame *frame = [dataSource webFrame];
@@ -331,6 +326,12 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
NSString *extension = [path pathExtension];
NSString *MIMEType = nil;
+ // FIXME: This is a workaround to make web archive files work with Foundations that
+ // are too old to know about web archive files. We should remove this before we ship.
+ if ([extension _web_isCaseInsensitiveEqualToString:@"webarchive"]) {
+ return @"application/x-webarchive";
+ }
+
// Get the MIME type from the extension.
if ([extension length] != 0) {
MIMEType = [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
@@ -344,7 +345,7 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
if ([data length] != 0) {
MIMEType = [data _web_guessedMIMEType];
}
- if ([MIMEType length] == 0){
+ if ([MIMEType length] == 0) {
MIMEType = @"application/octet-stream";
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list