Fixed:
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2004 18:21:48 +0000 (18:21 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2004 18:21:48 +0000 (18:21 +0000)
<rdar://problem/3842030> WebKit needs to pass the mode (NP_FULL, NP_EMBED, etc) when calling plugInViewWithArguments
<rdar://problem/3792852> Safari is loading the new QuickTime Cocoa plugin on Panther

        Reviewed by darin.

        * Plugins.subproj/WebPluginDocumentView.m:
        (-[WebPluginDocumentView setDataSource:]): pass "full" as the mode
        * Plugins.subproj/WebPluginPackage.m:
        (-[WebPluginPackage initWithPath:]): load plug-in with the "webplugin" extension
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): pass "embed" as the mode
        * WebKit.pbproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Plugins.subproj/WebPluginDocumentView.m
WebKit/Plugins.subproj/WebPluginPackage.m
WebKit/Plugins.subproj/WebPluginViewFactoryPrivate.h [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebKit.pbproj/project.pbxproj

index dae67860f917270606ca80c2342f7fe38959e8aa..d2467748d8bf6ad3985ac5a653df6548313811a1 100644 (file)
@@ -1,3 +1,19 @@
+2004-10-20  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed:
+       <rdar://problem/3842030> WebKit needs to pass the mode (NP_FULL, NP_EMBED, etc) when calling plugInViewWithArguments
+       <rdar://problem/3792852> Safari is loading the new QuickTime Cocoa plugin on Panther
+
+        Reviewed by darin.
+
+        * Plugins.subproj/WebPluginDocumentView.m:
+        (-[WebPluginDocumentView setDataSource:]): pass "full" as the mode
+        * Plugins.subproj/WebPluginPackage.m:
+        (-[WebPluginPackage initWithPath:]): load plug-in with the "webplugin" extension
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): pass "embed" as the mode
+        * WebKit.pbproj/project.pbxproj:
+
 2004-10-19  Vicki Murley <vicki@apple.com>
 
        - bump WebKit version to 167.1, so that we can do a quick dot submission for <rdar://problem/3843951> 
index 889a7dc97009888f6d2336317e9dc4a6e88e9b87..08a89bff9ed7f034eb390d061a022ace4bc519cb 100644 (file)
@@ -14,7 +14,7 @@
 #import <WebKit/WebPluginController.h>
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebPluginPackage.h>
-#import <WebKit/WebPluginViewFactory.h>
+#import <WebKit/WebPluginViewFactoryPrivate.h>
 #import <WebKit/WebView.h>
 
 @implementation WebPluginDocumentView
@@ -64,6 +64,7 @@
         URL,                WebPlugInBaseURLKey,
         attributes,         WebPlugInAttributesKey,
         pluginController,   WebPlugInContainerKey,
+        [NSNumber numberWithInt:WebPlugInModeFull], WebPlugInModeKey,
         nil];
     [attributes release];
     NSView *view = [WebPluginController plugInViewWithArguments:arguments fromPluginPackage:plugin];
index f1e5b6303930248f0ffed99a9ab684c844652547..bf52b986649f6a920af29dd02368bc9f70187f72 100644 (file)
 #import <WebKit/WebKitLogging.h>
 
 #import <Foundation/NSPrivateDecls.h>
+#import <Foundation/NSString_NSURLExtras.h>
 
-NSString *WebPlugInBaseURLKey = @"WebPlugInBaseURLKey";
-NSString *WebPlugInAttributesKey = @"WebPlugInAttributesKey";
-NSString *WebPlugInContainerKey = @"WebPlugInContainerKey";
+NSString *WebPlugInBaseURLKey =     @"WebPlugInBaseURLKey";
+NSString *WebPlugInAttributesKey =  @"WebPlugInAttributesKey";
+NSString *WebPlugInContainerKey =   @"WebPlugInContainerKey";
+NSString *WebPlugInModeKey =        @"WebPlugInModeKey";
 
 /*!
        @constant WebPlugInContainingElementKey The DOMElement that was used to specify
@@ -28,17 +30,18 @@ extern NSString *WebPlugInContainingElementKey;
 {
     [super initWithPath:pluginPath];
 
-    if (!bundle) {
+    if (bundle == nil) {
         [self release];
         return nil;
     }
     
-    UInt32 type = 0;
-    CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
-    
-    if (type != FOUR_CHAR_CODE('WBPL')) {
-        [self release];
-        return nil;
+    if (![[pluginPath pathExtension] _web_isCaseInsensitiveEqualToString:@"webplugin"]) {
+        UInt32 type = 0;
+        CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
+        if (type != FOUR_CHAR_CODE('WBPL')) {
+            [self release];
+            return nil;
+        }
     }
 
     if (![self getPluginInfoFromBundleAndMIMEDictionary:nil]) {
diff --git a/WebKit/Plugins.subproj/WebPluginViewFactoryPrivate.h b/WebKit/Plugins.subproj/WebPluginViewFactoryPrivate.h
new file mode 100644 (file)
index 0000000..ae14b97
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+    WebPluginViewFactoryPrivate.h
+    Copyright 2004, Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/WebPluginViewFactory.h>
+
+typedef enum {
+    WebPlugInModeEmbed = 0,
+    WebPlugInModeFull  = 1
+} WebPlugInMode;
+
+/*!
+    @constant WebPlugInModeKey REQUIRED. Number with one of the values from the WebPlugInMode enum.
+*/
+extern NSString *WebPlugInModeKey;
\ No newline at end of file
index f11c9db4970954620b07658ba337a89d815086c7..e74264fe55df1bed28fa6d691110daed684621ca 100644 (file)
@@ -38,7 +38,7 @@
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebPluginDocumentView.h>
 #import <WebKit/WebPluginPackage.h>
-#import <WebKit/WebPluginViewFactory.h>
+#import <WebKit/WebPluginViewFactoryPrivate.h>
 #import <WebKit/WebNetscapePluginDocumentView.h>
 #import <WebKit/WebPreferencesPrivate.h>
 #import <WebKit/WebResourceLoadDelegate.h>
@@ -813,6 +813,7 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
             baseURL, WebPlugInBaseURLKey,
             attributes, WebPlugInAttributesKey,
             pluginController, WebPlugInContainerKey,
+            [NSNumber numberWithInt:WebPlugInModeEmbed], WebPlugInModeKey,
             nil];
         LOG(Plugins, "arguments:\n%@", arguments);
     } else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) {
index d8d5922bd7a664fccec2fe784aa8e0eb0b315c02..a3c5e7bdb8a57a7c4aed8828f682429f0d05200a 100644 (file)
                                51C6513806EFCD9300969825,
                                9305892B070868B300E79D96,
                                832D7E050709D8FB00F49B61,
+                               83E679790726D7CF006C7A36,
                        );
                        isa = PBXHeadersBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                        settings = {
                        };
                };
+               83E679780726D7CF006C7A36 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       name = WebPluginViewFactoryPrivate.h;
+                       path = Plugins.subproj/WebPluginViewFactoryPrivate.h;
+                       refType = 2;
+                       sourceTree = SOURCE_ROOT;
+               };
+               83E679790726D7CF006C7A36 = {
+                       fileRef = 83E679780726D7CF006C7A36;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                               );
+                       };
+               };
 //830
 //831
 //832
                                83E4AF4B036659440000E506,
                                83E4AF4C036659440000E506,
                                848DFF860365FE6A00CA2ACA,
+                               83E679780726D7CF006C7A36,
                                51863EFC065419EB00E9E8DD,
                        );
                        isa = PBXGroup;