[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 05:58:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f7a8a8c7d94cace4e76f25b6e4619158bd69869f
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 26 00:06:30 2002 +0000
* MIME.subproj/IFMIMEDatabase.m: (+[IFMIMEDatabase sharedMIMEDatabase]),
(-[IFMIMEDatabase MIMEHandlerForMIMEType:]), (setMimeHandlers):
* MIME.subproj/IFMIMEHandler.h:
* MIME.subproj/IFMIMEHandler.m: (-[IFMIMEHandler
initWithMIMEType:handlerType:handlerName:]), (-[IFMIMEHandler MIMEType]),
(-[IFMIMEHandler MIMESupertype]), (-[IFMIMEHandler MIMESubtype]),
(-[IFMIMEHandler handlerName]), (-[IFMIMEHandler handlerType]), (-[IFMIMEHandler
description]):
Initial implementation of the above.
Also recommitted the TestPlugin
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a13b9f8..f279fb1 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-03-25 Chris Blumenberg <cblu at apple.com>
+
+ * src/kwq/WCPlugin.mm: (-[WCPlugin load]):
+
+ Temporary special case workaround for this Java plug-in bug:
+ 2885120
+
2002-03-25 Maciej Stachowiak <mjs at apple.com>
Improved KURL performance:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a13b9f8..f279fb1 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-03-25 Chris Blumenberg <cblu at apple.com>
+
+ * src/kwq/WCPlugin.mm: (-[WCPlugin load]):
+
+ Temporary special case workaround for this Java plug-in bug:
+ 2885120
+
2002-03-25 Maciej Stachowiak <mjs at apple.com>
Improved KURL performance:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a13b9f8..f279fb1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2002-03-25 Chris Blumenberg <cblu at apple.com>
+
+ * src/kwq/WCPlugin.mm: (-[WCPlugin load]):
+
+ Temporary special case workaround for this Java plug-in bug:
+ 2885120
+
2002-03-25 Maciej Stachowiak <mjs at apple.com>
Improved KURL performance:
diff --git a/WebCore/kwq/WCPlugin.mm b/WebCore/kwq/WCPlugin.mm
index e53adad..58338d9 100644
--- a/WebCore/kwq/WCPlugin.mm
+++ b/WebCore/kwq/WCPlugin.mm
@@ -153,7 +153,11 @@
if(!memcmp([data bytes], "Joy!peff", 8)){
isCFM = TRUE;
}else{
- isCFM = TRUE; //FIXME
+ if([name isEqualToString:@"Java Plug-in"]){ //FIXME 2885120
+ isCFM = TRUE;
+ }else{
+ isCFM = FALSE;
+ }
}
[executableFile closeFile];
didLoad = CFBundleLoadExecutable(bundle);
diff --git a/WebCore/src/kwq/WCPlugin.mm b/WebCore/src/kwq/WCPlugin.mm
index e53adad..58338d9 100644
--- a/WebCore/src/kwq/WCPlugin.mm
+++ b/WebCore/src/kwq/WCPlugin.mm
@@ -153,7 +153,11 @@
if(!memcmp([data bytes], "Joy!peff", 8)){
isCFM = TRUE;
}else{
- isCFM = TRUE; //FIXME
+ if([name isEqualToString:@"Java Plug-in"]){ //FIXME 2885120
+ isCFM = TRUE;
+ }else{
+ isCFM = FALSE;
+ }
}
[executableFile closeFile];
didLoad = CFBundleLoadExecutable(bundle);
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 090237b..ed6f76f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2002-03-25 Chris Blumenberg <cblu at apple.com>
+
+ * MIME.subproj/IFMIMEDatabase.m: (+[IFMIMEDatabase sharedMIMEDatabase]),
+ (-[IFMIMEDatabase MIMEHandlerForMIMEType:]), (setMimeHandlers):
+ * MIME.subproj/IFMIMEHandler.h:
+ * MIME.subproj/IFMIMEHandler.m: (-[IFMIMEHandler
+ initWithMIMEType:handlerType:handlerName:]), (-[IFMIMEHandler MIMEType]),
+ (-[IFMIMEHandler MIMESupertype]), (-[IFMIMEHandler MIMESubtype]),
+ (-[IFMIMEHandler handlerName]), (-[IFMIMEHandler handlerType]), (-[IFMIMEHandler
+ description]):
+
+ Initial implementations of the above.
+
2002-03-25 Richard Williamson <rjw at apple.com>
Added private API to allow browser to access the DOM tree.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 090237b..ed6f76f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-03-25 Chris Blumenberg <cblu at apple.com>
+
+ * MIME.subproj/IFMIMEDatabase.m: (+[IFMIMEDatabase sharedMIMEDatabase]),
+ (-[IFMIMEDatabase MIMEHandlerForMIMEType:]), (setMimeHandlers):
+ * MIME.subproj/IFMIMEHandler.h:
+ * MIME.subproj/IFMIMEHandler.m: (-[IFMIMEHandler
+ initWithMIMEType:handlerType:handlerName:]), (-[IFMIMEHandler MIMEType]),
+ (-[IFMIMEHandler MIMESupertype]), (-[IFMIMEHandler MIMESubtype]),
+ (-[IFMIMEHandler handlerName]), (-[IFMIMEHandler handlerType]), (-[IFMIMEHandler
+ description]):
+
+ Initial implementations of the above.
+
2002-03-25 Richard Williamson <rjw at apple.com>
Added private API to allow browser to access the DOM tree.
diff --git a/WebKit/MIME.subproj/IFMIMEDatabase.m b/WebKit/MIME.subproj/IFMIMEDatabase.m
index 94bad1a..e411d8f 100644
--- a/WebKit/MIME.subproj/IFMIMEDatabase.m
+++ b/WebKit/MIME.subproj/IFMIMEDatabase.m
@@ -8,18 +8,31 @@
#import "IFMIMEDatabase.h"
+NSMutableDictionary *setMimeHandlers(void);
+
+
+static IFMIMEDatabase *sharedMIMEDatabase = nil;
@implementation IFMIMEDatabase
+ (IFMIMEDatabase *)sharedMIMEDatabase
{
- return nil;
+ if(!sharedMIMEDatabase){
+ sharedMIMEDatabase = [IFMIMEDatabase alloc];
+ sharedMIMEDatabase->mimeHandlers = setMimeHandlers();
+ }
+ return sharedMIMEDatabase;
}
- (IFMIMEHandler *)MIMEHandlerForMIMEType:(NSString *)mimeType
{
- return nil;
+ IFMIMEHandler *tempHandler;
+ tempHandler = [mimeHandlers objectForKey:mimeType];
+ if(tempHandler)
+ return tempHandler;
+ else
+ return [[IFMIMEHandler alloc] initWithMIMEType:mimeType handlerType:IFMIMEHANDLERTYPE_APPLICATION handlerName:@""];
}
@@ -29,3 +42,47 @@
}
@end
+
+NSMutableDictionary *setMimeHandlers(void)
+{
+ NSArray *textTypes, *imageTypes;
+ NSMutableDictionary *handledTypes;
+ IFMIMEHandler *tempHandler;
+ NSString *tempMime = nil;
+ uint i;
+
+ handledTypes = [NSMutableDictionary dictionaryWithCapacity:20];
+ textTypes = [NSArray arrayWithObjects:@"text/plain", @"text/richtext", @"application/rtf", nil];
+ imageTypes = [NSArray arrayWithObjects:
+ @"image/pict",
+ @"application/postscript",
+ @"image/tiff",
+ @"image/x-quicktime",
+ @"image/x-targa",
+ @"image/x-sgi",
+ @"image/x-rgb",
+ @"image/x-macpaint",
+ @"image/png",
+ @"image/gif",
+ @"image/jpg",
+ @"image/x-bmp",
+ @"image/tiff",
+ @"image/x-tiff", nil];
+
+ for(i=0; i<[textTypes count]; i++){
+ tempMime = [textTypes objectAtIndex:i];
+ tempHandler = [[IFMIMEHandler alloc] initWithMIMEType:tempMime handlerType:IFMIMEHANDLERTYPE_TEXT handlerName:@"WebKit"];
+ [handledTypes setObject:tempHandler forKey:tempMime];
+ }
+ for(i=0; i<[imageTypes count]; i++){
+ tempMime = [imageTypes objectAtIndex:i];
+ tempHandler = [[IFMIMEHandler alloc] initWithMIMEType:tempMime handlerType:IFMIMEHANDLERTYPE_IMAGE handlerName:@"WebKit"];
+ [handledTypes setObject:tempHandler forKey:tempMime];
+ }
+ tempHandler = [[IFMIMEHandler alloc] initWithMIMEType:@"text/html" handlerType:IFMIMEHANDLERTYPE_HTML handlerName:@"WebKit"];
+ [handledTypes setObject:tempHandler forKey:@"text/html"];
+
+ [handledTypes retain];
+
+ return handledTypes;
+}
\ No newline at end of file
diff --git a/WebKit/MIME.subproj/IFMIMEHandler.h b/WebKit/MIME.subproj/IFMIMEHandler.h
index 2b32fa7..593fb32 100644
--- a/WebKit/MIME.subproj/IFMIMEHandler.h
+++ b/WebKit/MIME.subproj/IFMIMEHandler.h
@@ -31,7 +31,7 @@ typedef enum {
initWithMIMEType gets called by [IFMIMEDatabase sharedMIMEDatabase] for at least every mime type that WebKit handles. We, at some point, might want to store IFMIMEHandler's for types that other application handle. I hope not though.
*/
-- initWithMIMEType:(NSString *)MIME handlerType:(IFMIMEHandlerType *)hType handlerName:(NSString *)handler;
+- initWithMIMEType:(NSString *)MIME handlerType:(IFMIMEHandlerType)hType handlerName:(NSString *)handler;
// Accessor methods
- (NSString *)MIMEType;
diff --git a/WebKit/MIME.subproj/IFMIMEHandler.m b/WebKit/MIME.subproj/IFMIMEHandler.m
index ee8d1c0..2bee382 100644
--- a/WebKit/MIME.subproj/IFMIMEHandler.m
+++ b/WebKit/MIME.subproj/IFMIMEHandler.m
@@ -12,41 +12,66 @@
@implementation IFMIMEHandler
-- initWithMIMEType:(NSString *)MIME handlerType:(IFMIMEHandlerType *)hType handlerName:(NSString *)handler
+- initWithMIMEType:(NSString *)MIME handlerType:(IFMIMEHandlerType)hType handlerName:(NSString *)handler
{
- return nil;
+ NSRange r;
+
+ MIMEType = MIME;
+ handlerType = hType;
+ handlerName = handler;
+
+ r = [MIMEType rangeOfString:@"/"];
+ MIMESupertype = [MIMEType substringToIndex:r.location];
+ MIMESubtype = [MIMEType substringFromIndex:r.location];
+
+ return self;
}
// Accessor methods
- (NSString *)MIMEType
{
- return nil;
+ return MIMEType;
}
- (NSString *)MIMESupertype
{
- return nil;
+ return MIMESupertype;
}
- (NSString *)MIMESubtype
{
- return nil;
+ return MIMESubtype;
}
- (NSString *)handlerName
{
- return nil;
+ return handlerName;
}
- (IFMIMEHandlerType)handlerType
{
- return 1;
+ return handlerType;
}
+- (NSString *) description
+{
+ NSString *handlerTypeString = nil;
+ if(handlerType == IFMIMEHANDLERTYPE_HTML)
+ handlerTypeString = @"IFMIMEHANDLERTYPE_HTML";
+ else if(handlerType == IFMIMEHANDLERTYPE_IMAGE)
+ handlerTypeString = @"IFMIMEHANDLERTYPE_IMAGE";
+ else if(handlerType == IFMIMEHANDLERTYPE_TEXT)
+ handlerTypeString = @"IFMIMEHANDLERTYPE_TEXT";
+ else if(handlerType == IFMIMEHANDLERTYPE_PLUG_IN)
+ handlerTypeString = @"IFMIMEHANDLERTYPE_PLUG_IN";
+ else if(handlerType == IFMIMEHANDLERTYPE_APPLICATION)
+ handlerTypeString = @"IFMIMEHANDLERTYPE_APPLICATION";
+ return [NSString stringWithFormat:@"MIME TYPE: %@, HANDLER TYPE: %@, HANDLER NAME: %@", MIMEType, handlerTypeString, handlerName];
+}
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list