mozilla-prefer_plugin_pref.patch
branchfirefox13
changeset 489 f5ef195f348b
parent 367 3fabd9f66322
--- a/mozilla-prefer_plugin_pref.patch	Fri Jun 15 14:40:44 2012 +0200
+++ b/mozilla-prefer_plugin_pref.patch	Mon Jun 25 11:08:07 2012 +0200
@@ -4,7 +4,7 @@
 diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
 --- a/dom/plugins/base/nsPluginHost.cpp
 +++ b/dom/plugins/base/nsPluginHost.cpp
-@@ -1580,17 +1580,48 @@ nsPluginHost::FindPluginForType(const ch
+@@ -1642,19 +1642,51 @@ nsPluginHost::FindPluginForType(const ch
                                  bool aCheckEnabled)
  {
    if (!aMimeType) {
@@ -24,12 +24,15 @@
 +
 +  if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL;
 +
+   InfallibleTArray<nsPluginTag*> matchingPlugins;
+ 
    nsPluginTag *plugin = mPlugins;
++
 +  if(preferredPluginPath) {
 +    while (nsnull != plugin) {
 +      if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) ||
 +          0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) {
-+        return plugin;
++        matchingPlugins.AppendElement(plugin);
 +      }
 +      plugin = plugin->mNext;
 +    }
@@ -39,7 +42,7 @@
 +    while (nsnull != plugin) {
 +      if (nsnull != PL_strstr(plugin->mFileName.get(), preferredPluginPath) ||
 +          nsnull != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) {
-+        return plugin;
++        matchingPlugins.AppendElement(plugin);
 +      }
 +      plugin = plugin->mNext;
 +    }
@@ -50,6 +53,6 @@
        PRInt32 mimeCount = plugin->mMimeTypes.Length();
        for (PRInt32 i = 0; i < mimeCount; i++) {
          if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) {
-           return plugin;
+           matchingPlugins.AppendElement(plugin);
+           break;
          }
-       }