Blame webkitgtk-2.13.2-disable-npapi-in-wayland.patch

Michael Catanzaro 85a1bbb
From 5e55ce4e097ed1bb76dd9fc8ae221c3765383e94 Mon Sep 17 00:00:00 2001
Michael Catanzaro 85a1bbb
From: Michael Catanzaro <mcatanzaro@igalia.com>
Michael Catanzaro 85a1bbb
Date: Tue, 28 Jun 2016 10:36:40 -0500
Michael Catanzaro 85a1bbb
Subject: [PATCH] wayland: disable windowless NPAPI plugins
Michael Catanzaro 85a1bbb
Michael Catanzaro 85a1bbb
They are seriously broken. We will not enable these in Fedora until the
Michael Catanzaro 85a1bbb
upstream bug is fixed. The only known plugin this affects is the
Michael Catanzaro 85a1bbb
gnome-shell browser plugin, which we don't want to support anyway due to
Michael Catanzaro 85a1bbb
the huge number crash reports.
Michael Catanzaro 85a1bbb
---
Michael Catanzaro 85a1bbb
 Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp | 6 ++++++
Michael Catanzaro 85a1bbb
 Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp  | 2 ++
Michael Catanzaro 85a1bbb
 2 files changed, 8 insertions(+)
Michael Catanzaro 85a1bbb
Michael Catanzaro 85a1bbb
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
Michael Catanzaro 85a1bbb
index 4ba4ac6..4a59d66 100644
Michael Catanzaro 85a1bbb
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
Michael Catanzaro 85a1bbb
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
Michael Catanzaro 85a1bbb
@@ -1621,6 +1621,12 @@ void webkit_settings_set_enable_plugins(WebKitSettings* settings, gboolean enabl
Michael Catanzaro 85a1bbb
 {
Michael Catanzaro 85a1bbb
     g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
Michael Catanzaro 85a1bbb
 
Michael Catanzaro 85a1bbb
+#if PLATFORM(WAYLAND)
Michael Catanzaro 85a1bbb
+    // https://bugs.webkit.org/show_bug.cgi?id=158697
Michael Catanzaro 85a1bbb
+    if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland)
Michael Catanzaro 85a1bbb
+        return;
Michael Catanzaro 85a1bbb
+#endif
Michael Catanzaro 85a1bbb
+
Michael Catanzaro 85a1bbb
     WebKitSettingsPrivate* priv = settings->priv;
Michael Catanzaro 85a1bbb
     bool currentValue = priv->preferences->pluginsEnabled();
Michael Catanzaro 85a1bbb
     if (currentValue == enabled)
Michael Catanzaro 85a1bbb
diff --git a/Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp b/Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp
Michael Catanzaro 85a1bbb
index ae14e9e..ed932b1 100644
Michael Catanzaro 85a1bbb
--- a/Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp
Michael Catanzaro 85a1bbb
+++ b/Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp
Michael Catanzaro 85a1bbb
@@ -39,6 +39,8 @@ void WebPreferences::platformInitializeStore()
Michael Catanzaro 85a1bbb
         // FIXME: Accelerated compositing under Wayland is not yet supported.
Michael Catanzaro 85a1bbb
         // https://bugs.webkit.org/show_bug.cgi?id=115803
Michael Catanzaro 85a1bbb
         setAcceleratedCompositingEnabled(false);
Michael Catanzaro 85a1bbb
+        // https://bugs.webkit.org/show_bug.cgi?id=158697
Michael Catanzaro 85a1bbb
+        setPluginsEnabled(false);
Michael Catanzaro 85a1bbb
     }
Michael Catanzaro 85a1bbb
 #endif
Michael Catanzaro 85a1bbb
 #if USE(COORDINATED_GRAPHICS_THREADED)
Michael Catanzaro 85a1bbb
-- 
Michael Catanzaro 85a1bbb
2.7.4
Michael Catanzaro 85a1bbb