[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:56:15 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit dde8512f47151250dfd2992e8d08ddf6caeafae5
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 26 02:01:39 2002 +0000

    Added support for multiple plug-ins per page
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 560a46a..a65bed1 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -51,6 +51,8 @@
 
 #import <WCURLHandle.h>
 
+#import <WCPluginWidget.h>
+
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -299,7 +301,6 @@ KHTMLPart::KHTMLPart(const KURL &url )
 void KHTMLPart::init()
 {
     d = new KHTMLPartPrivate(this);
-    pluginWidget = NULL;
 }
 
 
@@ -1737,9 +1738,13 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
     if(url.isEmpty()){
         return FALSE;
     }
-    if(pluginWidget == NULL){
-        pluginWidget = new WCPluginWidget(0, url, serviceType, args);
+    // requestObject can be called multiple times for a single plug-in.
+    // The plugins array is an attempt to avoid multiple creations of the same plug-in.
+    // FIXME: Can't have multiple plug-ins with the same URL on a page
+    if(!plugins.contains(url)){
+        WCPluginWidget *pluginWidget = new WCPluginWidget(0, url, serviceType, args);
         frame->setWidget(pluginWidget);
+        plugins.append(url);
     }
     return TRUE;
 #else
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 560a46a..a65bed1 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -51,6 +51,8 @@
 
 #import <WCURLHandle.h>
 
+#import <WCPluginWidget.h>
+
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -299,7 +301,6 @@ KHTMLPart::KHTMLPart(const KURL &url )
 void KHTMLPart::init()
 {
     d = new KHTMLPartPrivate(this);
-    pluginWidget = NULL;
 }
 
 
@@ -1737,9 +1738,13 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
     if(url.isEmpty()){
         return FALSE;
     }
-    if(pluginWidget == NULL){
-        pluginWidget = new WCPluginWidget(0, url, serviceType, args);
+    // requestObject can be called multiple times for a single plug-in.
+    // The plugins array is an attempt to avoid multiple creations of the same plug-in.
+    // FIXME: Can't have multiple plug-ins with the same URL on a page
+    if(!plugins.contains(url)){
+        WCPluginWidget *pluginWidget = new WCPluginWidget(0, url, serviceType, args);
         frame->setWidget(pluginWidget);
+        plugins.append(url);
     }
     return TRUE;
 #else
diff --git a/WebCore/src/kwq/KWQKHTMLPart.h b/WebCore/src/kwq/KWQKHTMLPart.h
index 9da67ae..46c9105 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.h
+++ b/WebCore/src/kwq/KWQKHTMLPart.h
@@ -39,7 +39,6 @@
 
 #if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
 #import <WCURICacheData.h>
-#include <WCPluginWidget.h>
 #endif
 
 class KHTMLSettings;
@@ -615,7 +614,7 @@ private:
 #ifdef _KWQ_
 #if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
     IFWebDataSource *dataSource;
-    WCPluginWidget *pluginWidget;
+    QValueList<QString> plugins;
 #else    
     void *dataSource;
 #endif
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 560a46a..a65bed1 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -51,6 +51,8 @@
 
 #import <WCURLHandle.h>
 
+#import <WCPluginWidget.h>
+
 #include <rendering/render_frames.h>
 
 #import <KWQView.h>
@@ -299,7 +301,6 @@ KHTMLPart::KHTMLPart(const KURL &url )
 void KHTMLPart::init()
 {
     d = new KHTMLPartPrivate(this);
-    pluginWidget = NULL;
 }
 
 
@@ -1737,9 +1738,13 @@ bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, con
     if(url.isEmpty()){
         return FALSE;
     }
-    if(pluginWidget == NULL){
-        pluginWidget = new WCPluginWidget(0, url, serviceType, args);
+    // requestObject can be called multiple times for a single plug-in.
+    // The plugins array is an attempt to avoid multiple creations of the same plug-in.
+    // FIXME: Can't have multiple plug-ins with the same URL on a page
+    if(!plugins.contains(url)){
+        WCPluginWidget *pluginWidget = new WCPluginWidget(0, url, serviceType, args);
         frame->setWidget(pluginWidget);
+        plugins.append(url);
     }
     return TRUE;
 #else

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list