Bug 1503674 - Remove now unused nsIScriptableUnescapeHTML.idl. r=hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D14680

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2018-12-17 09:33:28 +00:00
parent 32345283e0
commit 8fc9eab7b3
5 changed files with 3 additions and 83 deletions

View file

@ -453,7 +453,6 @@ NS_DEFINE_NAMED_CID(NS_XHTMLCONTENTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_HTMLCONTENTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_PLAINTEXTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_PARSERUTILS_CID);
NS_DEFINE_NAMED_CID(NS_SCRIPTABLEUNESCAPEHTML_CID);
NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
@ -545,7 +544,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_XHTMLCONTENTSERIALIZER_CID, false, nullptr, CreateXHTMLContentSerializer },
{ &kNS_PLAINTEXTSERIALIZER_CID, false, nullptr, CreatePlainTextSerializer },
{ &kNS_PARSERUTILS_CID, false, nullptr, nsParserUtilsConstructor },
{ &kNS_SCRIPTABLEUNESCAPEHTML_CID, false, nullptr, nsParserUtilsConstructor },
{ &kNS_CONTENTPOLICY_CID, false, nullptr, CreateContentPolicy },
{ &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, nullptr, nsDataDocumentContentPolicyConstructor },
{ &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, nullptr, nsNoDataProtocolContentPolicyConstructor },
@ -622,7 +620,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", &kNS_XMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", &kNS_PLAINTEXTSERIALIZER_CID },
{ NS_PARSERUTILS_CONTRACTID, &kNS_PARSERUTILS_CID },
{ NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID, &kNS_SCRIPTABLEUNESCAPEHTML_CID },
{ NS_CONTENTPOLICY_CONTRACTID, &kNS_CONTENTPOLICY_CID },
{ NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
{ NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },

View file

@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
'nsIParserUtils.idl',
'nsIScriptableUnescapeHTML.idl',
'nsIParserUtils.idl'
]
XPIDL_MODULE = 'html5'

View file

@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsIURI;
webidl DocumentFragment;
webidl Element;
/**
* This interface is OBSOLETE and exists solely for legacy extensions.
*/
[scriptable, uuid(3ab244a9-f09d-44da-9e3f-ee4d67367f2d)]
interface nsIScriptableUnescapeHTML : nsISupports
{
/**
* Converts HTML to plain text. This is equivalent to calling
* nsIParserUtils::convertToPlainText(src,
* nsIDocumentEncoder::OutputSelectionOnly |
* nsIDocumentEncoder::OutputAbsoluteLinks, 0).
*
* You should call nsIParserUtils::convertToPlainText() instead of calling
* this method.
*
* @param src The HTML string to convert to plain text.
*/
AString unescape(in AString src);
/**
* Parses markup into a sanitized document fragment. This is equivalent to
* calling nsIParserUtils::parseFragment(fragment, 0, isXML, baseURI,
* element).
*
* You should call nsIParserUtils::parseFragment() instead of calling this
* method.
* @param fragment the input markup
* @param isXML true if |fragment| is XML and false if HTML
* @param baseURI the base URL for this fragment
* @param element the context node for the fragment parsing algorithm
*/
DocumentFragment parseFragment(in AString fragment,
in boolean isXML,
in nsIURI baseURI,
in Element element);
};
%{ C++
#define NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID \
"@mozilla.org/feed-unescapehtml;1"
#define NS_SCRIPTABLEUNESCAPEHTML_CID \
{ 0x10f2f5f0, 0xf103, 0x4901, { 0x98, 0x0f, 0xba, 0x11, 0xbd, 0x70, 0xd6, 0x0d} }
%}

View file

@ -24,7 +24,6 @@
#include "nsIDocumentEncoder.h"
#include "nsIFragmentContentSink.h"
#include "nsIParser.h"
#include "nsIScriptableUnescapeHTML.h"
#include "nsISupportsPrimitives.h"
#include "nsNetCID.h"
#include "nsNetUtil.h"
@ -37,7 +36,7 @@
using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsParserUtils, nsIScriptableUnescapeHTML, nsIParserUtils)
NS_IMPL_ISUPPORTS(nsParserUtils, nsIParserUtils)
NS_IMETHODIMP
nsParserUtils::ConvertToPlainText(const nsAString& aFromStr, uint32_t aFlags,
@ -45,15 +44,6 @@ nsParserUtils::ConvertToPlainText(const nsAString& aFromStr, uint32_t aFlags,
return nsContentUtils::ConvertToPlainText(aFromStr, aToStr, aFlags, aWrapCol);
}
NS_IMETHODIMP
nsParserUtils::Unescape(const nsAString& aFromStr, nsAString& aToStr) {
return nsContentUtils::ConvertToPlainText(
aFromStr, aToStr,
nsIDocumentEncoder::OutputSelectionOnly |
nsIDocumentEncoder::OutputAbsoluteLinks,
0);
}
NS_IMETHODIMP
nsParserUtils::Sanitize(const nsAString& aFromStr, uint32_t aFlags,
nsAString& aToStr) {
@ -85,14 +75,6 @@ nsParserUtils::Sanitize(const nsAString& aFromStr, uint32_t aFlags,
return encoder->EncodeToString(aToStr);
}
NS_IMETHODIMP
nsParserUtils::ParseFragment(const nsAString& aFragment, bool aIsXML,
nsIURI* aBaseURI, Element* aContextElement,
DocumentFragment** aReturn) {
return nsParserUtils::ParseFragment(aFragment, 0, aIsXML, aBaseURI,
aContextElement, aReturn);
}
NS_IMETHODIMP
nsParserUtils::ParseFragment(const nsAString& aFragment, uint32_t aFlags,
bool aIsXML, nsIURI* aBaseURI,

View file

@ -6,17 +6,14 @@
#ifndef nsParserUtils_h
#define nsParserUtils_h
#include "nsIScriptableUnescapeHTML.h"
#include "nsIParserUtils.h"
#include "mozilla/Attributes.h"
class nsParserUtils final : public nsIScriptableUnescapeHTML,
public nsIParserUtils {
class nsParserUtils final : public nsIParserUtils {
~nsParserUtils() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISCRIPTABLEUNESCAPEHTML
NS_DECL_NSIPARSERUTILS
};