rpms/qt/F-12 qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch, NONE, 1.1 qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch, NONE, 1.1 .cvsignore, 1.65, 1.66 qt.spec, 1.364, 1.365

Rex Dieter rdieter at fedoraproject.org
Fri Jun 18 15:57:12 UTC 2010


Author: rdieter

Update of /cvs/pkgs/rpms/qt/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv18492

Modified Files:
	.cvsignore qt.spec 
Added Files:
	qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch 
	qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch 
Log Message:
* Fri Jun 18 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.6.3-4
- QtWebKit does not search correct plugin path(s) (#568860)
- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567)


qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch:
 PluginPackageQt.cpp |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

--- NEW FILE qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch ---
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init	2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp	2010-06-18 10:11:20.738800727 -0500
@@ -35,6 +35,8 @@
 
 namespace WebCore {
 
+typedef void gtkInitFunc(int *argc, char ***argv);
+
 bool PluginPackage::fetchInfo()
 {
     if (!load())
@@ -110,6 +112,8 @@ 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 +131,25 @@ 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

qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch:
 PluginDatabase.cpp |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch ---
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath	2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp	2010-06-18 10:02:37.004788646 -0500
@@ -345,6 +345,7 @@ Vector<String> PluginDatabase::defaultPl
     paths.append("/usr/lib/firefox/plugins");
     paths.append("/usr/lib64/browser-plugins");
     paths.append("/usr/lib/browser-plugins");
+    paths.append("/usr/lib/mozilla/plugins-wrapped");
     paths.append("/usr/lib/mozilla/plugins");
     paths.append("/usr/local/netscape/plugins");
     paths.append("/opt/mozilla/plugins");
@@ -355,6 +356,7 @@ Vector<String> PluginDatabase::defaultPl
     paths.append("/usr/lib/netscape/plugins-libc5");
     paths.append("/usr/lib/netscape/plugins-libc6");
     paths.append("/usr/lib64/netscape/plugins");
+    paths.append("/usr/lib64/mozilla/plugins-wrapped");
     paths.append("/usr/lib64/mozilla/plugins");
     paths.append("/usr/lib/nsbrowser/plugins");
     paths.append("/usr/lib64/nsbrowser/plugins");


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/qt/F-12/.cvsignore,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -p -r1.65 -r1.66
--- .cvsignore	15 Feb 2010 16:34:34 -0000	1.65
+++ .cvsignore	18 Jun 2010 15:57:11 -0000	1.66
@@ -8,3 +8,4 @@ hi32-phonon-gstreamer.png
 hi48-phonon-gstreamer.png
 hi64-phonon-gstreamer.png
 qt-everywhere-opensource-src-4.6.2.tar.gz
+qt-everywhere-opensource-src-4.6.3.tar.gz


Index: qt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qt/F-12/qt.spec,v
retrieving revision 1.364
retrieving revision 1.365
diff -u -p -r1.364 -r1.365
--- qt.spec	15 Jun 2010 15:42:06 -0000	1.364
+++ qt.spec	18 Jun 2010 15:57:12 -0000	1.365
@@ -13,7 +13,7 @@ Summary: Qt toolkit
 Name:    qt
 Epoch:   1
 Version: 4.6.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
 License: LGPLv2 with exceptions or GPLv3 with exceptions
@@ -62,8 +62,12 @@ Patch55: qt-everywhere-opensource-src-4.
 Patch56: qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch
 # fix type cast issue on sparc64
 Patch57: qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch
+# qtwebkit to search nspluginwrapper paths too
+Patch58: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch
 
-# security patches
+# upstream or security patches
+# https://bugs.webkit.org/show_bug.cgi?id=40567
+Patch100: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch
 Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch
 Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch
 Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch
@@ -435,6 +439,10 @@ Qt libraries used for drawing widgets an
 %patch55 -p1 -b .cups-1
 %patch56 -p1 -b .typecast_s390x
 %patch57 -p1 -b .typecast_sparc64
+%patch58 -p1 -b .qtwebkit_pluginpath
+
+# upstream patches
+%patch100 -p1 -b .qtwebkit_gtk_init
 
 # security fixes
 %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft
@@ -1054,6 +1062,10 @@ fi
 
 
 %changelog
+* Fri Jun 18 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.6.3-4
+- QtWebKit does not search correct plugin path(s) (#568860)
+- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567)
+
 * Tue Jun 15 2010 Jaroslav Reznik <jreznik at redhat.com> - 4.6.3-3
 - WebKit security update:
   CVE-2010-1119, CVE-2010-1400, CVE-2010-1778



More information about the scm-commits mailing list