summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins/gtk
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/plugins/gtk
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/plugins/gtk')
-rw-r--r--WebCore/plugins/gtk/PluginPackageGtk.cpp47
-rw-r--r--WebCore/plugins/gtk/PluginViewGtk.cpp5
-rw-r--r--WebCore/plugins/gtk/gtk2xtbin.c3
-rw-r--r--WebCore/plugins/gtk/gtk2xtbin.h2
4 files changed, 17 insertions, 40 deletions
diff --git a/WebCore/plugins/gtk/PluginPackageGtk.cpp b/WebCore/plugins/gtk/PluginPackageGtk.cpp
index 5a097b2..997583e 100644
--- a/WebCore/plugins/gtk/PluginPackageGtk.cpp
+++ b/WebCore/plugins/gtk/PluginPackageGtk.cpp
@@ -80,48 +80,21 @@ static PlatformModuleVersion getModuleVersion(const char *description)
return version;
}
-void PluginPackage::determineQuirks(const String& mimeType)
-{
- if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
- // Because a single process cannot create multiple VMs, and we cannot reliably unload a
- // Java VM, we cannot unload the Java plugin, or we'll lose reference to our only VM
- m_quirks.add(PluginQuirkDontUnloadPlugin);
-
- // Setting the window region to an empty region causes bad scrolling repaint problems
- // with the Java plug-in.
- m_quirks.add(PluginQuirkDontClipToZeroRectWhenScrolling);
- return;
- }
-
- if (mimeType == "application/x-shockwave-flash") {
- static const PlatformModuleVersion flashTenVersion(0x0a000000);
-
- if (compareFileVersion(flashTenVersion) >= 0) {
- // Flash 10.0 b218 doesn't like having a NULL window handle
- m_quirks.add(PluginQuirkDontSetNullWindowHandleOnDestroy);
- } else {
- // Flash 9 and older requests windowless plugins if we return a mozilla user agent
- m_quirks.add(PluginQuirkWantsMozillaUserAgent);
- }
-
- m_quirks.add(PluginQuirkThrottleInvalidate);
- m_quirks.add(PluginQuirkThrottleWMUserPlusOneMessages);
- m_quirks.add(PluginQuirkFlashURLNotifyBug);
- }
-}
-
bool PluginPackage::fetchInfo()
{
#if defined(XP_UNIX)
if (!load())
return false;
- NP_GetMIMEDescriptionFuncPtr NP_GetMIMEDescription;
- NPP_GetValueProcPtr NPP_GetValue;
+ NP_GetMIMEDescriptionFuncPtr NP_GetMIMEDescription = 0;
+ NPP_GetValueProcPtr NPP_GetValue = 0;
g_module_symbol(m_module, "NP_GetMIMEDescription", (void**)&NP_GetMIMEDescription);
g_module_symbol(m_module, "NP_GetValue", (void**)&NPP_GetValue);
+ if (!NP_GetMIMEDescription || !NPP_GetValue)
+ return false;
+
char* buffer = 0;
NPError err = NPP_GetValue(0, NPPVpluginNameString, &buffer);
if (err == NPERR_NO_ERROR)
@@ -131,7 +104,7 @@ bool PluginPackage::fetchInfo()
err = NPP_GetValue(0, NPPVpluginDescriptionString, &buffer);
if (err == NPERR_NO_ERROR) {
m_description = buffer;
- m_moduleVersion = getModuleVersion(buffer);
+ determineModuleVersionFromDescription();
}
const gchar* types = NP_GetMIMEDescription();
@@ -182,7 +155,9 @@ bool PluginPackage::load()
m_isLoaded = true;
- NP_InitializeFuncPtr NP_Initialize;
+ NP_InitializeFuncPtr NP_Initialize = 0;
+ m_NPP_Shutdown = 0;
+
NPError npErr;
g_module_symbol(m_module, "NP_Initialize", (void**)&NP_Initialize);
@@ -194,8 +169,10 @@ bool PluginPackage::load()
memset(&m_pluginFuncs, 0, sizeof(m_pluginFuncs));
m_pluginFuncs.size = sizeof(m_pluginFuncs);
+ memset(&m_browserFuncs, 0, sizeof(m_browserFuncs));
m_browserFuncs.size = sizeof (m_browserFuncs);
m_browserFuncs.version = NP_VERSION_MINOR;
+
m_browserFuncs.geturl = NPN_GetURL;
m_browserFuncs.posturl = NPN_PostURL;
m_browserFuncs.requestread = NPN_RequestRead;
@@ -219,6 +196,7 @@ bool PluginPackage::load()
m_browserFuncs.getJavaPeer = NPN_GetJavaPeer;
m_browserFuncs.pushpopupsenabledstate = NPN_PushPopupsEnabledState;
m_browserFuncs.poppopupsenabledstate = NPN_PopPopupsEnabledState;
+ m_browserFuncs.pluginthreadasynccall = NPN_PluginThreadAsyncCall;
m_browserFuncs.releasevariantvalue = _NPN_ReleaseVariantValue;
m_browserFuncs.getstringidentifier = _NPN_GetStringIdentifier;
@@ -226,6 +204,7 @@ bool PluginPackage::load()
m_browserFuncs.getintidentifier = _NPN_GetIntIdentifier;
m_browserFuncs.identifierisstring = _NPN_IdentifierIsString;
m_browserFuncs.utf8fromidentifier = _NPN_UTF8FromIdentifier;
+ m_browserFuncs.intfromidentifier = _NPN_IntFromIdentifier;
m_browserFuncs.createobject = _NPN_CreateObject;
m_browserFuncs.retainobject = _NPN_RetainObject;
m_browserFuncs.releaseobject = _NPN_ReleaseObject;
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 904e935..2b93e56 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -82,7 +82,7 @@ namespace WebCore {
using namespace HTMLNames;
-void PluginView::updatePluginWidget() const
+void PluginView::updatePluginWidget()
{
if (!parent() || !m_isWindowed)
return;
@@ -140,8 +140,7 @@ void PluginView::hide()
void PluginView::paint(GraphicsContext* context, const IntRect& rect)
{
if (!m_isStarted) {
- // Draw the "missing plugin" image
- //paintMissingPluginIcon(context, rect);
+ paintMissingPluginIcon(context, rect);
return;
}
diff --git a/WebCore/plugins/gtk/gtk2xtbin.c b/WebCore/plugins/gtk/gtk2xtbin.c
index 4247345..8d52aa2 100644
--- a/WebCore/plugins/gtk/gtk2xtbin.c
+++ b/WebCore/plugins/gtk/gtk2xtbin.c
@@ -46,8 +46,7 @@
#include "xembed.h"
#include "gtk2xtbin.h"
-#include <gtk/gtkmain.h>
-#include <gtk/gtkprivate.h>
+#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glib.h>
#include <assert.h>
diff --git a/WebCore/plugins/gtk/gtk2xtbin.h b/WebCore/plugins/gtk/gtk2xtbin.h
index 2a2b92c..7bcfab6 100644
--- a/WebCore/plugins/gtk/gtk2xtbin.h
+++ b/WebCore/plugins/gtk/gtk2xtbin.h
@@ -40,7 +40,7 @@
#ifndef __GTK_XTBIN_H__
#define __GTK_XTBIN_H__
-#include <gtk/gtksocket.h>
+#include <gtk/gtk.h>
#include <X11/Intrinsic.h>
#include <X11/Xutil.h>
#include <X11/Xlib.h>