[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:44:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 5b3936e3901c2705e24f9855b05eab17f07421c4
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jun 11 00:12:43 2003 +0000
Fixed: <rdar://problem/3286006>: Carbon Java plug-in problems may require workaround in WebKit
Reviewed by john.
* Plugins.subproj/WebPluginDatabase.m:
(-[WebPluginDatabase canUsePlugin:]): if in a carbon app, only use the mach-o java plug-in when its version is anything but 1.0.0
(-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): call canUsePlugin on all the plug-ins
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ec082a7..fc50132 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-06-10 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3286006>: Carbon Java plug-in problems may require workaround in WebKit
+
+ Reviewed by john.
+
+ * Plugins.subproj/WebPluginDatabase.m:
+ (-[WebPluginDatabase canUsePlugin:]): if in a carbon app, only use the mach-o java plug-in when its version is anything but 1.0.0
+ (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): call canUsePlugin on all the plug-ins
+
+
2003-06-10 Vicki Murley <vicki at apple.com>
Reviewed by john.
diff --git a/WebKit/Plugins.subproj/WebPluginDatabase.m b/WebKit/Plugins.subproj/WebPluginDatabase.m
index eb79857..ecc127c 100644
--- a/WebKit/Plugins.subproj/WebPluginDatabase.m
+++ b/WebKit/Plugins.subproj/WebPluginDatabase.m
@@ -19,6 +19,11 @@
#define JavaCocoaPluginIdentifier @"com.apple.JavaPluginCocoa"
+#define JavaCarbonPluginIdentifier @"com.apple.JavaAppletPlugin"
+#define JavaCarbonPluginBadVersion @"1.0.0"
+
+#define JavaCFMPluginFilename @"Java Applet Plugin Enabler"
+
@implementation WebPluginDatabase
static WebPluginDatabase *database = nil;
@@ -55,6 +60,38 @@ static BOOL sIsCocoa = FALSE;
return sIsCocoa;
}
+- (BOOL)canUsePlugin:(WebBasePluginPackage *)plugin
+{
+ // Current versions of the Java plug-ins will not work in a Carbon environment (3283210).
+
+ if (!plugin) {
+ return NO;
+ }
+
+ if ([self isCocoa]) {
+ return YES;
+ }
+
+ NSBundle *bundle = [plugin bundle];
+ if (bundle) {
+ NSString *bundleIdentifier = [bundle bundleIdentifier];
+ if ([bundleIdentifier isEqualToString:JavaCocoaPluginIdentifier]) {
+ // The Cocoa version of the Java plug-in will never work.
+ return NO;
+ } else if ([bundleIdentifier isEqualToString:JavaCarbonPluginIdentifier] &&
+ [[[bundle infoDictionary] objectForKey:@"CFBundleVersion"] isEqualToString:JavaCarbonPluginBadVersion]) {
+ // The current version of the mach-o Java plug-in won't work.
+ return NO;
+ }
+ } else {
+ if ([[plugin filename] isEqualToString:JavaCFMPluginFilename]) {
+ // Future versions of the CFM plug-in may work, but there is no way to check its version.
+ return NO;
+ }
+ }
+ return YES;
+}
+
- (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
{
WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil, *webPlugin=nil;
@@ -87,17 +124,14 @@ static BOOL sIsCocoa = FALSE;
}
}
- // The Cocoa Java plug-in won't work in a Carbon app.
- if (webPlugin && ![self isCocoa] && [[[webPlugin bundle] bundleIdentifier] isEqualToString:JavaCocoaPluginIdentifier]) {
- webPlugin = nil;
- }
-
- if (webPlugin) {
+ if ([self canUsePlugin:webPlugin]) {
return webPlugin;
- } else if (machoPlugin) {
+ } else if ([self canUsePlugin:machoPlugin]) {
return machoPlugin;
- } else {
+ } else if ([self canUsePlugin:CFMPlugin]) {
return CFMPlugin;
+ } else {
+ return nil;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list