[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 06:53:19 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 341cf3cb83ee21685af4e40565b6ae8c05e06a69
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 23 18:52:33 2002 +0000

    WebCore:
    
    	For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame.
    
            * khtml/khtml_part.cpp:
            (KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
            * kwq/KWQKHTMLPartImpl.mm:
            (KWQKHTMLPartImpl::createPart): call the bridge to create the view
            * kwq/KWQKJavaAppletWidget.mm:
            (KJavaAppletWidget::KJavaAppletWidget): save the context
            (KJavaAppletWidget::showApplet): call the bridge to create the view
            * kwq/WebCoreBridge.h:
            * kwq/WebCoreViewFactory.h:
            * kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
            * kwq/khtml/java/kjavaappletwidget.h: ivar for the context
    
    WebKit:
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge requestedURL]):
            (-[WebBridge viewForPluginWithURL:serviceType:arguments:baseURL:]):
            (-[WebBridge viewForJavaAppletWithFrame:baseURL:parameters:]):
            * WebCoreSupport.subproj/WebViewFactory.m:
            (-[WebViewFactory fileButton]):
            (-[WebViewFactory pluginsInfo]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index eb57ac0..eadccb9 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-10-23  Chris Blumenberg  <cblu at apple.com>
+
+	For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame. 
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::createPart): call the bridge to create the view
+        * kwq/KWQKJavaAppletWidget.mm:
+        (KJavaAppletWidget::KJavaAppletWidget): save the context
+        (KJavaAppletWidget::showApplet): call the bridge to create the view
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreViewFactory.h:
+        * kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
+        * kwq/khtml/java/kjavaappletwidget.h: ivar for the context
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fixed 3080478 -- reproducible incomplete load on apple.com
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index eb57ac0..eadccb9 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2002-10-23  Chris Blumenberg  <cblu at apple.com>
+
+	For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame. 
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::createPart): call the bridge to create the view
+        * kwq/KWQKJavaAppletWidget.mm:
+        (KJavaAppletWidget::KJavaAppletWidget): save the context
+        (KJavaAppletWidget::showApplet): call the bridge to create the view
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreViewFactory.h:
+        * kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
+        * kwq/khtml/java/kjavaappletwidget.h: ivar for the context
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fixed 3080478 -- reproducible incomplete load on apple.com
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eb57ac0..eadccb9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2002-10-23  Chris Blumenberg  <cblu at apple.com>
+
+	For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame. 
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::createPart): call the bridge to create the view
+        * kwq/KWQKJavaAppletWidget.mm:
+        (KJavaAppletWidget::KJavaAppletWidget): save the context
+        (KJavaAppletWidget::showApplet): call the bridge to create the view
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreViewFactory.h:
+        * kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
+        * kwq/khtml/java/kjavaappletwidget.h: ivar for the context
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fixed 3080478 -- reproducible incomplete load on apple.com
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 0aa3b73..912345f 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -731,7 +731,11 @@ KJavaAppletContext *KHTMLPart::createJavaContext()
 {
 #ifndef Q_WS_QWS
   if ( !d->m_javaContext ) {
+#ifndef APPLE_CHANGES
       d->m_javaContext = new KJavaAppletContext(d->m_dcopobject);
+#else
+      d->m_javaContext = new KJavaAppletContext(d->m_dcopobject, this);
+#endif
       connect( d->m_javaContext, SIGNAL(showStatus(const QString&)),
                this, SIGNAL(setStatusBarText(const QString&)) );
       connect( d->m_javaContext, SIGNAL(showDocument(const QString&, const QString&)),
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index bf86183..a198ca9 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -196,11 +196,10 @@ ReadOnlyPart *KWQKHTMLPartImpl::createPart(const ChildFrame &child, const KURL &
         }
         
         KWQPluginPart *newPart = new KWQPluginPart;
-        newPart->setWidget(new QWidget([[WebCoreViewFactory sharedFactory]
-            viewForPluginWithURL:childURL
-                     serviceType:child.m_args.serviceType.getNSString()
-                       arguments:paramsArray
-                         baseURL:KURL(d->m_doc->baseURL()).getNSURL()]));
+        newPart->setWidget(new QWidget([_bridge viewForPluginWithURL:childURL
+                                                         serviceType:child.m_args.serviceType.getNSString()
+                                                           arguments:paramsArray
+                                                             baseURL:KURL(d->m_doc->baseURL()).getNSURL()]));
         return newPart;
     } else {
         LOG(Frames, "name %s", child.m_name.ascii());
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index bf86183..a198ca9 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -196,11 +196,10 @@ ReadOnlyPart *KWQKHTMLPartImpl::createPart(const ChildFrame &child, const KURL &
         }
         
         KWQPluginPart *newPart = new KWQPluginPart;
-        newPart->setWidget(new QWidget([[WebCoreViewFactory sharedFactory]
-            viewForPluginWithURL:childURL
-                     serviceType:child.m_args.serviceType.getNSString()
-                       arguments:paramsArray
-                         baseURL:KURL(d->m_doc->baseURL()).getNSURL()]));
+        newPart->setWidget(new QWidget([_bridge viewForPluginWithURL:childURL
+                                                         serviceType:child.m_args.serviceType.getNSString()
+                                                           arguments:paramsArray
+                                                             baseURL:KURL(d->m_doc->baseURL()).getNSURL()]));
         return newPart;
     } else {
         LOG(Frames, "name %s", child.m_name.ascii());
diff --git a/WebCore/kwq/KWQKJavaAppletContext.h b/WebCore/kwq/KWQKJavaAppletContext.h
index b8f7511..a12f02e 100644
--- a/WebCore/kwq/KWQKJavaAppletContext.h
+++ b/WebCore/kwq/KWQKJavaAppletContext.h
@@ -27,6 +27,7 @@
 #define KJAVAAPPLETCONTEXT_H
 
 #include <qobject.h>
+#include "khtml_part.h"
 
 class DCOPObject;
 
@@ -35,7 +36,10 @@ typedef enum { } JType;
 class KJavaAppletContext : public QObject
 {
 public:
-    KJavaAppletContext(DCOPObject* = 0) { }
+    KJavaAppletContext(DCOPObject* = 0, KHTMLPart *p = 0) {m_part = p;}
+    KHTMLPart *part(){ return m_part; };
+private:
+    KHTMLPart *m_part;
 };
 
 #endif
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.h b/WebCore/kwq/KWQKJavaAppletWidget.h
index 9cf16f4..5cb12d8 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.h
+++ b/WebCore/kwq/KWQKJavaAppletWidget.h
@@ -72,6 +72,7 @@ public:
 
 private:
     KJavaApplet m_applet;
+    KJavaAppletContext *m_context;
     NSURL *m_baseURL;
     NSMutableDictionary *m_parameters;
 };
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
index f2db84e..359b764 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -25,14 +25,17 @@
 
 #import <kjavaappletwidget.h>
 
+#import <kjavaappletcontext.h>
 #import <kurl.h>
-#import <WebCoreViewFactory.h>
+#import <KWQKHTMLPartImpl.h>
+#import <WebCoreBridge.h>
 
-KJavaAppletWidget::KJavaAppletWidget(KJavaAppletContext *, QWidget *)
+KJavaAppletWidget::KJavaAppletWidget(KJavaAppletContext *c, QWidget *)
     : m_applet(*this)
     , m_baseURL(nil)
     , m_parameters([[NSMutableDictionary alloc] init])
 {
+    m_context = c;
 }
 
 KJavaAppletWidget::~KJavaAppletWidget()
@@ -65,8 +68,8 @@ void KJavaAppletWidget::processArguments(const QMap<QString, QString> &arguments
 
 void KJavaAppletWidget::showApplet()
 {
-    setView([[WebCoreViewFactory sharedFactory] 
-    	viewForJavaAppletWithFrame:NSMakeRect(pos().x(), pos().y(), size().width(), size().height())
-                           baseURL:m_baseURL
-                        parameters:m_parameters]);
+    setView([m_context->part()->impl->bridge()
+viewForJavaAppletWithFrame:NSMakeRect(pos().x(), pos().y(), size().width(), size().height())
+                   baseURL:m_baseURL
+                parameters:m_parameters]);
 }
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 52e171b..53fb597 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -227,6 +227,9 @@ enum FrameBorderStyle {
 
 - (NSURL *)requestedURL;
 
+- (NSView *)viewForPluginWithURL:(NSURL *)url serviceType:(NSString *)serviceType arguments:(NSArray *)arguments baseURL:(NSURL *)baseURL;
+- (NSView *)viewForJavaAppletWithFrame:(NSRect)frame baseURL:(NSURL *)URL parameters:(NSDictionary *)parameters;
+
 @end
 
 // This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebCore/kwq/WebCoreViewFactory.h b/WebCore/kwq/WebCoreViewFactory.h
index 991cc79..c93216d 100644
--- a/WebCore/kwq/WebCoreViewFactory.h
+++ b/WebCore/kwq/WebCoreViewFactory.h
@@ -32,15 +32,12 @@
 
 @protocol WebCoreViewFactory
 
-- (NSView *)viewForPluginWithURL:(NSURL *)url serviceType:(NSString *)serviceType arguments:(NSArray *)arguments baseURL:(NSURL *)baseURL;
-- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
-
-- (NSView *)viewForJavaAppletWithFrame:(NSRect)frame baseURL:(NSURL *)URL parameters:(NSDictionary *)parameters;
-
 - (NSView <WebCoreFileButton> *)fileButton;
 
 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
 
+- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
+
 @end
 
 @interface WebCoreViewFactory : NSObject
diff --git a/WebCore/kwq/khtml/java/kjavaappletcontext.h b/WebCore/kwq/khtml/java/kjavaappletcontext.h
index b8f7511..a12f02e 100644
--- a/WebCore/kwq/khtml/java/kjavaappletcontext.h
+++ b/WebCore/kwq/khtml/java/kjavaappletcontext.h
@@ -27,6 +27,7 @@
 #define KJAVAAPPLETCONTEXT_H
 
 #include <qobject.h>
+#include "khtml_part.h"
 
 class DCOPObject;
 
@@ -35,7 +36,10 @@ typedef enum { } JType;
 class KJavaAppletContext : public QObject
 {
 public:
-    KJavaAppletContext(DCOPObject* = 0) { }
+    KJavaAppletContext(DCOPObject* = 0, KHTMLPart *p = 0) {m_part = p;}
+    KHTMLPart *part(){ return m_part; };
+private:
+    KHTMLPart *m_part;
 };
 
 #endif
diff --git a/WebCore/kwq/khtml/java/kjavaappletwidget.h b/WebCore/kwq/khtml/java/kjavaappletwidget.h
index 9cf16f4..5cb12d8 100644
--- a/WebCore/kwq/khtml/java/kjavaappletwidget.h
+++ b/WebCore/kwq/khtml/java/kjavaappletwidget.h
@@ -72,6 +72,7 @@ public:
 
 private:
     KJavaApplet m_applet;
+    KJavaAppletContext *m_context;
     NSURL *m_baseURL;
     NSMutableDictionary *m_parameters;
 };
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b7cc098..0b88d87 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-23  Chris Blumenberg  <cblu at apple.com>
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge requestedURL]):
+        (-[WebBridge viewForPluginWithURL:serviceType:arguments:baseURL:]):
+        (-[WebBridge viewForJavaAppletWithFrame:baseURL:parameters:]):
+        * WebCoreSupport.subproj/WebViewFactory.m:
+        (-[WebViewFactory fileButton]):
+        (-[WebViewFactory pluginsInfo]):
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fix bug where plugins crashed closing a stream that was never opened
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b7cc098..0b88d87 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-10-23  Chris Blumenberg  <cblu at apple.com>
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge requestedURL]):
+        (-[WebBridge viewForPluginWithURL:serviceType:arguments:baseURL:]):
+        (-[WebBridge viewForJavaAppletWithFrame:baseURL:parameters:]):
+        * WebCoreSupport.subproj/WebViewFactory.m:
+        (-[WebViewFactory fileButton]):
+        (-[WebViewFactory pluginsInfo]):
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fix bug where plugins crashed closing a stream that was never opened
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 21f1369..c2e5c0c 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -6,6 +6,8 @@
 #import <WebKit/WebBridge.h>
 
 #import <WebKit/WebBackForwardList.h>
+#import <WebKit/WebBaseNetscapePluginView.h>
+#import <WebKit/WebBasePluginPackage.h>
 #import <WebKit/WebControllerPrivate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebFramePrivate.h>
@@ -14,6 +16,11 @@
 #import <WebKit/WebHTMLViewPrivate.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
 #import <WebKit/WebLocationChangeDelegate.h>
+#import <WebKit/WebNetscapePluginEmbeddedView.h>
+#import <WebKit/WebNetscapePluginPackage.h>
+#import <WebKit/WebNullPluginView.h>
+#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPluginPackage.h>
 #import <WebKit/WebPreferences.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebSubresourceClient.h>
@@ -28,6 +35,7 @@
 #import <WebFoundation/WebResourceHandle.h>
 #import <WebFoundation/WebResourceResponse.h>
 
+
 @interface NSApplication (DeclarationStolenFromAppKit)
 - (void)_cycleWindowsReversed:(BOOL)reversed;
 @end
@@ -413,4 +421,81 @@
     return [[[self dataSource] request] URL];
 }
 
+- (NSView *)viewForPluginWithURL:(NSURL *)pluginURL serviceType:(NSString *)serviceType arguments:(NSArray *)args baseURL:(NSURL *)baseURL
+{
+    NSMutableDictionary *arguments;
+    NSString *mimeType, *extension;
+    NSRange r1, r2, r3;
+    WebBasePluginPackage *pluginPackage;
+    uint i;
+
+    arguments = [NSMutableDictionary dictionary];
+    for (i = 0; i < [args count]; i++){
+        NSString *arg = [args objectAtIndex:i];
+        if ([arg rangeOfString:@"__KHTML__"].length == 0) {
+            r1 = [arg rangeOfString:@"="]; // parse out attributes and values
+            r2 = [arg rangeOfString:@"\""];
+            r3.location = r2.location + 1;
+            r3.length = [arg length] - r2.location - 2; // don't include quotes
+            [arguments setObject:[arg substringWithRange:r3] forKey:[arg substringToIndex:r1.location]];
+        }
+    }
+
+    if ([serviceType length]) {
+        mimeType = serviceType;
+        pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:mimeType];
+    } else {
+        extension = [[pluginURL path] pathExtension];
+        pluginPackage = [[WebPluginDatabase installedPlugins] pluginForExtension:extension];
+        mimeType = [[pluginPackage extensionToMIMEDictionary] objectForKey:extension];
+    }
+
+    if (pluginPackage) {
+        if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
+            return nil;
+        }else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
+            return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSMakeRect(0,0,0,0)
+                                                                  plugin:(WebNetscapePluginPackage *)pluginPackage
+                                                                     URL:pluginURL
+                                                                 baseURL:baseURL
+                                                                    mime:mimeType
+                                                               arguments:arguments] autorelease];
+        }else{
+            [NSException raise:NSInternalInconsistencyException
+                        format:@"Plugin package class not recognized"];
+            return nil;
+        }
+    }else{
+        return [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0)
+                                                mimeType:mimeType
+                                               arguments:arguments] autorelease];
+    }
+}
+
+- (NSView *)viewForJavaAppletWithFrame:(NSRect)theFrame baseURL:(NSURL *)baseURL parameters:(NSDictionary *)parameters
+{
+    WebBasePluginPackage *pluginPackage;
+
+    pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:@"application/x-java-applet"];
+
+    if (!pluginPackage) {
+        return nil;
+    }
+
+    if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
+        return nil;
+    }else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
+        return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:theFrame
+                                                              plugin:(WebNetscapePluginPackage *)pluginPackage
+                                                                 URL:nil
+                                                             baseURL:baseURL
+                                                                mime:@"application/x-java-applet"
+                                                           arguments:parameters] autorelease];
+    }else{
+        [NSException raise:NSInternalInconsistencyException
+                    format:@"Plugin package class not recognized"];
+        return nil;
+    }
+}
+
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebViewFactory.m b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
index 1afc3fd..5e28f45 100644
--- a/WebKit/WebCoreSupport.subproj/WebViewFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
@@ -6,20 +6,12 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <WebKit/WebViewFactory.h>
-
-#import <WebKit/WebBaseNetscapePluginView.h>
-#import <WebKit/WebBasePluginPackage.h>
 #import <WebKit/WebFileButton.h>
 #import <WebKit/WebJavaScriptTextInputPanel.h>
-#import <WebKit/WebNetscapePluginEmbeddedView.h>
-#import <WebKit/WebNullPluginView.h>
-#import <WebKit/WebNetscapePluginPackage.h>
 #import <WebKit/WebPluginDatabase.h>
-#import <WebKit/WebPluginPackage.h>
+#import <WebKit/WebViewFactory.h>
 
 #import <WebFoundation/WebAssertions.h>
-#import <WebFoundation/WebNSURLExtras.h>
 
 @implementation WebViewFactory
 
@@ -31,88 +23,6 @@
     ASSERT([[self sharedFactory] isKindOfClass:self]);
 }
 
-- (NSView *)viewForPluginWithURL:(NSURL *)pluginURL serviceType:(NSString *)serviceType arguments:(NSArray *)args baseURL:(NSURL *)baseURL
-{
-    NSMutableDictionary *arguments;
-    NSString *mimeType, *extension;
-    NSRange r1, r2, r3;
-    WebBasePluginPackage *pluginPackage;
-    uint i;
-        
-    arguments = [NSMutableDictionary dictionary];
-    for (i = 0; i < [args count]; i++){
-        NSString *arg = [args objectAtIndex:i];
-        if ([arg rangeOfString:@"__KHTML__"].length == 0) {
-            r1 = [arg rangeOfString:@"="]; // parse out attributes and values
-            r2 = [arg rangeOfString:@"\""];
-            r3.location = r2.location + 1;
-            r3.length = [arg length] - r2.location - 2; // don't include quotes
-            [arguments setObject:[arg substringWithRange:r3] forKey:[arg substringToIndex:r1.location]];
-        }
-    }
-        
-    if ([serviceType length]) {
-        mimeType = serviceType;
-        pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:mimeType];
-    } else {
-        extension = [[pluginURL path] pathExtension];
-        pluginPackage = [[WebPluginDatabase installedPlugins] pluginForExtension:extension];
-        mimeType = [[pluginPackage extensionToMIMEDictionary] objectForKey:extension];
-    }
-    
-    if (pluginPackage) {
-        if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
-            return nil;
-        }else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
-            return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSMakeRect(0,0,0,0)
-                                                                  plugin:(WebNetscapePluginPackage *)pluginPackage
-                                                                     URL:pluginURL
-                                                                 baseURL:baseURL
-                                                                    mime:mimeType
-                                                               arguments:arguments] autorelease];
-        }else{
-            [NSException raise:NSInternalInconsistencyException
-                        format:@"Plugin package class not recognized"];
-            return nil;
-        }
-    }else{
-        return [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0)
-                                                mimeType:mimeType
-                                               arguments:arguments] autorelease];
-    }
-}
-
-- (NSArray *)pluginsInfo
-{
-    return [[WebPluginDatabase installedPlugins] plugins];
-}
-
-- (NSView *)viewForJavaAppletWithFrame:(NSRect)frame baseURL:(NSURL *)baseURL parameters:(NSDictionary *)parameters
-{
-    WebBasePluginPackage *pluginPackage;
-    
-    pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:@"application/x-java-applet"];
-
-    if (!pluginPackage) {
-        return nil;
-    }
-
-    if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
-        return nil;
-    }else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
-        return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:frame
-                                                              plugin:(WebNetscapePluginPackage *)pluginPackage
-                                                                 URL:nil
-                                                             baseURL:baseURL
-                                                                mime:@"application/x-java-applet"
-                                                           arguments:parameters] autorelease];
-    }else{
-        [NSException raise:NSInternalInconsistencyException
-                    format:@"Plugin package class not recognized"];
-        return nil;
-    }
-}
-
 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
 {
     WebJavaScriptTextInputPanel *panel = [[WebJavaScriptTextInputPanel alloc] initWithPrompt:prompt text:defaultText];
@@ -130,4 +40,9 @@
     return [[WebFileButton alloc] init];
 }
 
+- (NSArray *)pluginsInfo
+{
+    return [[WebPluginDatabase installedPlugins] plugins];
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list