diff -r c0088c242dab -r 21aea6bec3cb mozilla-prefer_plugin_pref.patch --- a/mozilla-prefer_plugin_pref.patch Tue Jun 26 23:24:29 2012 +0200 +++ b/mozilla-prefer_plugin_pref.patch Mon Jul 16 09:49:33 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 -@@ -1581,19 +1581,47 @@ nsPluginHost::FindPluginForType(const ch +@@ -1561,17 +1561,45 @@ nsPluginHost::FindPluginForType(const ch bool aCheckEnabled) { if (!aMimeType) { @@ -20,15 +20,13 @@ + nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar); + preferredPluginPath = (char*) pluginPath.get(); + - InfallibleTArray matchingPlugins; - nsPluginTag *plugin = mPlugins; + + if(preferredPluginPath) { + while (nsnull != plugin) { + if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) || + 0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) { -+ matchingPlugins.AppendElement(plugin); ++ return plugin; + } + plugin = plugin->mNext; + } @@ -38,7 +36,7 @@ + while (nsnull != plugin) { + if (nsnull != PL_strstr(plugin->mFileName.get(), preferredPluginPath) || + nsnull != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) { -+ matchingPlugins.AppendElement(plugin); ++ return plugin; + } + plugin = plugin->mNext; + } @@ -49,6 +47,6 @@ PRInt32 mimeCount = plugin->mMimeTypes.Length(); for (PRInt32 i = 0; i < mimeCount; i++) { if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) { - matchingPlugins.AppendElement(plugin); - break; + return plugin; } + }