[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 07:09:01 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8966bc8682206fa465dafd0395d1428474ce89db
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 26 20:02:48 2002 +0000
WebFoundation:
Added MIME types for images that NSImage can handle.
* types.plist:
WebKit:
Fixed: 3112003 - Show standalone tiffs using AppKit not QT plug-in
We now dynamically check NSImage for supported image types when registering WebImageView's and WebImageRepresentation's supported MIME types.
* WebView.subproj/WebControllerPrivate.h:
* WebView.subproj/WebControllerPrivate.m:
(+[WebController _supportedImageMIMETypes]): convert NSImage types to mime types
* WebView.subproj/WebDataSourcePrivate.m:
(+[WebDataSource _repTypes]): use _supportedImageMIMETypes to register mime types of WebImageRepresentation
* WebView.subproj/WebViewPrivate.m:
(+[WebView _viewTypes]): use _supportedImageMIMETypes to register mime types of WebImageView
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7a96977..8c1d18f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,19 @@
2002-11-26 Chris Blumenberg <cblu at apple.com>
+ Fixed: 3112003 - Show standalone tiffs using AppKit not QT plug-in
+
+ We now dynamically check NSImage for supported image types when registering WebImageView's and WebImageRepresentation's supported MIME types.
+
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (+[WebController _supportedImageMIMETypes]): convert NSImage types to mime types
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (+[WebDataSource _repTypes]): use _supportedImageMIMETypes to register mime types of WebImageRepresentation
+ * WebView.subproj/WebViewPrivate.m:
+ (+[WebView _viewTypes]): use _supportedImageMIMETypes to register mime types of WebImageView
+
+2002-11-26 Chris Blumenberg <cblu at apple.com>
+
Fixed: 3061174 - javascript: URLs sent by plugins don't work
For "Javascript:" URLs.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 7a96977..8c1d18f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,19 @@
2002-11-26 Chris Blumenberg <cblu at apple.com>
+ Fixed: 3112003 - Show standalone tiffs using AppKit not QT plug-in
+
+ We now dynamically check NSImage for supported image types when registering WebImageView's and WebImageRepresentation's supported MIME types.
+
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (+[WebController _supportedImageMIMETypes]): convert NSImage types to mime types
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (+[WebDataSource _repTypes]): use _supportedImageMIMETypes to register mime types of WebImageRepresentation
+ * WebView.subproj/WebViewPrivate.m:
+ (+[WebView _viewTypes]): use _supportedImageMIMETypes to register mime types of WebImageView
+
+2002-11-26 Chris Blumenberg <cblu at apple.com>
+
Fixed: 3061174 - javascript: URLs sent by plugins don't work
For "Javascript:" URLs.
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index cd064e8..855e204 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -51,6 +51,7 @@
- (void)_mainReceivedBytesSoFar:(unsigned)bytesSoFar fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
++ (NSArray *)_supportedImageMIMETypes;
- (void)_downloadURL:(NSURL *)URL;
- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 4f1b2d5..2881413 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -185,6 +185,30 @@
return result;
}
++ (NSArray *)_supportedImageMIMETypes
+{
+ static NSArray *imageMIMETypes = nil;
+
+ if(!imageMIMETypes){
+ NSEnumerator *enumerator = [[NSImage imageFileTypes] objectEnumerator];
+ WebFileTypeMappings *mappings = [WebFileTypeMappings sharedMappings];
+ NSMutableSet *mimes = [NSMutableSet set];
+ NSString *type;
+
+ while ((type = [enumerator nextObject]) != nil) {
+ NSString *mime = [mappings MIMETypeForExtension:type];
+ if(mime && ![mime isEqualToString:@"application/octet-stream"] && ![mime isEqualToString:@"application/pdf"]){
+ [mimes addObject:mime];
+ }
+ }
+
+ imageMIMETypes = [[mimes allObjects] retain];
+ NSLog([imageMIMETypes description]);
+ }
+
+ return imageMIMETypes;
+}
+
- (void)_downloadURL:(NSURL *)URL
{
[self _downloadURL:URL toPath:nil];
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 3d542de..15dc075 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -415,10 +415,13 @@
[WebHTMLRepresentation class], @"text/xml",
[WebTextRepresentation class], @"text/",
[WebTextRepresentation class], @"application/x-javascript",
- [WebImageRepresentation class], @"image/jpeg",
- [WebImageRepresentation class], @"image/gif",
- [WebImageRepresentation class], @"image/png",
nil];
+
+ NSEnumerator *enumerator = [[WebController _supportedImageMIMETypes] objectEnumerator];
+ NSString *mime;
+ while ((mime = [enumerator nextObject]) != nil) {
+ [repTypes setObject:[WebImageRepresentation class] forKey:mime];
+ }
}
return repTypes;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 71280ed..edc8aff 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -12,6 +12,7 @@
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebController.h>
+#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebHTMLView.h>
#import <WebKit/WebImageView.h>
#import <WebKit/WebTextView.h>
@@ -238,10 +239,13 @@
[WebHTMLView class], @"text/xml",
[WebTextView class], @"text/",
[WebTextView class], @"application/x-javascript",
- [WebImageView class], @"image/jpeg",
- [WebImageView class], @"image/gif",
- [WebImageView class], @"image/png",
nil];
+
+ NSEnumerator *enumerator = [[WebController _supportedImageMIMETypes] objectEnumerator];
+ NSString *mime;
+ while ((mime = [enumerator nextObject]) != nil) {
+ [viewTypes setObject:[WebImageView class] forKey:mime];
+ }
}
return viewTypes;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index cd064e8..855e204 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -51,6 +51,7 @@
- (void)_mainReceivedBytesSoFar:(unsigned)bytesSoFar fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
++ (NSArray *)_supportedImageMIMETypes;
- (void)_downloadURL:(NSURL *)URL;
- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 4f1b2d5..2881413 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -185,6 +185,30 @@
return result;
}
++ (NSArray *)_supportedImageMIMETypes
+{
+ static NSArray *imageMIMETypes = nil;
+
+ if(!imageMIMETypes){
+ NSEnumerator *enumerator = [[NSImage imageFileTypes] objectEnumerator];
+ WebFileTypeMappings *mappings = [WebFileTypeMappings sharedMappings];
+ NSMutableSet *mimes = [NSMutableSet set];
+ NSString *type;
+
+ while ((type = [enumerator nextObject]) != nil) {
+ NSString *mime = [mappings MIMETypeForExtension:type];
+ if(mime && ![mime isEqualToString:@"application/octet-stream"] && ![mime isEqualToString:@"application/pdf"]){
+ [mimes addObject:mime];
+ }
+ }
+
+ imageMIMETypes = [[mimes allObjects] retain];
+ NSLog([imageMIMETypes description]);
+ }
+
+ return imageMIMETypes;
+}
+
- (void)_downloadURL:(NSURL *)URL
{
[self _downloadURL:URL toPath:nil];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list