summaryrefslogtreecommitdiff
path: root/Source/WebCore/plugins
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
commitb1e9e47fa11f608ae16bc07f97a2acf95bf80272 (patch)
treec88c45e80c9c44506e7cdf9a3bb39ebf82a8cd5b /Source/WebCore/plugins
parentbe01689f43cf6882cf670d33df49ead1f570c53a (diff)
downloadqtwebkit-b1e9e47fa11f608ae16bc07f97a2acf95bf80272.tar.gz
Imported WebKit commit 499c84c99aa98e9870fa7eaa57db476c6d160d46 (http://svn.webkit.org/repository/webkit/trunk@119200)
Weekly update :). Particularly relevant changes for Qt are the use of the WebCore image decoders and direct usage of libpng/libjpeg if available in the system.
Diffstat (limited to 'Source/WebCore/plugins')
-rw-r--r--Source/WebCore/plugins/gtk/PluginPackageGtk.cpp15
-rw-r--r--Source/WebCore/plugins/gtk/PluginViewGtk.cpp15
-rw-r--r--Source/WebCore/plugins/qt/PluginPackageQt.cpp2
-rw-r--r--Source/WebCore/plugins/qt/PluginViewQt.cpp2
4 files changed, 16 insertions, 18 deletions
diff --git a/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp b/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp
index 93abd320a..6c0d0b349 100644
--- a/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp
+++ b/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp
@@ -119,6 +119,16 @@ static int webkitgtkXError(Display* xdisplay, XErrorEvent* error)
}
#endif
+static bool moduleMixesGtkSymbols(GModule* module)
+{
+ void* symbol;
+#ifdef GTK_API_VERSION_2
+ return g_module_symbol(module, "gtk_application_get_type", &symbol);
+#else
+ return g_module_symbol(module, "gtk_object_get_type", &symbol);
+#endif
+}
+
bool PluginPackage::load()
{
if (m_isLoaded) {
@@ -150,6 +160,11 @@ bool PluginPackage::load()
return false;
}
+ if (moduleMixesGtkSymbols(m_module)) {
+ LOG(Plugins, "Ignoring module '%s' to avoid mixing GTK+ 2 and GTK+ 3 symbols.\n", m_path.utf8().data());
+ return false;
+ }
+
m_isLoaded = true;
#if defined(XP_UNIX)
diff --git a/Source/WebCore/plugins/gtk/PluginViewGtk.cpp b/Source/WebCore/plugins/gtk/PluginViewGtk.cpp
index d8c742914..93bd3db03 100644
--- a/Source/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/Source/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -834,26 +834,11 @@ void PluginView::plugAddedCallback(GtkSocket* socket, PluginView* view)
view->updateWidgetAllocationAndClip();
}
-static bool moduleMixesGtkSymbols(GModule* module)
-{
- gpointer symbol;
-#ifdef GTK_API_VERSION_2
- return g_module_symbol(module, "gtk_application_get_type", &symbol);
-#else
- return g_module_symbol(module, "gtk_object_get_type", &symbol);
-#endif
-}
-
bool PluginView::platformStart()
{
ASSERT(m_isStarted);
ASSERT(m_status == PluginStatusLoadedSuccessfully);
- if (moduleMixesGtkSymbols(m_plugin->module())) {
- LOG(Plugins, "Module '%s' mixes GTK+ 2 and GTK+ 3 symbols, ignoring plugin.\n", m_plugin->path().utf8().data());
- return false;
- }
-
#if defined(XP_UNIX)
if (m_plugin->pluginFuncs()->getvalue) {
PluginView::setCurrentPluginView(this);
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
index b9824fae0..fbac529ac 100644
--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp
+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
@@ -132,7 +132,7 @@ static void initializeGtk(QLibrary* module = 0)
bool PluginPackage::isPluginBlacklisted()
{
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#if HAVE(QT5)
// TODO: enumerate all plugins that are incompatible with Qt5.
const QLatin1String pluginBlacklist[] = {
QLatin1String("skypebuttons")
diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp
index 323c55156..eda0504c2 100644
--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp
@@ -79,8 +79,6 @@
#include <runtime/JSLock.h>
#include <runtime/JSValue.h>
-#define HAVE_QT5 (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-
#if HAVE(QT5)
#include "QtX11ImageConversion.h"
#include <QGuiApplication>