diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-17 10:26:02 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-17 10:26:02 (GMT) |
commit | 24605a8cd542b44e6ed2bb6dbb7fe12633015853 (patch) | |
tree | 3fad1db27ceb52dc79cc49aa528404e33c43be6b /src/3rdparty/webkit/WebCore/plugins/qt | |
parent | efc8b0c9c97a84097bc7f62a109e455caa8b2279 (diff) | |
download | Qt-24605a8cd542b44e6ed2bb6dbb7fe12633015853.zip Qt-24605a8cd542b44e6ed2bb6dbb7fe12633015853.tar.gz Qt-24605a8cd542b44e6ed2bb6dbb7fe12633015853.tar.bz2 |
Updated WebKit to 6623b5da196390748dc619461739f9cb84524736
Integrated changes:
|| <https://webkit.org/b/38401> || Make repaint throttling parameters configurable runtime. ||
|| <https://webkit.org/b/40073> || [Qt] rendering error in mediawiki ||
|| <https://webkit.org/b/36463> || Spatial Navigation: make it work with focusable elements in overflow content ||
|| <https://webkit.org/b/39857> || GIFs loop one time too few ||
|| <https://webkit.org/b/36818> || [Qt] Animated GIF images does not animate 10x as expected by default. ||
|| <https://webkit.org/b/37844> || [Qt] Image::drawTiled animations does not work ||
|| <https://webkit.org/b/40567> || [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64... ||
|| <https://webkit.org/b/39439> || Spatial Navigation: using offset{Left,Top} is not enough to get the proper inner frames position ||
|| <https://webkit.org/b/39195> || Spatial Navigation: refactor scrollInDirection to work with scrollable content ||
Diffstat (limited to 'src/3rdparty/webkit/WebCore/plugins/qt')
-rw-r--r-- | src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp index 74deaf6..d5292fe 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp @@ -35,6 +35,8 @@ namespace WebCore { +typedef void gtkInitFunc(int *argc, char ***argv); + bool PluginPackage::fetchInfo() { if (!load()) @@ -109,6 +111,7 @@ bool PluginPackage::load() NP_InitializeFuncPtr NP_Initialize; NPError npErr; + gtkInitFunc* gtkInit; NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize"); m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown"); @@ -127,6 +130,26 @@ bool PluginPackage::load() m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue; } + // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by + // explicitly forcing the initializing of Gtk, i.e. calling gtk_init, + // whenver the symbol is present in the plugin library loaded above. + // Note that this workaround is based on code from the NSPluginClass ctor + // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file. + gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init"); + if (gtkInit) { + // Prevent gtk_init() from replacing the X error handlers, since the Gtk + // handlers abort when they receive an X error, thus killing the viewer. +#ifdef Q_WS_X11 + int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0); + int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0); +#endif + gtkInit(0, 0); +#ifdef Q_WS_X11 + XSetErrorHandler(old_error_handler); + XSetIOErrorHandler(old_io_error_handler); +#endif + } + #if defined(XP_UNIX) npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs); #else |