Title: [241933] trunk/Source/WebKit
Revision
241933
Author
[email protected]
Date
2019-02-21 23:02:05 -0800 (Thu, 21 Feb 2019)

Log Message

[GTK] Epiphany searching for plugins even if plugins are disabled
https://bugs.webkit.org/show_bug.cgi?id=194352

Reviewed by Michael Catanzaro.

Check pluginsEnabled setting before trying to get plugins from UI process.

* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::populatePluginCache):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (241932 => 241933)


--- trunk/Source/WebKit/ChangeLog	2019-02-22 06:46:37 UTC (rev 241932)
+++ trunk/Source/WebKit/ChangeLog	2019-02-22 07:02:05 UTC (rev 241933)
@@ -1,3 +1,15 @@
+2019-02-21  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Epiphany searching for plugins even if plugins are disabled
+        https://bugs.webkit.org/show_bug.cgi?id=194352
+
+        Reviewed by Michael Catanzaro.
+
+        Check pluginsEnabled setting before trying to get plugins from UI process.
+
+        * WebProcess/Plugins/WebPluginInfoProvider.cpp:
+        (WebKit::WebPluginInfoProvider::populatePluginCache):
+
 2019-02-21  Darin Adler  <[email protected]>
 
         Some refinements for Node and Document

Modified: trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp (241932 => 241933)


--- trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp	2019-02-22 06:46:37 UTC (rev 241932)
+++ trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp	2019-02-22 07:02:05 UTC (rev 241933)
@@ -36,6 +36,7 @@
 #include <WebCore/FrameLoader.h>
 #include <WebCore/Page.h>
 #include <WebCore/SchemeRegistry.h>
+#include <WebCore/Settings.h>
 #include <WebCore/SubframeLoader.h>
 #include <wtf/text/StringHash.h>
 
@@ -146,12 +147,19 @@
 void WebPluginInfoProvider::populatePluginCache(const WebCore::Page& page)
 {
     if (!m_pluginCacheIsPopulated) {
-        HangDetectionDisabler hangDetectionDisabler;
+#if PLATFORM(COCOA)
+        // Application plugins are not affected by enablePlugins setting, so we always need to scan plugins to get them.
+        bool shouldScanPlugins = true;
+#else
+        bool shouldScanPlugins = page.mainFrame().loader().subframeLoader().allowPlugins();
+#endif
+        if (shouldScanPlugins) {
+            HangDetectionDisabler hangDetectionDisabler;
+            if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins),
+                Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0))
+                return;
+        }
 
-        if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins),
-            Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0))
-            return;
-
         m_shouldRefreshPlugins = false;
         m_pluginCacheIsPopulated = true;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to