navigator.plugins has plugins in it when plugins are disabled
[WebKit-https.git] / Source / WebKit / mac / WebCoreSupport / WebPlatformStrategies.mm
index 64a5a36..ed067ac 100644 (file)
@@ -126,10 +126,14 @@ void WebPlatformStrategies::refreshPlugins()
     [[WebPluginDatabase sharedDatabase] refresh];
 }
 
-void WebPlatformStrategies::getPluginInfo(const Page*, Vector<PluginInfo>& plugins)
+void WebPlatformStrategies::getPluginInfo(const Page* page, Vector<PluginInfo>& plugins)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
 
+    // WebKit1 has no application plug-ins, so we don't need to add them here.
+    if (!page->mainFrame()->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        return;
+
     NSArray* pluginsArray = [[WebPluginDatabase sharedDatabase] plugins];
     for (unsigned int i = 0; i < [pluginsArray count]; ++i) {
         WebPluginPackage *plugin = [pluginsArray objectAtIndex:i];