[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:55:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 465b6c6d7b19cd8642e6672114d23d7ba8a07bb9
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 8 00:21:22 2002 +0000

    - Renamed WebCore plug-in classes to WC*.
    - Created Plugins.subproj in WebKit.
    - Created IFCarbonWindowView.
    - Moved IFPluginView to WebKit.
    
    - Turned off -Werror in WebKit until Macjiej updates the warning problem in NSStringBuffer.h
    
    Modified Files:
    	WebCore/src/kwq/KWQKConfigBase.mm
    	WebCore/src/kwq/KWQKHTMLPart.mm WebCore/src/kwq/Makefile.am
     	WebCore/src/kwq/npapi.h WebCore/src/kwq/npapi.mm
    	WebKit/WebKit.pbproj/project.pbxproj
    Added Files:
    	WebCore/src/kwq/WCPlugin.h WebCore/src/kwq/WCPlugin.mm
    	WebCore/src/kwq/WCPluginDatabase.h
    	WebCore/src/kwq/WCPluginDatabase.mm
    	WebCore/src/kwq/WCPluginWidget.h
    	WebCore/src/kwq/WCPluginWidget.mm
    	WebKit/Plugins.subproj/IFCarbonWindowView.h
    	WebKit/Plugins.subproj/IFCarbonWindowView.m
    	WebKit/Plugins.subproj/IFPluginView.h
    	WebKit/Plugins.subproj/IFPluginView.mm
    Removed Files:
    	WebCore/src/kwq/WKPlugin.h WebCore/src/kwq/WKPlugin.mm
    	WebCore/src/kwq/WKPluginDatabase.h
    	WebCore/src/kwq/WKPluginDatabase.mm
    	WebCore/src/kwq/WKPluginView.h WebCore/src/kwq/WKPluginView.mm
    	WebCore/src/kwq/WKPluginWidget.h
    	WebCore/src/kwq/WKPluginWidget.mm
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/KWQKConfigBase.mm b/WebCore/kwq/KWQKConfigBase.mm
index 05cdbb2..ec289cf 100644
--- a/WebCore/kwq/KWQKConfigBase.mm
+++ b/WebCore/kwq/KWQKConfigBase.mm
@@ -25,8 +25,8 @@
 
 #include <kwqdebug.h>
 #include <kconfig.h>
-#include <WKPlugin.h>
-#include <WKPluginDatabase.h>
+#import <WCPlugin.h>
+#import <WCPluginDatabase.h>
 
 enum files{
     pluginsinfo
@@ -78,13 +78,13 @@ QString KConfigBase::readEntry(const char *pKey,
     _logPartiallyImplemented();
     
     if(file == pluginsinfo){
-        WKPlugin *plugin;
+        WCPlugin *plugin;
         NSArray *mimeTypes;
         NSMutableString *bigMimeString;
         NSString *bigMimeString2;
         uint i;
         
-        plugin = [[[WKPluginDatabase installedPlugins] plugins] objectAtIndex:group];
+        plugin = [[[WCPluginDatabase installedPlugins] plugins] objectAtIndex:group];
         if(strcmp(pKey, "name") == 0){
             return NSSTRING_TO_QSTRING([plugin name]);
         }else if(strcmp(pKey, "file") == 0){
@@ -120,7 +120,7 @@ int KConfigBase::readNumEntry(const char *pKey, int nDefault=0) const
     _logPartiallyImplemented();
     
     if(file == pluginsinfo){
-        return [[[WKPluginDatabase installedPlugins] plugins] count];
+        return [[[WCPluginDatabase installedPlugins] plugins] count];
     }
     return 0;
 }
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 51987ca..9da6795 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -51,7 +51,7 @@
 
 #import <WCURLHandle.h>
 
-#include <WKPluginWidget.h>
+#include <WCPluginWidget.h>
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -1608,12 +1608,12 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
                     const QStringList &args)
 {
 #ifdef _KWQ_
-    WKPluginWidget *pluginWidget;
+    WCPluginWidget *pluginWidget;
     
     if(url.isEmpty()){
         return FALSE;
     }
-    pluginWidget = new WKPluginWidget(0, url, serviceType, args);
+    pluginWidget = new WCPluginWidget(0, url, serviceType, args);
     frame->setWidget(pluginWidget);
 
     return TRUE;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 51987ca..9da6795 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -51,7 +51,7 @@
 
 #import <WCURLHandle.h>
 
-#include <WKPluginWidget.h>
+#include <WCPluginWidget.h>
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -1608,12 +1608,12 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
                     const QStringList &args)
 {
 #ifdef _KWQ_
-    WKPluginWidget *pluginWidget;
+    WCPluginWidget *pluginWidget;
     
     if(url.isEmpty()){
         return FALSE;
     }
-    pluginWidget = new WKPluginWidget(0, url, serviceType, args);
+    pluginWidget = new WCPluginWidget(0, url, serviceType, args);
     frame->setWidget(pluginWidget);
 
     return TRUE;
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index b61e499..75ea1c6 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -125,10 +125,9 @@ libkwq_o_SOURCES = \
 	KWQtextstream.mm \
 	KWQxml.mm \
 	kwqdebug.mm \
-	WKPlugin.mm \
-	WKPluginView.mm \
-	WKPluginDatabase.mm \
-	WKPluginWidget.mm \
+	WCPlugin.mm \
+	WCPluginDatabase.mm \
+	WCPluginWidget.mm \
 	npapi.mm \
 	$(NULL)
 
diff --git a/WebCore/kwq/WCPlugin.h b/WebCore/kwq/WCPlugin.h
new file mode 100644
index 0000000..2d9e7f7
--- /dev/null
+++ b/WebCore/kwq/WCPlugin.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import <Foundation/Foundation.h>
+#include "npapi.h"
+
+ at interface WCPlugin : NSObject {
+
+    NSMutableArray *mimeTypes;
+    NSString *name, *executablePath, *filename, *pluginDescription;
+    BOOL isLoaded;
+    NPPluginFuncs pluginFuncs;
+    NPNetscapeFuncs browserFuncs;
+    uint16 pluginSize;
+    uint16 pluginVersion;
+    NPP_NewProcPtr NPP_New;
+    NPP_DestroyProcPtr NPP_Destroy;
+    NPP_SetWindowProcPtr NPP_SetWindow;
+    NPP_NewStreamProcPtr NPP_NewStream;
+    NPP_DestroyStreamProcPtr NPP_DestroyStream;
+    NPP_StreamAsFileProcPtr NPP_StreamAsFile;
+    NPP_WriteReadyProcPtr NPP_WriteReady;
+    NPP_WriteProcPtr NPP_Write;
+    NPP_PrintProcPtr NPP_Print;
+    NPP_HandleEventProcPtr NPP_HandleEvent;
+    NPP_URLNotifyProcPtr NPP_URLNotify;
+    NPP_GetValueProcPtr NPP_GetValue;
+    NPP_SetValueProcPtr NPP_SetValue;
+    NPP_ShutdownProcPtr NPP_Shutdown; 
+
+}
+
+- (BOOL)initializeWithPath:(NSString *)plugin;
+- (BOOL)getPluginInfoForResourceFile:(SInt16)resRef;
+- (void)load;
+- (void)unload;
+- (NSArray *)mimeTypes;
+- (NSString *)name;
+- (NSString *)filename;
+- (NSString *)executablePath;
+- (BOOL)isLoaded;
+- (NSString *)description;
+- (NSString *)pluginDescription;
+
+
+- (NPP_NewProcPtr)NPP_New;
+- (NPP_DestroyProcPtr)NPP_Destroy;
+- (NPP_SetWindowProcPtr)NPP_SetWindow;
+- (NPP_NewStreamProcPtr)NPP_NewStream;
+- (NPP_WriteReadyProcPtr)NPP_WriteReady;
+- (NPP_WriteProcPtr)NPP_Write;
+- (NPP_StreamAsFileProcPtr)NPP_StreamAsFile;
+- (NPP_DestroyStreamProcPtr)NPP_DestroyStream;
+- (NPP_HandleEventProcPtr)NPP_HandleEvent;
+
+ at end
+
diff --git a/WebCore/src/kwq/WKPlugin.mm b/WebCore/kwq/WCPlugin.mm
similarity index 83%
rename from WebCore/src/kwq/WKPlugin.mm
rename to WebCore/kwq/WCPlugin.mm
index 59ae3b5..55d2d34 100644
--- a/WebCore/src/kwq/WKPlugin.mm
+++ b/WebCore/kwq/WCPlugin.mm
@@ -1,16 +1,33 @@
-//
-//  WKPlugins.m
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
 
-#import "WKPlugin.h"
+#import "WCPlugin.h"
 #include "kwqdebug.h"
 
 
- at implementation WKPlugin
+ at implementation WCPlugin
 
 - (BOOL)initializeWithPath:(NSString *)plugin{
     NSFileManager *fileManager;
@@ -31,12 +48,12 @@
             executablePath = plugin;
             err = FSPathMakeRef((UInt8 *)[plugin cString], &fref, NULL);
             if(err != noErr){
-                KWQDebug("WKPlugin: FSPathMakeRef failed. Error=%d\n", err);
+                KWQDebug("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
                 return FALSE;
             }
             resRef = FSOpenResFile(&fref, fsRdPerm);
             if(resRef <= noErr){
-                KWQDebug("WKPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [plugin cString], err);
+                KWQDebug("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [plugin cString], err);
                 return FALSE;
             }
             if(![self getPluginInfoForResourceFile:resRef]){
@@ -124,17 +141,17 @@
     }
     err = FSPathMakeRef((UInt8 *)[executablePath cString], &fref, NULL);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
         return;
     }
     err = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, &spec, NULL);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
         return;
     }
     err = GetDiskFragment(&spec, 0, kCFragGoesToEOF, nil, kPrivateCFragCopy, &connID, (Ptr *)&pluginMainFunc, nil);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: GetDiskFragment failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
         return;
     }
         NPError npErr;
diff --git a/WebCore/kwq/KWQTextStorage.h b/WebCore/kwq/WCPluginDatabase.h
similarity index 81%
copy from WebCore/kwq/KWQTextStorage.h
copy to WebCore/kwq/WCPluginDatabase.h
index 2632153..a38d9f2 100644
--- a/WebCore/kwq/KWQTextStorage.h
+++ b/WebCore/kwq/WCPluginDatabase.h
@@ -23,17 +23,18 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include <kwqdebug.h>
+#import <Foundation/Foundation.h>
+#import <WCPlugin.h>
 
-
- at interface KWQTextStorage : NSTextStorage
-{
-    NSString *attrString;
-    NSDictionary *attributes;
-    NSLayoutManager *_layoutManager;
+ at interface WCPluginDatabase : NSObject {
+    NSArray *plugins;
 }
 
-+ (void)setString:(NSString *)str attributes:(NSDictionary *)attrs;
-- (void)setString: (NSString *)aString attributes: (NSDictionary *)at;
++ (WCPluginDatabase *)installedPlugins;
+- (WCPlugin *)getPluginForMimeType:(NSString *)mimeType;
+- (WCPlugin *)getPluginForURL:(NSString *)URL;
+- (NSArray *) plugins;
 
 @end
+
+NSArray *findPlugins(void);
\ No newline at end of file
diff --git a/WebCore/kwq/WKPluginDatabase.mm b/WebCore/kwq/WCPluginDatabase.mm
similarity index 58%
rename from WebCore/kwq/WKPluginDatabase.mm
rename to WebCore/kwq/WCPluginDatabase.mm
index 9d3661f..0fbb2fa 100644
--- a/WebCore/kwq/WKPluginDatabase.mm
+++ b/WebCore/kwq/WCPluginDatabase.mm
@@ -1,31 +1,48 @@
- //
-//  WKPluginsDatabase.m
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import "WKPluginDatabase.h"
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "WCPluginDatabase.h"
 #include "kwqdebug.h"
 
- at implementation WKPluginDatabase
-static WKPluginDatabase *__WKPluginDatabase = nil;
+ at implementation WCPluginDatabase
+static WCPluginDatabase *__WCPluginDatabase = nil;
 
 
-+ (WKPluginDatabase *)installedPlugins {
++ (WCPluginDatabase *)installedPlugins {
 
-    if(!__WKPluginDatabase){
-        __WKPluginDatabase  = [WKPluginDatabase alloc];
-        __WKPluginDatabase->plugins = findPlugins();
+    if(!__WCPluginDatabase){
+        __WCPluginDatabase  = [WCPluginDatabase alloc];
+        __WCPluginDatabase->plugins = findPlugins();
     }
-    return __WKPluginDatabase;
+    return __WCPluginDatabase;
 }
 
 // The first plugin with the specified mime type is returned. We may want to tie this to the defaults so that this is configurable.
-- (WKPlugin *)getPluginForMimeType:(NSString *)mimeType{
+- (WCPlugin *)getPluginForMimeType:(NSString *)mimeType{
     uint i, n;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     NSArray *mimeArray;
     
     for(i=0; i<[plugins count]; i++){      
@@ -40,9 +57,9 @@ static WKPluginDatabase *__WKPluginDatabase = nil;
     return nil;
 }
 
-- (WKPlugin *)getPluginForURL:(NSString *)URL{
+- (WCPlugin *)getPluginForURL:(NSString *)URL{
     uint i, n;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     NSArray *mimeArray;
     NSRange hasExtension;
     NSString *extension;
@@ -74,7 +91,7 @@ NSArray *findPlugins(void){
     NSArray *libraryPlugins, *homePlugins;
     NSString *homePluginDir, *libPluginDir;
     NSMutableArray *pluginPaths, *pluginArray;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     uint i;
     
     fileManager = [NSFileManager defaultManager];
@@ -97,7 +114,7 @@ NSArray *findPlugins(void){
     pluginArray = [NSMutableArray arrayWithCapacity:[pluginPaths count]];
     
     for(i=0; i<[pluginPaths count]; i++){
-        plugin = [WKPlugin alloc];
+        plugin = [WCPlugin alloc];
         if([plugin initializeWithPath:[pluginPaths objectAtIndex:i]]){
             [plugin retain];
             [pluginArray addObject:plugin];
diff --git a/WebCore/kwq/WKPluginWidget.h b/WebCore/kwq/WCPluginWidget.h
similarity index 83%
rename from WebCore/kwq/WKPluginWidget.h
rename to WebCore/kwq/WCPluginWidget.h
index 7b7f96f..39ed29c 100644
--- a/WebCore/kwq/WKPluginWidget.h
+++ b/WebCore/kwq/WCPluginWidget.h
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WKPluginWidget_H_
-#define WKPluginWidget_H_
+#ifndef WCPluginWidget_H_
+#define WCPluginWidget_H_
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -32,13 +32,11 @@
 
 #include "qwidget.h"
 #include "qstring.h"
-
-#import <WKPluginView.h>
-#import <WKPlugin.h>
+#import <WCPlugin.h>
     
-// class WKPluginWidget ===============================================================
+// class WCPluginWidget ===============================================================
 
-class WKPluginWidget : public QWidget {
+class WCPluginWidget : public QWidget {
 public:
 
     // typedefs ----------------------------------------------------------------
@@ -48,8 +46,8 @@ public:
     
     // constructors, copy constructors, and destructors ------------------------
 
-    WKPluginWidget(QWidget *parent=0, const QString &url=0, const QString &serviceType=0, const QStringList &args=QStringList());
-    ~WKPluginWidget();
+    WCPluginWidget(QWidget *parent=0, const QString &url=0, const QString &serviceType=0, const QStringList &args=QStringList());
+    ~WCPluginWidget();
 
     // member functions --------------------------------------------------------
     
@@ -59,10 +57,10 @@ public:
 // private ---------------------------------------------------------------------
 
 private:
-    WKPluginWidget(const WKPluginWidget &);
-    WKPluginWidget &operator=(const WKPluginWidget &);
+    WCPluginWidget(const WCPluginWidget &);
+    WCPluginWidget &operator=(const WCPluginWidget &);
     
 
-}; // class WKPluginWidget ============================================================
+}; // class WCPluginWidget ============================================================
 
 #endif
diff --git a/WebCore/kwq/WKPluginWidget.mm b/WebCore/kwq/WCPluginWidget.mm
similarity index 79%
rename from WebCore/kwq/WKPluginWidget.mm
rename to WebCore/kwq/WCPluginWidget.mm
index a61c317..125c165 100644
--- a/WebCore/kwq/WKPluginWidget.mm
+++ b/WebCore/kwq/WCPluginWidget.mm
@@ -22,18 +22,24 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-
-#include <WKPluginWidget.h>
-#include <WKPluginDatabase.h>
-#include <KWQView.h>
+ 
+#import <Foundation/Foundation.h>
+#import <WCPluginWidget.h>
+#import <WCPluginDatabase.h>
+#import <KWQView.h>
 #include <kwqdebug.h>
 
-WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QString &serviceType, const QStringList &args)
+ at interface IFPluginView : NSObject
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
+ at end
+
+
+WCPluginWidget::WCPluginWidget(QWidget *parent, const QString &url, const QString &serviceType, const QStringList &args)
 {
     NSMutableDictionary *arguments;
     NSString *arg;
     NSRange r1, r2, r3;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     uint i;
     
     arguments = [NSMutableDictionary dictionaryWithCapacity:10];
@@ -45,9 +51,9 @@ WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QStrin
         r3.length = [arg length] - r2.location - 2; // don't include quotes
         [arguments setObject:[arg substringWithRange:r3] forKey:[arg substringToIndex:r1.location]];
     }
-    plugin = [[WKPluginDatabase installedPlugins] getPluginForMimeType:QSTRING_TO_NSSTRING(serviceType)];
+    plugin = [[WCPluginDatabase installedPlugins] getPluginForMimeType:QSTRING_TO_NSSTRING(serviceType)];
     if(plugin == nil){
-        plugin = [[WKPluginDatabase installedPlugins] getPluginForURL:QSTRING_TO_NSSTRING(url)];
+        plugin = [[WCPluginDatabase installedPlugins] getPluginForURL:QSTRING_TO_NSSTRING(url)];
     }
     if(plugin == nil){
         //FIXME: Error dialog should be shown here
@@ -55,10 +61,10 @@ WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QStrin
         return;
     }
     [plugin load];
-    setView([[[WKPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0) widget:this plugin:plugin url:QSTRING_TO_NSSTRING(url) mime:QSTRING_TO_NSSTRING(serviceType) arguments:arguments] autorelease]);
+    setView([[[IFPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0) widget:this plugin:plugin url:QSTRING_TO_NSSTRING(url) mime:QSTRING_TO_NSSTRING(serviceType) arguments:arguments] autorelease]);
 }
 
-WKPluginWidget::~WKPluginWidget()
+WCPluginWidget::~WCPluginWidget()
 {
 
 }
diff --git a/WebCore/kwq/WKPlugin.h b/WebCore/kwq/WKPlugin.h
deleted file mode 100644
index 78779cd..0000000
--- a/WebCore/kwq/WKPlugin.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-//  WKPlugins.h
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#include "npapi.h"
-
- at interface WKPlugin : NSObject {
-
-    NSMutableArray *mimeTypes;
-    NSString *name, *executablePath, *filename, *pluginDescription;
-    BOOL isLoaded;
-    NPPluginFuncs pluginFuncs;
-    NPNetscapeFuncs browserFuncs;
-    uint16 pluginSize;
-    uint16 pluginVersion;
-    NPP_NewProcPtr NPP_New;
-    NPP_DestroyProcPtr NPP_Destroy;
-    NPP_SetWindowProcPtr NPP_SetWindow;
-    NPP_NewStreamProcPtr NPP_NewStream;
-    NPP_DestroyStreamProcPtr NPP_DestroyStream;
-    NPP_StreamAsFileProcPtr NPP_StreamAsFile;
-    NPP_WriteReadyProcPtr NPP_WriteReady;
-    NPP_WriteProcPtr NPP_Write;
-    NPP_PrintProcPtr NPP_Print;
-    NPP_HandleEventProcPtr NPP_HandleEvent;
-    NPP_URLNotifyProcPtr NPP_URLNotify;
-    NPP_GetValueProcPtr NPP_GetValue;
-    NPP_SetValueProcPtr NPP_SetValue;
-    NPP_ShutdownProcPtr NPP_Shutdown; 
-
-}
-
-- (BOOL)initializeWithPath:(NSString *)plugin;
-- (BOOL)getPluginInfoForResourceFile:(SInt16)resRef;
-- (void)load;
-- (void)unload;
-- (NSArray *)mimeTypes;
-- (NSString *)name;
-- (NSString *)filename;
-- (NSString *)executablePath;
-- (BOOL)isLoaded;
-- (NSString *)description;
-- (NSString *)pluginDescription;
-
-
-- (NPP_NewProcPtr)NPP_New;
-- (NPP_DestroyProcPtr)NPP_Destroy;
-- (NPP_SetWindowProcPtr)NPP_SetWindow;
-- (NPP_NewStreamProcPtr)NPP_NewStream;
-- (NPP_WriteReadyProcPtr)NPP_WriteReady;
-- (NPP_WriteProcPtr)NPP_Write;
-- (NPP_StreamAsFileProcPtr)NPP_StreamAsFile;
-- (NPP_DestroyStreamProcPtr)NPP_DestroyStream;
-- (NPP_HandleEventProcPtr)NPP_HandleEvent;
-
- at end
-
diff --git a/WebCore/kwq/WKPluginDatabase.h b/WebCore/kwq/WKPluginDatabase.h
deleted file mode 100644
index 77ba266..0000000
--- a/WebCore/kwq/WKPluginDatabase.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-//  WKPluginsDatabase.h
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "WKPlugin.h"
-
- at interface WKPluginDatabase : NSObject {
-
-    NSArray *plugins;
-}
-
-+ (WKPluginDatabase *)installedPlugins;
-- (WKPlugin *)getPluginForMimeType:(NSString *)mimeType;
-- (WKPlugin *)getPluginForURL:(NSString *)URL;
-- (NSArray *) plugins;
-
- at end
-
-NSArray *findPlugins(void);
\ No newline at end of file
diff --git a/WebCore/kwq/npapi.h b/WebCore/kwq/npapi.h
index 2207892..66e3d6a 100644
--- a/WebCore/kwq/npapi.h
+++ b/WebCore/kwq/npapi.h
@@ -1,10 +1,26 @@
 /*
- *  npapi.h
- *  test
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
  *
- *  Created by chris on Tue Nov 20 2001.
- *  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
  
 #ifndef _NPAPI_H_
diff --git a/WebCore/kwq/npapi.mm b/WebCore/kwq/npapi.mm
index b884d5e..c59a3a6 100644
--- a/WebCore/kwq/npapi.mm
+++ b/WebCore/kwq/npapi.mm
@@ -1,7 +1,48 @@
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
 #include "npapi.h"
-#include <WKPluginView.h>
 #include "kwqdebug.h"
 
+ at interface IFPluginView : NSObject
+-(NPError)getURLNotify:(const char *)url target:(const char *)target notifyData:(void *)notifyData;
+-(NPError)getURL:(const char *)url target:(const char *)target;
+-(NPError)postURLNotify:(const char *)url target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file notifyData:(void *)notifyData;
+-(NPError)postURL:(const char *)url target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file;
+-(NPError)newStream:(NPMIMEType)type target:(const char *)target stream:(NPStream**)stream;
+-(NPError)write:(NPStream*)stream len:(SInt32)len buffer:(void *)buffer;
+-(NPError)destroyStream:(NPStream*)stream reason:(NPReason)reason;
+-(void)status:(const char *)message;
+-(NPError)getValue:(NPNVariable)variable value:(void *)value;
+-(NPError)setValue:(NPPVariable)variable value:(void *)value;
+-(void)invalidateRect:(NPRect *)invalidRect;
+-(void)invalidateRegion:(NPRegion)invalidateRegion;
+-(void)forceRedraw;
+ at end
+
+
 // general plug-in to browser functions
 
 const char* NPN_UserAgent(NPP instance){
@@ -38,84 +79,84 @@ NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList){
 // instance-specific functions
 
 NPError NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getURLNotify:url target:target notifyData:notifyData];
 }
 
 NPError NPN_GetURL(NPP instance, const char* url, const char* target){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getURL:url target:target];
 }
 
 NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file, void* notifyData){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin postURLNotify:url target:target len:len buf:buf file:file notifyData:notifyData];
 }
 
 NPError NPN_PostURL(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin postURL:url target:target len:len buf:buf file:file];
 }
 
 NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin newStream:type target:target stream:stream];
 }
 
 SInt32	NPN_Write(NPP instance, NPStream* stream, SInt32 len, void* buffer){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin write:stream len:len buffer:buffer];
 }
 
 NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin destroyStream:stream reason:reason];
 }
 
 void NPN_Status(NPP instance, const char* message){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin status:message];
 }
 
 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getValue:variable value:value];
 }
 
 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin setValue:variable value:value];
 }	
 
 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin invalidateRect:invalidRect];
 }
 
 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin invalidateRegion:invalidRegion];
@@ -123,7 +164,7 @@ void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion){
 }
 
 void NPN_ForceRedraw(NPP instance){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin forceRedraw];
diff --git a/WebCore/src/kwq/KWQKConfigBase.mm b/WebCore/src/kwq/KWQKConfigBase.mm
index 05cdbb2..ec289cf 100644
--- a/WebCore/src/kwq/KWQKConfigBase.mm
+++ b/WebCore/src/kwq/KWQKConfigBase.mm
@@ -25,8 +25,8 @@
 
 #include <kwqdebug.h>
 #include <kconfig.h>
-#include <WKPlugin.h>
-#include <WKPluginDatabase.h>
+#import <WCPlugin.h>
+#import <WCPluginDatabase.h>
 
 enum files{
     pluginsinfo
@@ -78,13 +78,13 @@ QString KConfigBase::readEntry(const char *pKey,
     _logPartiallyImplemented();
     
     if(file == pluginsinfo){
-        WKPlugin *plugin;
+        WCPlugin *plugin;
         NSArray *mimeTypes;
         NSMutableString *bigMimeString;
         NSString *bigMimeString2;
         uint i;
         
-        plugin = [[[WKPluginDatabase installedPlugins] plugins] objectAtIndex:group];
+        plugin = [[[WCPluginDatabase installedPlugins] plugins] objectAtIndex:group];
         if(strcmp(pKey, "name") == 0){
             return NSSTRING_TO_QSTRING([plugin name]);
         }else if(strcmp(pKey, "file") == 0){
@@ -120,7 +120,7 @@ int KConfigBase::readNumEntry(const char *pKey, int nDefault=0) const
     _logPartiallyImplemented();
     
     if(file == pluginsinfo){
-        return [[[WKPluginDatabase installedPlugins] plugins] count];
+        return [[[WCPluginDatabase installedPlugins] plugins] count];
     }
     return 0;
 }
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 51987ca..9da6795 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -51,7 +51,7 @@
 
 #import <WCURLHandle.h>
 
-#include <WKPluginWidget.h>
+#include <WCPluginWidget.h>
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -1608,12 +1608,12 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
                     const QStringList &args)
 {
 #ifdef _KWQ_
-    WKPluginWidget *pluginWidget;
+    WCPluginWidget *pluginWidget;
     
     if(url.isEmpty()){
         return FALSE;
     }
-    pluginWidget = new WKPluginWidget(0, url, serviceType, args);
+    pluginWidget = new WCPluginWidget(0, url, serviceType, args);
     frame->setWidget(pluginWidget);
 
     return TRUE;
diff --git a/WebCore/src/kwq/Makefile.am b/WebCore/src/kwq/Makefile.am
index b61e499..75ea1c6 100644
--- a/WebCore/src/kwq/Makefile.am
+++ b/WebCore/src/kwq/Makefile.am
@@ -125,10 +125,9 @@ libkwq_o_SOURCES = \
 	KWQtextstream.mm \
 	KWQxml.mm \
 	kwqdebug.mm \
-	WKPlugin.mm \
-	WKPluginView.mm \
-	WKPluginDatabase.mm \
-	WKPluginWidget.mm \
+	WCPlugin.mm \
+	WCPluginDatabase.mm \
+	WCPluginWidget.mm \
 	npapi.mm \
 	$(NULL)
 
diff --git a/WebCore/src/kwq/WCPlugin.h b/WebCore/src/kwq/WCPlugin.h
new file mode 100644
index 0000000..2d9e7f7
--- /dev/null
+++ b/WebCore/src/kwq/WCPlugin.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import <Foundation/Foundation.h>
+#include "npapi.h"
+
+ at interface WCPlugin : NSObject {
+
+    NSMutableArray *mimeTypes;
+    NSString *name, *executablePath, *filename, *pluginDescription;
+    BOOL isLoaded;
+    NPPluginFuncs pluginFuncs;
+    NPNetscapeFuncs browserFuncs;
+    uint16 pluginSize;
+    uint16 pluginVersion;
+    NPP_NewProcPtr NPP_New;
+    NPP_DestroyProcPtr NPP_Destroy;
+    NPP_SetWindowProcPtr NPP_SetWindow;
+    NPP_NewStreamProcPtr NPP_NewStream;
+    NPP_DestroyStreamProcPtr NPP_DestroyStream;
+    NPP_StreamAsFileProcPtr NPP_StreamAsFile;
+    NPP_WriteReadyProcPtr NPP_WriteReady;
+    NPP_WriteProcPtr NPP_Write;
+    NPP_PrintProcPtr NPP_Print;
+    NPP_HandleEventProcPtr NPP_HandleEvent;
+    NPP_URLNotifyProcPtr NPP_URLNotify;
+    NPP_GetValueProcPtr NPP_GetValue;
+    NPP_SetValueProcPtr NPP_SetValue;
+    NPP_ShutdownProcPtr NPP_Shutdown; 
+
+}
+
+- (BOOL)initializeWithPath:(NSString *)plugin;
+- (BOOL)getPluginInfoForResourceFile:(SInt16)resRef;
+- (void)load;
+- (void)unload;
+- (NSArray *)mimeTypes;
+- (NSString *)name;
+- (NSString *)filename;
+- (NSString *)executablePath;
+- (BOOL)isLoaded;
+- (NSString *)description;
+- (NSString *)pluginDescription;
+
+
+- (NPP_NewProcPtr)NPP_New;
+- (NPP_DestroyProcPtr)NPP_Destroy;
+- (NPP_SetWindowProcPtr)NPP_SetWindow;
+- (NPP_NewStreamProcPtr)NPP_NewStream;
+- (NPP_WriteReadyProcPtr)NPP_WriteReady;
+- (NPP_WriteProcPtr)NPP_Write;
+- (NPP_StreamAsFileProcPtr)NPP_StreamAsFile;
+- (NPP_DestroyStreamProcPtr)NPP_DestroyStream;
+- (NPP_HandleEventProcPtr)NPP_HandleEvent;
+
+ at end
+
diff --git a/WebCore/kwq/WKPlugin.mm b/WebCore/src/kwq/WCPlugin.mm
similarity index 83%
rename from WebCore/kwq/WKPlugin.mm
rename to WebCore/src/kwq/WCPlugin.mm
index 59ae3b5..55d2d34 100644
--- a/WebCore/kwq/WKPlugin.mm
+++ b/WebCore/src/kwq/WCPlugin.mm
@@ -1,16 +1,33 @@
-//
-//  WKPlugins.m
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
 
-#import "WKPlugin.h"
+#import "WCPlugin.h"
 #include "kwqdebug.h"
 
 
- at implementation WKPlugin
+ at implementation WCPlugin
 
 - (BOOL)initializeWithPath:(NSString *)plugin{
     NSFileManager *fileManager;
@@ -31,12 +48,12 @@
             executablePath = plugin;
             err = FSPathMakeRef((UInt8 *)[plugin cString], &fref, NULL);
             if(err != noErr){
-                KWQDebug("WKPlugin: FSPathMakeRef failed. Error=%d\n", err);
+                KWQDebug("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
                 return FALSE;
             }
             resRef = FSOpenResFile(&fref, fsRdPerm);
             if(resRef <= noErr){
-                KWQDebug("WKPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [plugin cString], err);
+                KWQDebug("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [plugin cString], err);
                 return FALSE;
             }
             if(![self getPluginInfoForResourceFile:resRef]){
@@ -124,17 +141,17 @@
     }
     err = FSPathMakeRef((UInt8 *)[executablePath cString], &fref, NULL);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
         return;
     }
     err = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, &spec, NULL);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
         return;
     }
     err = GetDiskFragment(&spec, 0, kCFragGoesToEOF, nil, kPrivateCFragCopy, &connID, (Ptr *)&pluginMainFunc, nil);
     if(err != noErr){
-        KWQDebug("WKPlugin: load: GetDiskFragment failed. Error=%d\n", err);
+        KWQDebug("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
         return;
     }
         NPError npErr;
diff --git a/WebCore/kwq/KWQTextStorage.h b/WebCore/src/kwq/WCPluginDatabase.h
similarity index 81%
copy from WebCore/kwq/KWQTextStorage.h
copy to WebCore/src/kwq/WCPluginDatabase.h
index 2632153..a38d9f2 100644
--- a/WebCore/kwq/KWQTextStorage.h
+++ b/WebCore/src/kwq/WCPluginDatabase.h
@@ -23,17 +23,18 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include <kwqdebug.h>
+#import <Foundation/Foundation.h>
+#import <WCPlugin.h>
 
-
- at interface KWQTextStorage : NSTextStorage
-{
-    NSString *attrString;
-    NSDictionary *attributes;
-    NSLayoutManager *_layoutManager;
+ at interface WCPluginDatabase : NSObject {
+    NSArray *plugins;
 }
 
-+ (void)setString:(NSString *)str attributes:(NSDictionary *)attrs;
-- (void)setString: (NSString *)aString attributes: (NSDictionary *)at;
++ (WCPluginDatabase *)installedPlugins;
+- (WCPlugin *)getPluginForMimeType:(NSString *)mimeType;
+- (WCPlugin *)getPluginForURL:(NSString *)URL;
+- (NSArray *) plugins;
 
 @end
+
+NSArray *findPlugins(void);
\ No newline at end of file
diff --git a/WebCore/src/kwq/WKPluginDatabase.mm b/WebCore/src/kwq/WCPluginDatabase.mm
similarity index 58%
rename from WebCore/src/kwq/WKPluginDatabase.mm
rename to WebCore/src/kwq/WCPluginDatabase.mm
index 9d3661f..0fbb2fa 100644
--- a/WebCore/src/kwq/WKPluginDatabase.mm
+++ b/WebCore/src/kwq/WCPluginDatabase.mm
@@ -1,31 +1,48 @@
- //
-//  WKPluginsDatabase.m
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import "WKPluginDatabase.h"
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "WCPluginDatabase.h"
 #include "kwqdebug.h"
 
- at implementation WKPluginDatabase
-static WKPluginDatabase *__WKPluginDatabase = nil;
+ at implementation WCPluginDatabase
+static WCPluginDatabase *__WCPluginDatabase = nil;
 
 
-+ (WKPluginDatabase *)installedPlugins {
++ (WCPluginDatabase *)installedPlugins {
 
-    if(!__WKPluginDatabase){
-        __WKPluginDatabase  = [WKPluginDatabase alloc];
-        __WKPluginDatabase->plugins = findPlugins();
+    if(!__WCPluginDatabase){
+        __WCPluginDatabase  = [WCPluginDatabase alloc];
+        __WCPluginDatabase->plugins = findPlugins();
     }
-    return __WKPluginDatabase;
+    return __WCPluginDatabase;
 }
 
 // The first plugin with the specified mime type is returned. We may want to tie this to the defaults so that this is configurable.
-- (WKPlugin *)getPluginForMimeType:(NSString *)mimeType{
+- (WCPlugin *)getPluginForMimeType:(NSString *)mimeType{
     uint i, n;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     NSArray *mimeArray;
     
     for(i=0; i<[plugins count]; i++){      
@@ -40,9 +57,9 @@ static WKPluginDatabase *__WKPluginDatabase = nil;
     return nil;
 }
 
-- (WKPlugin *)getPluginForURL:(NSString *)URL{
+- (WCPlugin *)getPluginForURL:(NSString *)URL{
     uint i, n;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     NSArray *mimeArray;
     NSRange hasExtension;
     NSString *extension;
@@ -74,7 +91,7 @@ NSArray *findPlugins(void){
     NSArray *libraryPlugins, *homePlugins;
     NSString *homePluginDir, *libPluginDir;
     NSMutableArray *pluginPaths, *pluginArray;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     uint i;
     
     fileManager = [NSFileManager defaultManager];
@@ -97,7 +114,7 @@ NSArray *findPlugins(void){
     pluginArray = [NSMutableArray arrayWithCapacity:[pluginPaths count]];
     
     for(i=0; i<[pluginPaths count]; i++){
-        plugin = [WKPlugin alloc];
+        plugin = [WCPlugin alloc];
         if([plugin initializeWithPath:[pluginPaths objectAtIndex:i]]){
             [plugin retain];
             [pluginArray addObject:plugin];
diff --git a/WebCore/src/kwq/WKPluginWidget.h b/WebCore/src/kwq/WCPluginWidget.h
similarity index 83%
rename from WebCore/src/kwq/WKPluginWidget.h
rename to WebCore/src/kwq/WCPluginWidget.h
index 7b7f96f..39ed29c 100644
--- a/WebCore/src/kwq/WKPluginWidget.h
+++ b/WebCore/src/kwq/WCPluginWidget.h
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WKPluginWidget_H_
-#define WKPluginWidget_H_
+#ifndef WCPluginWidget_H_
+#define WCPluginWidget_H_
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -32,13 +32,11 @@
 
 #include "qwidget.h"
 #include "qstring.h"
-
-#import <WKPluginView.h>
-#import <WKPlugin.h>
+#import <WCPlugin.h>
     
-// class WKPluginWidget ===============================================================
+// class WCPluginWidget ===============================================================
 
-class WKPluginWidget : public QWidget {
+class WCPluginWidget : public QWidget {
 public:
 
     // typedefs ----------------------------------------------------------------
@@ -48,8 +46,8 @@ public:
     
     // constructors, copy constructors, and destructors ------------------------
 
-    WKPluginWidget(QWidget *parent=0, const QString &url=0, const QString &serviceType=0, const QStringList &args=QStringList());
-    ~WKPluginWidget();
+    WCPluginWidget(QWidget *parent=0, const QString &url=0, const QString &serviceType=0, const QStringList &args=QStringList());
+    ~WCPluginWidget();
 
     // member functions --------------------------------------------------------
     
@@ -59,10 +57,10 @@ public:
 // private ---------------------------------------------------------------------
 
 private:
-    WKPluginWidget(const WKPluginWidget &);
-    WKPluginWidget &operator=(const WKPluginWidget &);
+    WCPluginWidget(const WCPluginWidget &);
+    WCPluginWidget &operator=(const WCPluginWidget &);
     
 
-}; // class WKPluginWidget ============================================================
+}; // class WCPluginWidget ============================================================
 
 #endif
diff --git a/WebCore/src/kwq/WKPluginWidget.mm b/WebCore/src/kwq/WCPluginWidget.mm
similarity index 79%
rename from WebCore/src/kwq/WKPluginWidget.mm
rename to WebCore/src/kwq/WCPluginWidget.mm
index a61c317..125c165 100644
--- a/WebCore/src/kwq/WKPluginWidget.mm
+++ b/WebCore/src/kwq/WCPluginWidget.mm
@@ -22,18 +22,24 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-
-#include <WKPluginWidget.h>
-#include <WKPluginDatabase.h>
-#include <KWQView.h>
+ 
+#import <Foundation/Foundation.h>
+#import <WCPluginWidget.h>
+#import <WCPluginDatabase.h>
+#import <KWQView.h>
 #include <kwqdebug.h>
 
-WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QString &serviceType, const QStringList &args)
+ at interface IFPluginView : NSObject
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
+ at end
+
+
+WCPluginWidget::WCPluginWidget(QWidget *parent, const QString &url, const QString &serviceType, const QStringList &args)
 {
     NSMutableDictionary *arguments;
     NSString *arg;
     NSRange r1, r2, r3;
-    WKPlugin *plugin;
+    WCPlugin *plugin;
     uint i;
     
     arguments = [NSMutableDictionary dictionaryWithCapacity:10];
@@ -45,9 +51,9 @@ WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QStrin
         r3.length = [arg length] - r2.location - 2; // don't include quotes
         [arguments setObject:[arg substringWithRange:r3] forKey:[arg substringToIndex:r1.location]];
     }
-    plugin = [[WKPluginDatabase installedPlugins] getPluginForMimeType:QSTRING_TO_NSSTRING(serviceType)];
+    plugin = [[WCPluginDatabase installedPlugins] getPluginForMimeType:QSTRING_TO_NSSTRING(serviceType)];
     if(plugin == nil){
-        plugin = [[WKPluginDatabase installedPlugins] getPluginForURL:QSTRING_TO_NSSTRING(url)];
+        plugin = [[WCPluginDatabase installedPlugins] getPluginForURL:QSTRING_TO_NSSTRING(url)];
     }
     if(plugin == nil){
         //FIXME: Error dialog should be shown here
@@ -55,10 +61,10 @@ WKPluginWidget::WKPluginWidget(QWidget *parent, const QString &url, const QStrin
         return;
     }
     [plugin load];
-    setView([[[WKPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0) widget:this plugin:plugin url:QSTRING_TO_NSSTRING(url) mime:QSTRING_TO_NSSTRING(serviceType) arguments:arguments] autorelease]);
+    setView([[[IFPluginView alloc] initWithFrame:NSMakeRect(0,0,0,0) widget:this plugin:plugin url:QSTRING_TO_NSSTRING(url) mime:QSTRING_TO_NSSTRING(serviceType) arguments:arguments] autorelease]);
 }
 
-WKPluginWidget::~WKPluginWidget()
+WCPluginWidget::~WCPluginWidget()
 {
 
 }
diff --git a/WebCore/src/kwq/WKPlugin.h b/WebCore/src/kwq/WKPlugin.h
deleted file mode 100644
index 78779cd..0000000
--- a/WebCore/src/kwq/WKPlugin.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-//  WKPlugins.h
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#include "npapi.h"
-
- at interface WKPlugin : NSObject {
-
-    NSMutableArray *mimeTypes;
-    NSString *name, *executablePath, *filename, *pluginDescription;
-    BOOL isLoaded;
-    NPPluginFuncs pluginFuncs;
-    NPNetscapeFuncs browserFuncs;
-    uint16 pluginSize;
-    uint16 pluginVersion;
-    NPP_NewProcPtr NPP_New;
-    NPP_DestroyProcPtr NPP_Destroy;
-    NPP_SetWindowProcPtr NPP_SetWindow;
-    NPP_NewStreamProcPtr NPP_NewStream;
-    NPP_DestroyStreamProcPtr NPP_DestroyStream;
-    NPP_StreamAsFileProcPtr NPP_StreamAsFile;
-    NPP_WriteReadyProcPtr NPP_WriteReady;
-    NPP_WriteProcPtr NPP_Write;
-    NPP_PrintProcPtr NPP_Print;
-    NPP_HandleEventProcPtr NPP_HandleEvent;
-    NPP_URLNotifyProcPtr NPP_URLNotify;
-    NPP_GetValueProcPtr NPP_GetValue;
-    NPP_SetValueProcPtr NPP_SetValue;
-    NPP_ShutdownProcPtr NPP_Shutdown; 
-
-}
-
-- (BOOL)initializeWithPath:(NSString *)plugin;
-- (BOOL)getPluginInfoForResourceFile:(SInt16)resRef;
-- (void)load;
-- (void)unload;
-- (NSArray *)mimeTypes;
-- (NSString *)name;
-- (NSString *)filename;
-- (NSString *)executablePath;
-- (BOOL)isLoaded;
-- (NSString *)description;
-- (NSString *)pluginDescription;
-
-
-- (NPP_NewProcPtr)NPP_New;
-- (NPP_DestroyProcPtr)NPP_Destroy;
-- (NPP_SetWindowProcPtr)NPP_SetWindow;
-- (NPP_NewStreamProcPtr)NPP_NewStream;
-- (NPP_WriteReadyProcPtr)NPP_WriteReady;
-- (NPP_WriteProcPtr)NPP_Write;
-- (NPP_StreamAsFileProcPtr)NPP_StreamAsFile;
-- (NPP_DestroyStreamProcPtr)NPP_DestroyStream;
-- (NPP_HandleEventProcPtr)NPP_HandleEvent;
-
- at end
-
diff --git a/WebCore/src/kwq/WKPluginDatabase.h b/WebCore/src/kwq/WKPluginDatabase.h
deleted file mode 100644
index 77ba266..0000000
--- a/WebCore/src/kwq/WKPluginDatabase.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-//  WKPluginsDatabase.h
-//  
-//
-//  Created by Chris Blumenberg on Tue Dec 11 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "WKPlugin.h"
-
- at interface WKPluginDatabase : NSObject {
-
-    NSArray *plugins;
-}
-
-+ (WKPluginDatabase *)installedPlugins;
-- (WKPlugin *)getPluginForMimeType:(NSString *)mimeType;
-- (WKPlugin *)getPluginForURL:(NSString *)URL;
-- (NSArray *) plugins;
-
- at end
-
-NSArray *findPlugins(void);
\ No newline at end of file
diff --git a/WebCore/src/kwq/npapi.h b/WebCore/src/kwq/npapi.h
index 2207892..66e3d6a 100644
--- a/WebCore/src/kwq/npapi.h
+++ b/WebCore/src/kwq/npapi.h
@@ -1,10 +1,26 @@
 /*
- *  npapi.h
- *  test
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
  *
- *  Created by chris on Tue Nov 20 2001.
- *  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
  
 #ifndef _NPAPI_H_
diff --git a/WebCore/src/kwq/npapi.mm b/WebCore/src/kwq/npapi.mm
index b884d5e..c59a3a6 100644
--- a/WebCore/src/kwq/npapi.mm
+++ b/WebCore/src/kwq/npapi.mm
@@ -1,7 +1,48 @@
+/*
+ * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
 #include "npapi.h"
-#include <WKPluginView.h>
 #include "kwqdebug.h"
 
+ at interface IFPluginView : NSObject
+-(NPError)getURLNotify:(const char *)url target:(const char *)target notifyData:(void *)notifyData;
+-(NPError)getURL:(const char *)url target:(const char *)target;
+-(NPError)postURLNotify:(const char *)url target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file notifyData:(void *)notifyData;
+-(NPError)postURL:(const char *)url target:(const char *)target len:(UInt32)len buf:(const char *)buf file:(NPBool)file;
+-(NPError)newStream:(NPMIMEType)type target:(const char *)target stream:(NPStream**)stream;
+-(NPError)write:(NPStream*)stream len:(SInt32)len buffer:(void *)buffer;
+-(NPError)destroyStream:(NPStream*)stream reason:(NPReason)reason;
+-(void)status:(const char *)message;
+-(NPError)getValue:(NPNVariable)variable value:(void *)value;
+-(NPError)setValue:(NPPVariable)variable value:(void *)value;
+-(void)invalidateRect:(NPRect *)invalidRect;
+-(void)invalidateRegion:(NPRegion)invalidateRegion;
+-(void)forceRedraw;
+ at end
+
+
 // general plug-in to browser functions
 
 const char* NPN_UserAgent(NPP instance){
@@ -38,84 +79,84 @@ NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList){
 // instance-specific functions
 
 NPError NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getURLNotify:url target:target notifyData:notifyData];
 }
 
 NPError NPN_GetURL(NPP instance, const char* url, const char* target){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getURL:url target:target];
 }
 
 NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file, void* notifyData){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin postURLNotify:url target:target len:len buf:buf file:file notifyData:notifyData];
 }
 
 NPError NPN_PostURL(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin postURL:url target:target len:len buf:buf file:file];
 }
 
 NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin newStream:type target:target stream:stream];
 }
 
 SInt32	NPN_Write(NPP instance, NPStream* stream, SInt32 len, void* buffer){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin write:stream len:len buffer:buffer];
 }
 
 NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin destroyStream:stream reason:reason];
 }
 
 void NPN_Status(NPP instance, const char* message){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin status:message];
 }
 
 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin getValue:variable value:value];
 }
 
 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     return [plugin setValue:variable value:value];
 }	
 
 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin invalidateRect:invalidRect];
 }
 
 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin invalidateRegion:invalidRegion];
@@ -123,7 +164,7 @@ void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion){
 }
 
 void NPN_ForceRedraw(NPP instance){
-    WKPluginView *plugin;
+    IFPluginView *plugin;
     plugin = instance->ndata;
     
     [plugin forceRedraw];
diff --git a/WebKit/Plugins.subproj/IFCarbonWindowView.h b/WebKit/Plugins.subproj/IFCarbonWindowView.h
new file mode 100644
index 0000000..2f7794f
--- /dev/null
+++ b/WebKit/Plugins.subproj/IFCarbonWindowView.h
@@ -0,0 +1,18 @@
+/*	
+    IFCarbonWindowView.h
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
+
+#import <AppKit/NSView.h>
+
+ at interface IFCarbonWindowView : NSView
+{
+ at private
+    void*  _qdPort;
+    void*  _savePort;
+    BOOL   _synchToView;
+}
+
+- (void*) qdPort;
+
+ at end
\ No newline at end of file
diff --git a/WebKit/Plugins.subproj/IFCarbonWindowView.m b/WebKit/Plugins.subproj/IFCarbonWindowView.m
new file mode 100644
index 0000000..a5756d3
--- /dev/null
+++ b/WebKit/Plugins.subproj/IFCarbonWindowView.m
@@ -0,0 +1,207 @@
+/*	
+    IFCarbonWindowView.h
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
+
+#define USE_CARBON 1
+
+#import "IFCarbonWindowView.h"
+#import <Foundation/Foundation.h>
+#import <AppKit/NSWindow.h>
+#import <AppKit/NSGraphicsContext.h>
+#import <AppKit/NSGraphicsContextPrivate.h>
+#import <AppKit/NSWindow_Private.h>
+#import <CoreGraphics/CGSGraphics.h>
+#import <CoreGraphics/CGGraphicsPrivate.h>
+#import <CoreGraphics/CGContext.h>
+#import <CoreGraphics/CGGraphicsPrivate.h>
+#import <CoreGraphics/CGContext.h>
+#import <CoreGraphics/CGGraphicsPrivate.h>
+#import <CoreGraphics/CGContext.h>
+#import <CoreGraphics/CGSWindow.h>
+#import <CarbonCore/MacMemory.h>
+#import <QD/Quickdraw.h>
+#import <QD/QuickdrawPriv.h>	// for QDBindPortToNativeWindow
+
+ at interface NSView(IFCarbonWindowView_Internal)
+- _invalidateGStatesForTree;
+ at end
+
+ at interface IFCarbonWindowView(IFCarbonWindowView_Internal)
+- (void) _lockQuickDrawPort;
+- (void) _unlockQuickDrawPort;
+- (void) _adjustPort;
+ at end
+
+ at implementation IFCarbonWindowView
+
+- (void) dealloc
+{
+    // just in case
+    //
+    [self _unlockQuickDrawPort];
+
+   // if (_qdPort != NULL) {
+   //     DisposePort(_qdPort);
+   // }
+
+    [super dealloc];
+}
+
+// these are called when we need to update the quickdraw port to match
+//
+- (void)setFrameOrigin:(NSPoint)newOrigin
+{
+    _synchToView = YES;
+    [super setFrameOrigin:newOrigin];
+}
+
+- (void)setFrameSize:(NSSize)newSize
+{
+    _synchToView = YES;
+    [super setFrameSize:newSize];
+}
+
+- _invalidateGStatesForTree
+{
+    _synchToView = YES;
+    return [super _invalidateGStatesForTree];
+}
+
+// here is where we setup QuickDraw focus
+
+- (void)lockFocus
+{
+    [super lockFocus];
+    [self _lockQuickDrawPort];
+}
+
+- (void)unlockFocus
+{
+    [super unlockFocus];
+    [self _unlockQuickDrawPort];
+}
+
+- (void*) qdPort
+{
+    return _qdPort;
+}
+
+- (BOOL) isFlipped
+{
+    // so we match QD's version
+    //
+    return YES;
+}
+
+- (BOOL) isOpaque
+{
+    return NO;
+}
+
+ at end
+
+ at implementation IFCarbonWindowView(IFCarbonWindowView_Internal)
+
+- (void) _lockQuickDrawPort
+{
+    // create the port if this is the first time through
+    //
+    if (_qdPort == NULL)
+    {
+        [[self window] _windowRef];
+        
+        _qdPort = GetWindowPort([[self window] _windowRef]);
+        // create a new QuickDraw port
+        //
+        //_qdPort = CreateNewPort();
+
+        // and tell port that it should use windowID for output
+        //
+        //QDBindPortToNativeWindow(_qdPort, (CGSWindowID)[_window windowNumber]);
+
+        // and force a synch
+        //
+        _synchToView = YES;
+    }
+
+    // if we have one now
+    //
+    if (_qdPort != NULL)
+    {
+        // in case we have moved to new window, reattach
+        //
+        //if (QDGetNativeWindowFromPort(_qdPort) != (CGSWindowID)[_window windowNumber]) {
+        //    QDBindPortToNativeWindow(_qdPort, (CGSWindowID)[_window windowNumber]);
+        //}
+ 
+        // now set the port
+        //
+        GetPort((CGrafPtr*)&_savePort);
+        SetPort(_qdPort);
+
+        // adjust port origin and clip
+        //
+        if (_synchToView)
+        {
+            // make sure it is the right size and location
+            //
+            [self _adjustPort];
+
+            // no longer need to synchronize
+            //
+            _synchToView = NO;
+        }
+    }
+}
+
+- (void) _unlockQuickDrawPort
+{
+    // just restore it if we have one
+    //
+    if (_savePort != NULL)
+    {
+        // restore saved port
+        //
+        SetPort((CGrafPtr)_savePort);
+    }
+}
+
+- (void) _adjustPort
+{
+    CGSRegionObj windowShape;
+    CGRect       windowRect;
+    CGSWindowID  windowID = (CGSWindowID) [_window windowNumber];
+    NSRect       portRect, bounds, visibleBounds;
+
+    // don't try anything if window is no more
+    //
+    if ((int)windowID <= 0 || _qdPort == NULL)
+        return;
+
+    // get window bounds in CGS coordinates
+    //
+    (void) CGSGetWindowShape([[NSGraphicsContext currentContext] contextID], windowID, &windowShape);
+    (void) CGSGetRegionBounds(windowShape, &windowRect);
+
+    // get bounds for drawing. this bounds will have a lower left origin
+    //
+    bounds        = [self bounds];
+    visibleBounds = [self visibleRect];
+    portRect      = [self convertRect:visibleBounds toView:nil];
+
+    // flip the vertical location
+    //
+    portRect.origin.y = windowRect.size.height - NSMaxY(portRect);
+
+    MovePortTo ((int)NSMinX(portRect),  (int)NSMinY(portRect));
+    PortSize   ((int)NSWidth(portRect), (int)NSHeight(portRect));
+
+    // adjust port origin to account for scrolling. we don't need to invert
+    // coordinates since this is already a flipped view
+    //
+    SetOrigin((int)floor(NSMinX(visibleBounds)), (int)floor(NSMinY(visibleBounds)));
+}
+
+ at end
+
diff --git a/WebCore/kwq/WKPluginView.h b/WebKit/Plugins.subproj/IFPluginView.h
similarity index 85%
rename from WebCore/kwq/WKPluginView.h
rename to WebKit/Plugins.subproj/IFPluginView.h
index 1ceeace..94888f7 100644
--- a/WebCore/kwq/WKPluginView.h
+++ b/WebKit/Plugins.subproj/IFPluginView.h
@@ -1,20 +1,19 @@
-//
-//  WKPluginView.h
-//  
-//
-//  Created by Chris Blumenberg on Thu Dec 13 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
+/*	
+    IFPluginView.h
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
 
 #import <AppKit/AppKit.h>
+#import <IFCarbonWindowView.h>
+#import <WCPlugin.h>
 #include <qwidget.h>
-#import <WKPlugin.h>
-#include "npapi.h"
+#include <npapi.h>
 #include <WCURLHandle.h>
 
+
 typedef NPStream* NPS;
 
- at interface WKPluginViewNullEventSender : NSObject{
+ at interface IFPluginViewNullEventSender : NSObject{
     NPP instance;
     NPP_HandleEventProcPtr NPP_HandleEvent;
 }
@@ -24,10 +23,10 @@ typedef NPStream* NPS;
 -(void)stop;
 @end
 
- at interface WKPluginView : NSQuickDrawView {
+ at interface IFPluginView : IFCarbonWindowView {
     QWidget *widget;
-    WKPlugin *plugin;
-    WKPluginViewNullEventSender *eventSender;
+    WCPlugin *plugin;
+    IFPluginViewNullEventSender *eventSender;
     
     NPP instance;
     NPP_t instanceStruct;
@@ -61,9 +60,9 @@ typedef NPStream* NPS;
     NPP_ShutdownProcPtr NPP_Shutdown; 
 }
 
-- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
 -(void)drawRect:(NSRect)rect;
--(void) setWindow:(NSRect)rect;
+-(void)setWindow:(NSRect)rect;
 -(BOOL)acceptsFirstResponder;
 -(BOOL)becomeFirstResponder;
 -(BOOL)resignFirstResponder;
@@ -95,4 +94,4 @@ typedef NPStream* NPS;
 
 @end
 
-NSString* rootName(void);
+NSString* startupVolumeName(void);
diff --git a/WebCore/kwq/WKPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
similarity index 95%
rename from WebCore/kwq/WKPluginView.mm
rename to WebKit/Plugins.subproj/IFPluginView.mm
index 95d96ff..d01e80f 100644
--- a/WebCore/kwq/WKPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -1,19 +1,13 @@
-//
-//  WKPluginView.m
-//  
-//
-//  Created by Chris Blumenberg on Thu Dec 13 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import "WKPluginView.h"
+/*	
+    IFPluginView.mm
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
+
+#import "IFPluginView.h"
 #include <Carbon/Carbon.h> 
 #include "kwqdebug.h"
 
-//#define USE_CARBON 1
-//#import <AppKit/NSWindow_Private.h>
-
- at implementation WKPluginViewNullEventSender
+ at implementation IFPluginViewNullEventSender
 
 -(id)initializeWithNPP:(NPP)pluginInstance functionPointer:(NPP_HandleEventProcPtr)HandleEventFunction;
 {
@@ -33,7 +27,7 @@
     event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
     acceptedEvent = NPP_HandleEvent(instance, &event);
     //KWQDebug("NPP_HandleEvent(nullEvent): %d  when: %u\n", acceptedEvent, event.when);
-    [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+    [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.01];
 }
 
 -(void) stop
@@ -43,9 +37,9 @@
 
 @end
 
- at implementation WKPluginView
+ at implementation IFPluginView
 
-- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mimeType  arguments:(NSDictionary *)arguments
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mimeType  arguments:(NSDictionary *)arguments
 {
     NPError npErr;
     char cMime[200], *s;
@@ -102,7 +96,7 @@
     }
     transferred = FALSE;
     trackingTag = [self addTrackingRect:r owner:self userData:nil assumeInside:NO];
-    eventSender = [[[WKPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent] autorelease];
+    eventSender = [[[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent] autorelease];
     [eventSender sendNullEvents];
     return self;
 }
@@ -112,10 +106,6 @@
     NPError npErr;
     char cMime[200], cURL[800];
     NSFileManager *fileManager;
-    //WindowRef windowRef;
-    
-    //windowRef = [[self window] _windowRef]; // give the window a WindowRef
-    //windowRef->port = [self qdPort];
     
     //MoveTo(0,0); // diagnol line test
     //LineTo((short)rect.size.width, (short)rect.size.height);
@@ -212,7 +202,7 @@
     streamOffset = 0;
     if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
         [file closeFile];
-        strcpy(filenameC, [rootName() cString]);
+        strcpy(filenameC, [startupVolumeName() cString]);
         strcat(filenameC, ":symroots:"); //FIXME: This should be the user's cache directory or somewhere else
         strcat(filenameC, [[url lastPathComponent] cString]);
         NPP_StreamAsFile(instance, stream, filenameC);
@@ -304,7 +294,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -324,7 +314,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -344,7 +334,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -501,7 +491,7 @@
 
 @end
 
-NSString* rootName(void)
+NSString* startupVolumeName(void)
 {
     NSString* rootName = nil;
     FSRef rootRef;
diff --git a/WebCore/src/kwq/WKPluginView.h b/WebKit/Plugins.subproj/WebPluginView.h
similarity index 85%
rename from WebCore/src/kwq/WKPluginView.h
rename to WebKit/Plugins.subproj/WebPluginView.h
index 1ceeace..94888f7 100644
--- a/WebCore/src/kwq/WKPluginView.h
+++ b/WebKit/Plugins.subproj/WebPluginView.h
@@ -1,20 +1,19 @@
-//
-//  WKPluginView.h
-//  
-//
-//  Created by Chris Blumenberg on Thu Dec 13 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
+/*	
+    IFPluginView.h
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
 
 #import <AppKit/AppKit.h>
+#import <IFCarbonWindowView.h>
+#import <WCPlugin.h>
 #include <qwidget.h>
-#import <WKPlugin.h>
-#include "npapi.h"
+#include <npapi.h>
 #include <WCURLHandle.h>
 
+
 typedef NPStream* NPS;
 
- at interface WKPluginViewNullEventSender : NSObject{
+ at interface IFPluginViewNullEventSender : NSObject{
     NPP instance;
     NPP_HandleEventProcPtr NPP_HandleEvent;
 }
@@ -24,10 +23,10 @@ typedef NPStream* NPS;
 -(void)stop;
 @end
 
- at interface WKPluginView : NSQuickDrawView {
+ at interface IFPluginView : IFCarbonWindowView {
     QWidget *widget;
-    WKPlugin *plugin;
-    WKPluginViewNullEventSender *eventSender;
+    WCPlugin *plugin;
+    IFPluginViewNullEventSender *eventSender;
     
     NPP instance;
     NPP_t instanceStruct;
@@ -61,9 +60,9 @@ typedef NPStream* NPS;
     NPP_ShutdownProcPtr NPP_Shutdown; 
 }
 
-- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mime arguments:(NSDictionary *)arguments;
 -(void)drawRect:(NSRect)rect;
--(void) setWindow:(NSRect)rect;
+-(void)setWindow:(NSRect)rect;
 -(BOOL)acceptsFirstResponder;
 -(BOOL)becomeFirstResponder;
 -(BOOL)resignFirstResponder;
@@ -95,4 +94,4 @@ typedef NPStream* NPS;
 
 @end
 
-NSString* rootName(void);
+NSString* startupVolumeName(void);
diff --git a/WebCore/src/kwq/WKPluginView.mm b/WebKit/Plugins.subproj/WebPluginView.m
similarity index 95%
rename from WebCore/src/kwq/WKPluginView.mm
rename to WebKit/Plugins.subproj/WebPluginView.m
index 95d96ff..d01e80f 100644
--- a/WebCore/src/kwq/WKPluginView.mm
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -1,19 +1,13 @@
-//
-//  WKPluginView.m
-//  
-//
-//  Created by Chris Blumenberg on Thu Dec 13 2001.
-//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
-//
-
-#import "WKPluginView.h"
+/*	
+    IFPluginView.mm
+	Copyright 2002, Apple, Inc. All rights reserved.
+*/
+
+#import "IFPluginView.h"
 #include <Carbon/Carbon.h> 
 #include "kwqdebug.h"
 
-//#define USE_CARBON 1
-//#import <AppKit/NSWindow_Private.h>
-
- at implementation WKPluginViewNullEventSender
+ at implementation IFPluginViewNullEventSender
 
 -(id)initializeWithNPP:(NPP)pluginInstance functionPointer:(NPP_HandleEventProcPtr)HandleEventFunction;
 {
@@ -33,7 +27,7 @@
     event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
     acceptedEvent = NPP_HandleEvent(instance, &event);
     //KWQDebug("NPP_HandleEvent(nullEvent): %d  when: %u\n", acceptedEvent, event.when);
-    [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.1];
+    [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.01];
 }
 
 -(void) stop
@@ -43,9 +37,9 @@
 
 @end
 
- at implementation WKPluginView
+ at implementation IFPluginView
 
-- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WKPlugin *)plug url: (NSString *)location mime:(NSString *)mimeType  arguments:(NSDictionary *)arguments
+- initWithFrame: (NSRect) r widget: (QWidget *)w plugin: (WCPlugin *)plug url: (NSString *)location mime:(NSString *)mimeType  arguments:(NSDictionary *)arguments
 {
     NPError npErr;
     char cMime[200], *s;
@@ -102,7 +96,7 @@
     }
     transferred = FALSE;
     trackingTag = [self addTrackingRect:r owner:self userData:nil assumeInside:NO];
-    eventSender = [[[WKPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent] autorelease];
+    eventSender = [[[IFPluginViewNullEventSender alloc] initializeWithNPP:instance functionPointer:NPP_HandleEvent] autorelease];
     [eventSender sendNullEvents];
     return self;
 }
@@ -112,10 +106,6 @@
     NPError npErr;
     char cMime[200], cURL[800];
     NSFileManager *fileManager;
-    //WindowRef windowRef;
-    
-    //windowRef = [[self window] _windowRef]; // give the window a WindowRef
-    //windowRef->port = [self qdPort];
     
     //MoveTo(0,0); // diagnol line test
     //LineTo((short)rect.size.width, (short)rect.size.height);
@@ -212,7 +202,7 @@
     streamOffset = 0;
     if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
         [file closeFile];
-        strcpy(filenameC, [rootName() cString]);
+        strcpy(filenameC, [startupVolumeName() cString]);
         strcat(filenameC, ":symroots:"); //FIXME: This should be the user's cache directory or somewhere else
         strcat(filenameC, [[url lastPathComponent] cString]);
         NPP_StreamAsFile(instance, stream, filenameC);
@@ -304,7 +294,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -324,7 +314,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -344,7 +334,7 @@
     NSPoint viewPoint;
     NSRect frame;
     
-    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:[[theEvent window] contentView]];
+    viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
     frame = [self frame];
     
     pt.v = (short)viewPoint.y; 
@@ -501,7 +491,7 @@
 
 @end
 
-NSString* rootName(void)
+NSString* startupVolumeName(void)
 {
     NSString* rootName = nil;
     FSRef rootRef;
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 2d2d238..5c29dc3 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -83,6 +83,7 @@
 				9C7CABBB0190A37C0ECA16EA,
 				254DC334016E1D3F0ECA149E,
 				25A8176801B5474B0ECA149E,
+				F5EBC45202134BB601CA1520,
 				089C1665FE841158C02AAC07,
 				0867D69AFE84028FC02AAC07,
 				034768DFFF38A50411DB9C8B,
@@ -122,7 +123,7 @@
 				HEADER_SEARCH_PATHS = ../WebCore/include;
 				INSTALL_PATH = "";
 				LIBRARY_SEARCH_PATHS = "";
-				OTHER_CFLAGS = "-Wall -Werror -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -DHAVE_CONFIG_H -DQT_NO_DATASTREAM -D_KWQ_  -I.. -I../WebCore/src/kdelibs/khtml -I../WebCore/src/kwq -I../WebCore/src/kwq/kparts -I../WebCore/include -I../WebCore/include/private";
+				OTHER_CFLAGS = "-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -DHAVE_CONFIG_H -DQT_NO_DATASTREAM -D_KWQ_  -I.. -I../WebCore/src/kdelibs/khtml -I../WebCore/src/kwq -I../WebCore/src/kwq/kparts -I../WebCore/include -I../WebCore/include/private -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ -F/System/Library/Frameworks/CoreServices.framework/Frameworks/";
 				OTHER_LDFLAGS = "-lwebcore -framework WebFoundation";
 				PRODUCT_NAME = WebKit;
 				SECTORDER_FLAGS = "";
@@ -187,6 +188,8 @@
 				39446096020F50ED0ECA1767,
 				39446097020F50ED0ECA1767,
 				39446098020F50ED0ECA1767,
+				F5EBC45702134BC301CA1520,
+				F5EBC45802134BC301CA1520,
 			);
 			isa = PBXHeadersBuildPhase;
 			name = Headers;
@@ -217,6 +220,8 @@
 				394460A8020F50ED0ECA1767,
 				394460A9020F50ED0ECA1767,
 				394460AA020F50ED0ECA1767,
+				F5EBC45902134BC301CA1520,
+				F5EBC45A02134BC301CA1520,
 			);
 			isa = PBXSourcesBuildPhase;
 			name = Sources;
@@ -225,6 +230,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				1058C7B3FEA5585E11CA2CBB,
+				F5EBC45C02134C0C01CA1520,
 			);
 			isa = PBXFrameworksBuildPhase;
 			name = "Frameworks & Libraries";
@@ -307,6 +313,7 @@
 			children = (
 				0867D69BFE84028FC02AAC07,
 				0867D6A5FE840307C02AAC07,
+				F5EBC45B02134C0C01CA1520,
 			);
 			isa = PBXGroup;
 			name = "Other Frameworks";
@@ -936,6 +943,87 @@
 			name = WebView;
 			refType = 4;
 		};
+//9C0
+//9C1
+//9C2
+//9C3
+//9C4
+//F50
+//F51
+//F52
+//F53
+//F54
+		F5EBC45202134BB601CA1520 = {
+			children = (
+				F5EBC45302134BC301CA1520,
+				F5EBC45402134BC301CA1520,
+				F5EBC45502134BC301CA1520,
+				F5EBC45602134BC301CA1520,
+			);
+			isa = PBXGroup;
+			name = Plugins;
+			refType = 4;
+		};
+		F5EBC45302134BC301CA1520 = {
+			isa = PBXFileReference;
+			name = IFCarbonWindowView.h;
+			path = Plugins.subproj/IFCarbonWindowView.h;
+			refType = 4;
+		};
+		F5EBC45402134BC301CA1520 = {
+			isa = PBXFileReference;
+			name = IFCarbonWindowView.m;
+			path = Plugins.subproj/IFCarbonWindowView.m;
+			refType = 4;
+		};
+		F5EBC45502134BC301CA1520 = {
+			isa = PBXFileReference;
+			name = IFPluginView.h;
+			path = Plugins.subproj/IFPluginView.h;
+			refType = 4;
+		};
+		F5EBC45602134BC301CA1520 = {
+			isa = PBXFileReference;
+			name = IFPluginView.mm;
+			path = Plugins.subproj/IFPluginView.mm;
+			refType = 4;
+		};
+		F5EBC45702134BC301CA1520 = {
+			fileRef = F5EBC45302134BC301CA1520;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5EBC45802134BC301CA1520 = {
+			fileRef = F5EBC45502134BC301CA1520;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5EBC45902134BC301CA1520 = {
+			fileRef = F5EBC45402134BC301CA1520;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5EBC45A02134BC301CA1520 = {
+			fileRef = F5EBC45602134BC301CA1520;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F5EBC45B02134C0C01CA1520 = {
+			isa = PBXFrameworkReference;
+			name = Carbon.framework;
+			path = /System/Library/Frameworks/Carbon.framework;
+			refType = 0;
+		};
+		F5EBC45C02134C0C01CA1520 = {
+			fileRef = F5EBC45B02134C0C01CA1520;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 	};
 	rootObject = 0867D690FE84028FC02AAC07;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list