From 74215679409db25951507832685f76080650ca6e Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Mon, 15 Mar 2010 20:49:16 +0000 Subject: linux: hackily blacklist acrobat The Acrobat plugin relies on an Xt-based mainloop, which we don't yet support. It would be nice to skip loading of any plugin that needs this, but at the point we've started asking the plugin which sort of mainloop it wants, we've already committed to using the plugin to display the page, and we can't back out at that point. So instead let's just do a hacky blacklist it for now since it's driving users mad. BUG=19587,38229 TEST=install acrobat, click on a PDF; chrome should download it rather than trying (and failing) to display it inline Review URL: http://codereview.chromium.org/1009001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41627 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/plugin_list_posix.cc | 16 ++++++++++++++++ webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'webkit/glue') diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/glue/plugins/plugin_list_posix.cc index 9c29998..fdfe7f5 100644 --- a/webkit/glue/plugins/plugin_list_posix.cc +++ b/webkit/glue/plugins/plugin_list_posix.cc @@ -43,6 +43,15 @@ bool IsUndesirablePlugin(const WebPluginInfo& info) { filename.find("npwrapper") != std::string::npos); // nspluginwrapper } +// Return true if we shouldn't load a plugin at all. +// This is an ugly hack to blacklist Adobe Acrobat due to not supporting +// its Xt-based mainloop. +// http://code.google.com/p/chromium/issues/detail?id=38229 +bool IsBlacklistedPlugin(const WebPluginInfo& info) { + std::string filename = info.path.BaseName().value(); + return filename.find("nppdf.so") != std::string::npos; +} + } // anonymous namespace namespace NPAPI { @@ -183,6 +192,13 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, LOG(ERROR) << "Considering " << info.path.value() << " (" << info.name << ")"; } + + if (IsBlacklistedPlugin(info)) { + if (DebugPluginLoading()) + LOG(ERROR) << "Skipping blacklisted plugin " << info.path.value(); + return false; + } + if (IsUndesirablePlugin(info)) { if (DebugPluginLoading()) LOG(ERROR) << info.path.value() << " is undesirable."; diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 081b54b..6c267e9 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -121,7 +121,8 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() { int xembed = 0; NPError err = instance_->NPP_GetValue(NPPVpluginNeedsXEmbed, &xembed); if (err != NPERR_NO_ERROR || !xembed) { - NOTIMPLEMENTED() << " windowed plugin but without xembed."; + NOTIMPLEMENTED() << " windowed plugin but without xembed. " + "See http://code.google.com/p/chromium/issues/detail?id=38229"; return false; } -- cgit v1.1