diff --git a/docshell/base/nsWebNavigationInfo.cpp b/docshell/base/nsWebNavigationInfo.cpp index 9b7aa55dbe..0eb4f49070 100644 --- a/docshell/base/nsWebNavigationInfo.cpp +++ b/docshell/base/nsWebNavigationInfo.cpp @@ -44,13 +44,6 @@ nsWebNavigationInfo::IsTypeSupported(const nsACString& aType, // to say for itself. *aIsTypeSupported = nsIWebNavigationInfo::UNSUPPORTED; - // We want to claim that the type for PDF documents is unsupported, - // so that the internal PDF viewer's stream converted will get used. - if (aType.LowerCaseEqualsLiteral("application/pdf") && - nsContentUtils::IsPDFJSEnabled()) { - return NS_OK; - } - const nsCString& flatType = PromiseFlatCString(aType); nsresult rv = IsTypeSupportedInternal(flatType, aIsTypeSupported); NS_ENSURE_SUCCESS(rv, rv); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 6199fc5884..3f3b7c4fc8 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -6406,19 +6406,6 @@ nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal) IsSitePermAllow(aPrincipal, "allowXULXBL")); } -bool -nsContentUtils::IsPDFJSEnabled() -{ - nsCOMPtr convServ = - do_GetService("@mozilla.org/streamConverters;1"); - nsresult rv = NS_ERROR_FAILURE; - bool canConvert = false; - if (convServ) { - rv = convServ->CanConvert("application/pdf", "text/html", &canConvert); - } - return NS_SUCCEEDED(rv) && canConvert; -} - already_AddRefed nsContentUtils::FindInternalContentViewer(const char* aType, ContentViewerType* aLoaderType) diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 84511a0d24..58d219970a 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2011,11 +2011,6 @@ public: */ static void XPCOMShutdown(); - /** - * Checks if internal PDF viewer is enabled. - */ - static bool IsPDFJSEnabled(); - enum ContentViewerType { TYPE_UNSUPPORTED, diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 0eda9795c7..7b6d21b275 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -552,11 +552,6 @@ IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType) return false; } - // Disables any native PDF plugins, when internal PDF viewer is enabled. - if (ext.EqualsIgnoreCase("pdf") && nsContentUtils::IsPDFJSEnabled()) { - return false; - } - nsRefPtr pluginHost = nsPluginHost::GetInst(); if (!pluginHost) { @@ -2674,13 +2669,6 @@ nsObjectLoadingContent::GetTypeOfContent(const nsCString& aMIMEType) return eType_Image; } - // Faking support of the PDF content as a document for EMBED tags - // when internal PDF viewer is enabled. - if (aMIMEType.LowerCaseEqualsLiteral("application/pdf") && - nsContentUtils::IsPDFJSEnabled()) { - return eType_Document; - } - // SVGs load as documents, but are their own capability bool isSVG = aMIMEType.LowerCaseEqualsLiteral("image/svg+xml"); Capabilities supportType = isSVG ? eSupportSVG : eSupportDocuments; diff --git a/python/mozbuild/mozpack/test/test_chrome_manifest.py b/python/mozbuild/mozpack/test/test_chrome_manifest.py index 4f8bc8a373..2c72ae178d 100644 --- a/python/mozbuild/mozpack/test/test_chrome_manifest.py +++ b/python/mozbuild/mozpack/test/test_chrome_manifest.py @@ -39,7 +39,6 @@ class TestManifest(unittest.TestCase): 'skin global classic/1.0 content/skin/classic/ application=foo' + ' os=WINNT', '', - 'manifest pdfjs/chrome.manifest', 'resource gre-resources toolkit/res/', 'override chrome://global/locale/netError.dtd' + ' chrome://browser/locale/netError.dtd', @@ -70,7 +69,6 @@ class TestManifest(unittest.TestCase): ManifestSkin('', 'global', 'classic/1.0', 'content/skin/classic/'), ManifestSkin('', 'global', 'classic/1.0', 'content/skin/classic/', 'application=foo', 'os=WINNT'), - Manifest('', 'pdfjs/chrome.manifest'), ManifestResource('', 'gre-resources', 'toolkit/res/'), ManifestOverride('', 'chrome://global/locale/netError.dtd', 'chrome://browser/locale/netError.dtd'), diff --git a/python/mozbuild/mozpack/test/test_files.py b/python/mozbuild/mozpack/test/test_files.py index 99bd40b5ed..422143c294 100644 --- a/python/mozbuild/mozpack/test/test_files.py +++ b/python/mozbuild/mozpack/test/test_files.py @@ -611,8 +611,6 @@ class TestManifestFile(TestWithTmpDir): f = ManifestFile('chrome') f.add(ManifestContent('chrome', 'global', 'toolkit/content/global/')) f.add(ManifestResource('chrome', 'gre-resources', 'toolkit/res/')) - f.add(ManifestResource('chrome/pdfjs', 'pdfjs', './')) - f.add(ManifestContent('chrome/pdfjs', 'pdfjs', 'pdfjs')) f.add(ManifestLocale('chrome', 'browser', 'en-US', 'en-US/locale/browser/')) @@ -620,8 +618,6 @@ class TestManifestFile(TestWithTmpDir): self.assertEqual(open(self.tmppath('chrome.manifest')).readlines(), [ 'content global toolkit/content/global/\n', 'resource gre-resources toolkit/res/\n', - 'resource pdfjs pdfjs/\n', - 'content pdfjs pdfjs/pdfjs\n', 'locale browser en-US en-US/locale/browser/\n', ])