mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-28 00:07:28 +00:00
Backing out fix to bug 163568 to fix bug 169991, r=darin, sr=bzbarsky, a=dbaron
This commit is contained in:
parent
49a4d65249
commit
2751ea016b
@ -140,7 +140,6 @@
|
||||
#include "nsIWebBrowserChromeFocus.h"
|
||||
|
||||
#include "nsPluginError.h"
|
||||
#include "nsIURL.h"
|
||||
|
||||
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
@ -4456,26 +4455,6 @@ nsDocShell::NewContentViewerObj(const char *aContentType,
|
||||
nsCOMPtr<nsIPluginHost> pluginHost (do_GetService(kPluginManagerCID));
|
||||
nsCOMPtr<nsIChannel> aOpenedChannel = do_QueryInterface(request);
|
||||
|
||||
// check plugins to see if there is an override mime type for this extension
|
||||
if (pluginHost &&
|
||||
NS_FAILED(pluginHost->IsPluginEnabledForType(aContentType))) {
|
||||
// get the extension from the url which we get from the channel
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (NS_SUCCEEDED(aOpenedChannel->GetURI(getter_AddRefs(uri)))) {
|
||||
nsCOMPtr<nsIURL> url = do_QueryInterface(uri);
|
||||
if (url) {
|
||||
nsCAutoString fileExtension;
|
||||
url->GetFileExtension(fileExtension);
|
||||
if (!fileExtension.IsEmpty()) {
|
||||
// ask the plugin host for a mime type for this extension
|
||||
const char* pluginMimeType;
|
||||
if (NS_SUCCEEDED(pluginHost->IsPluginEnabledForExtension(fileExtension.get(), pluginMimeType)))
|
||||
aContentType = pluginMimeType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//XXX This should probably be some category thing....
|
||||
nsCAutoString contractId(NS_DOCUMENT_LOADER_FACTORY_CONTRACTID_PREFIX
|
||||
"view"
|
||||
|
Loading…
x
Reference in New Issue
Block a user