diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 20:49:16 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 20:49:16 +0000 |
commit | 74215679409db25951507832685f76080650ca6e (patch) | |
tree | 3f8be6dab13b70bd77c12a715d064e3b9e8d3df7 /webkit/glue | |
parent | 8449c2b2921759f158716605f16168a3110b98a2 (diff) | |
download | chromium_src-74215679409db25951507832685f76080650ca6e.zip chromium_src-74215679409db25951507832685f76080650ca6e.tar.gz chromium_src-74215679409db25951507832685f76080650ca6e.tar.bz2 |
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
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/plugin_list_posix.cc | 16 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 3 |
2 files changed, 18 insertions, 1 deletions
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; } |