Bug 650784 part 1.5 - Move nsScriptableUnescapeHTML from Toolkit to Core. r=smaug.
authorHenri Sivonen <hsivonen@iki.fi>
Mon, 27 Feb 2012 13:57:48 +0200
changeset 87792 a423ca3c3ce1509175463275a170fb91bbf64d85
parent 87791 429263e580904b6266149bcb6a31fc89356c7c49
child 87793 8ea9dc2f857031a0642d9ad6bc28c0b1ca8a7278
push id6512
push userhsivonen@iki.fi
push dateMon, 27 Feb 2012 11:58:46 +0000
treeherdermozilla-inbound@8ea9dc2f8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs650784
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 650784 part 1.5 - Move nsScriptableUnescapeHTML from Toolkit to Core. r=smaug.
content/base/test/TestPlainTextSerializer.cpp
layout/build/nsLayoutModule.cpp
parser/html/Makefile.in
parser/html/nsIParserUtils.idl
parser/html/nsIScriptableUnescapeHTML.idl
parser/html/nsParserUtils.cpp
parser/html/nsParserUtils.h
toolkit/components/build/nsToolkitCompsCID.h
toolkit/components/build/nsToolkitCompsModule.cpp
toolkit/components/feeds/Makefile.in
toolkit/components/feeds/nsIScriptableUnescapeHTML.idl
toolkit/components/feeds/nsScriptableUnescapeHTML.cpp
toolkit/components/feeds/nsScriptableUnescapeHTML.h
--- a/content/base/test/TestPlainTextSerializer.cpp
+++ b/content/base/test/TestPlainTextSerializer.cpp
@@ -37,17 +37,16 @@
 
 #include "TestHarness.h"
 
 #include "nsServiceManagerUtils.h"
 #include "nsStringGlue.h"
 #include "nsIDocumentEncoder.h"
 #include "nsCRT.h"
 #include "nsIParserUtils.h"
-#include "nsToolkitCompsCID.h"
 
 void
 ConvertBufToPlainText(nsString &aConBuf, int aFlag)
 {
   nsCOMPtr<nsIParserUtils> utils =
     do_GetService(NS_PARSERUTILS_CONTRACTID);
   utils->ConvertToPlainText(aConBuf, aFlag, 72, aConBuf);
 }
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -159,29 +159,32 @@ using mozilla::dom::telephony::AudioMana
 #include "nsPrincipal.h"
 #include "nsSystemPrincipal.h"
 #include "nsNullPrincipal.h"
 #include "nsNetCID.h"
 #include "nsINodeInfo.h"
 #if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_PLATFORM_MAEMO)
 #include "nsHapticFeedback.h"
 #endif
+#include "nsParserUtils.h"
 
 #define NS_EDITORCOMMANDTABLE_CID \
 { 0x4f5e62b8, 0xd659, 0x4156, { 0x84, 0xfc, 0x2f, 0x60, 0x99, 0x40, 0x03, 0x69 }}
 
 #define NS_EDITINGCOMMANDTABLE_CID \
 { 0xcb38a746, 0xbeb8, 0x43f3, { 0x94, 0x29, 0x77, 0x96, 0xe1, 0xa9, 0x3f, 0xb4 }}
 
 #define NS_HAPTICFEEDBACK_CID \
 { 0x1f15dbc8, 0xbfaa, 0x45de, \
 { 0x8a, 0x46, 0x08, 0xe2, 0xe2, 0x63, 0x26, 0xb0 } }
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlaintextEditor)
 
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsParserUtils)
+
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextServicesDocument)
 #ifdef ENABLE_EDITOR_API_LOG
 #include "nsHTMLEditorLog.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditorLog)
 #else
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
 #endif
 
@@ -709,16 +712,18 @@ NS_DEFINE_NAMED_CID(NS_CANVASRENDERINGCO
 NS_DEFINE_NAMED_CID(NS_CANVASRENDERINGCONTEXTWEBGL_CID);
 NS_DEFINE_NAMED_CID(NS_TEXT_ENCODER_CID);
 NS_DEFINE_NAMED_CID(NS_HTMLCOPY_TEXT_ENCODER_CID);
 NS_DEFINE_NAMED_CID(NS_XMLCONTENTSERIALIZER_CID);
 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(MOZ_SANITIZINGHTMLSERIALIZER_CID);
+NS_DEFINE_NAMED_CID(NS_PARSERUTILS_CID);
+NS_DEFINE_NAMED_CID(NS_SCRIPTABLEUNESCAPEHTML_CID);
 NS_DEFINE_NAMED_CID(NS_XBLSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
 NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
 NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
 NS_DEFINE_NAMED_CID(NS_XULCONTROLLERS_CID);
 #ifdef MOZ_XUL
 NS_DEFINE_NAMED_CID(NS_XULSORTSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_XULTEMPLATEBUILDER_CID);
@@ -983,16 +988,18 @@ static const mozilla::Module::CIDEntry k
   { &kNS_CANVASRENDERINGCONTEXTWEBGL_CID, false, NULL, CreateCanvasRenderingContextWebGL },
   { &kNS_TEXT_ENCODER_CID, false, NULL, CreateTextEncoder },
   { &kNS_HTMLCOPY_TEXT_ENCODER_CID, false, NULL, CreateHTMLCopyTextEncoder },
   { &kNS_XMLCONTENTSERIALIZER_CID, false, NULL, CreateXMLContentSerializer },
   { &kNS_HTMLCONTENTSERIALIZER_CID, false, NULL, CreateHTMLContentSerializer },
   { &kNS_XHTMLCONTENTSERIALIZER_CID, false, NULL, CreateXHTMLContentSerializer },
   { &kNS_PLAINTEXTSERIALIZER_CID, false, NULL, CreatePlainTextSerializer },
   { &kMOZ_SANITIZINGHTMLSERIALIZER_CID, false, NULL, CreateSanitizingHTMLSerializer },
+  { &kNS_PARSERUTILS_CID, false, NULL, nsParserUtilsConstructor },
+  { &kNS_SCRIPTABLEUNESCAPEHTML_CID, false, NULL, nsParserUtilsConstructor },
   { &kNS_XBLSERVICE_CID, false, NULL, CreateXBLService },
   { &kNS_CONTENTPOLICY_CID, false, NULL, CreateContentPolicy },
   { &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, NULL, nsDataDocumentContentPolicyConstructor },
   { &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, NULL, nsNoDataProtocolContentPolicyConstructor },
   { &kNS_XULCONTROLLERS_CID, false, NULL, NS_NewXULControllers },
 #ifdef MOZ_XUL
   { &kNS_XULSORTSERVICE_CID, false, NULL, CreateXULSortService },
   { &kNS_XULTEMPLATEBUILDER_CID, false, NULL, NS_NewXULContentBuilder },
@@ -1130,16 +1137,18 @@ static const mozilla::Module::ContractID
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xml", &kNS_XMLCONTENTSERIALIZER_CID },
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml", &kNS_XHTMLCONTENTSERIALIZER_CID },
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "image/svg+xml", &kNS_XMLCONTENTSERIALIZER_CID },
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html", &kNS_HTMLCONTENTSERIALIZER_CID },
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", &kNS_XMLCONTENTSERIALIZER_CID },
   { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", &kNS_PLAINTEXTSERIALIZER_CID },
   { NS_PLAINTEXTSINK_CONTRACTID, &kNS_PLAINTEXTSERIALIZER_CID },
   { MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID, &kMOZ_SANITIZINGHTMLSERIALIZER_CID },
+  { NS_PARSERUTILS_CONTRACTID, &kNS_PARSERUTILS_CID },
+  { NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID, &kNS_SCRIPTABLEUNESCAPEHTML_CID },
   { "@mozilla.org/xbl;1", &kNS_XBLSERVICE_CID },
   { NS_CONTENTPOLICY_CONTRACTID, &kNS_CONTENTPOLICY_CID },
   { NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
   { NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },
   { "@mozilla.org/xul/xul-controllers;1", &kNS_XULCONTROLLERS_CID },
 #ifdef MOZ_XUL
   { "@mozilla.org/xul/xul-sort-service;1", &kNS_XULSORTSERVICE_CID },
   { "@mozilla.org/xul/xul-template-builder;1", &kNS_XULTEMPLATEBUILDER_CID },
--- a/parser/html/Makefile.in
+++ b/parser/html/Makefile.in
@@ -42,16 +42,17 @@ VPATH     = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= html5
 LIBRARY_NAME	= html5p_s
 LIBXUL_LIBRARY	= 1
 
 XPIDLSRCS = \
   nsIParserUtils.idl \
+  nsIScriptableUnescapeHTML.idl \
   $(NULL)
 
 EXPORTS		= \
 		jArray.h \
 		nsAHtml5TreeBuilderState.h \
 		nsHtml5ArrayCopy.h \
 		nsHtml5Atoms.h \
 		nsHtml5AtomList.h \
@@ -76,16 +77,17 @@ EXPORTS		= \
 		nsAHtml5TreeOpSink.h \
 		nsHtml5TreeOpStage.h \
 		nsHtml5UTF16Buffer.h \
 		nsHtml5UTF16BufferHSupplement.h \
 		nsHtml5DependentUTF16Buffer.h \
 		nsHtml5OwningUTF16Buffer.h \
 		nsHtml5ViewSourceUtils.h \
 		nsHtml5StringParser.h \
+		nsParserUtils.h \
 		$(NULL)
 
 CPPSRCS		= \
 		nsHtml5Atoms.cpp \
 		nsHtml5Atom.cpp \
 		nsHtml5AtomTable.cpp \
 		nsHtml5Parser.cpp \
 		nsHtml5AttributeName.cpp \
@@ -110,16 +112,17 @@ CPPSRCS		= \
 		nsHtml5TreeOpExecutor.cpp \
 		nsHtml5StreamParser.cpp \
 		nsHtml5Speculation.cpp \
 		nsHtml5SpeculativeLoad.cpp \
 		nsHtml5SVGLoadDispatcher.cpp \
 		nsHtml5Highlighter.cpp \
 		nsHtml5ViewSourceUtils.cpp \
 		nsHtml5StringParser.cpp \
+		nsParserUtils.cpp \
 		$(NULL)
 
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= \
 		-I$(srcdir)/../../content/base/src \
--- a/parser/html/nsIParserUtils.idl
+++ b/parser/html/nsIParserUtils.idl
@@ -18,8 +18,15 @@ interface nsIParserUtils : nsISupports
    *            required to use the same string for the return value.)
    * @param flags conversion option flags defined in nsIDocumentEncoder
    * @param wrapCol number of characters per line; 0 for no auto-wrapping
    */
   AString convertToPlainText(in AString src,
                              in unsigned long flags,
                              in unsigned long wrapCol);
 };
+
+%{ C++
+#define NS_PARSERUTILS_CONTRACTID \
+    "@mozilla.org/parserutils;1"
+#define NS_PARSERUTILS_CID  \
+{ 0xaf7b24cb, 0x893f, 0x41bb, { 0x96, 0x1f, 0x5a, 0x69, 0x38, 0x8e, 0x27, 0xc3 } }
+%}
rename from toolkit/components/feeds/nsIScriptableUnescapeHTML.idl
rename to parser/html/nsIScriptableUnescapeHTML.idl
--- a/toolkit/components/feeds/nsIScriptableUnescapeHTML.idl
+++ b/parser/html/nsIScriptableUnescapeHTML.idl
@@ -67,8 +67,15 @@ interface nsIScriptableUnescapeHTML : ns
    * @param baseURI the base URL for this fragment
    * @param element the context node for the fragment parsing algorithm
    */
   nsIDOMDocumentFragment parseFragment(in AString fragment,
                                        in boolean isXML,
                                        in nsIURI baseURI,
                                        in nsIDOMElement 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} }
+%}
rename from toolkit/components/feeds/nsScriptableUnescapeHTML.cpp
rename to parser/html/nsParserUtils.cpp
--- a/toolkit/components/feeds/nsScriptableUnescapeHTML.cpp
+++ b/parser/html/nsParserUtils.cpp
@@ -57,63 +57,63 @@
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 #include "nsIDocument.h"
 #include "nsIContent.h"
 #include "nsAttrName.h"
 #include "nsHTMLParts.h"
 #include "nsContentCID.h"
 #include "nsIScriptableUnescapeHTML.h"
-#include "nsScriptableUnescapeHTML.h"
+#include "nsParserUtils.h"
 #include "nsAutoPtr.h"
 #include "nsTreeSanitizer.h"
 #include "nsHtml5Module.h"
 
 #define XHTML_DIV_TAG "div xmlns=\"http://www.w3.org/1999/xhtml\""
 
-NS_IMPL_ISUPPORTS2(nsScriptableUnescapeHTML,
+NS_IMPL_ISUPPORTS2(nsParserUtils,
                    nsIScriptableUnescapeHTML,
                    nsIParserUtils)
 
 static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
 
 
 
 NS_IMETHODIMP
-nsScriptableUnescapeHTML::ConvertToPlainText(const nsAString & aFromStr,
-                                             PRUint32 aFlags,
-                                             PRUint32 aWrapCol,
-                                             nsAString & aToStr)
+nsParserUtils::ConvertToPlainText(const nsAString & aFromStr,
+                                           PRUint32 aFlags,
+                                           PRUint32 aWrapCol,
+                                           nsAString & aToStr)
 {
   return nsContentUtils::ConvertToPlainText(aFromStr,
     aToStr,
     aFlags,
     aWrapCol);
 }
 
 NS_IMETHODIMP
-nsScriptableUnescapeHTML::Unescape(const nsAString & aFromStr,
-                                   nsAString & aToStr)
+nsParserUtils::Unescape(const nsAString & aFromStr,
+                                 nsAString & aToStr)
 {
   return nsContentUtils::ConvertToPlainText(aFromStr,
     aToStr,
     nsIDocumentEncoder::OutputSelectionOnly |
     nsIDocumentEncoder::OutputAbsoluteLinks,
     0);
 }
 
 // The feed version of nsContentUtils::CreateContextualFragment It
 // creates a fragment, but doesn't go to all the effort to preserve
 // context like innerHTML does, because feed DOMs shouldn't have that.
 NS_IMETHODIMP
-nsScriptableUnescapeHTML::ParseFragment(const nsAString &aFragment,
-                                        bool aIsXML,
-                                        nsIURI* aBaseURI,
-                                        nsIDOMElement* aContextElement,
-                                        nsIDOMDocumentFragment** aReturn)
+nsParserUtils::ParseFragment(const nsAString &aFragment,
+                                      bool aIsXML,
+                                      nsIURI* aBaseURI,
+                                      nsIDOMElement* aContextElement,
+                                      nsIDOMDocumentFragment** aReturn)
 {
   NS_ENSURE_ARG(aContextElement);
   *aReturn = nsnull;
 
   nsresult rv;
   nsCOMPtr<nsIParser> parser = do_CreateInstance(kCParserCID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
rename from toolkit/components/feeds/nsScriptableUnescapeHTML.h
rename to parser/html/nsParserUtils.h
--- a/toolkit/components/feeds/nsScriptableUnescapeHTML.h
+++ b/parser/html/nsParserUtils.h
@@ -29,24 +29,24 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef nsScriptableHTMLUnescape_h__
-#define nsScriptableHTMLUnescape_h__
+#ifndef nsParserUtils_h_
+#define nsParserUtils_h_
 
 #include "nsIScriptableUnescapeHTML.h"
 #include "nsIParserUtils.h"
 
-class nsScriptableUnescapeHTML : public nsIScriptableUnescapeHTML,
-                                 public nsIParserUtils
+class nsParserUtils : public nsIScriptableUnescapeHTML,
+                               public nsIParserUtils
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISCRIPTABLEUNESCAPEHTML
   NS_DECL_NSIPARSERUTILS
 };
 
-#endif // nsScriptableHTMLUnescape_h__
+#endif // nsParserUtils_h_
--- a/toolkit/components/build/nsToolkitCompsCID.h
+++ b/toolkit/components/build/nsToolkitCompsCID.h
@@ -91,21 +91,16 @@
     "@mozilla.org/url-classifier/streamupdater;1"
 
 #define NS_URLCLASSIFIERUTILS_CONTRACTID \
     "@mozilla.org/url-classifier/utils;1"
 
 #define NS_URLCLASSIFIERHASHCOMPLETER_CONTRACTID \
     "@mozilla.org/url-classifier/hashcompleter;1"
 
-#define NS_PARSERUTILS_CONTRACTID \
-    "@mozilla.org/parserutils;1"
-
-#define NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID "@mozilla.org/feed-unescapehtml;1"
-
 #define NS_NAVHISTORYSERVICE_CONTRACTID \
   "@mozilla.org/browser/nav-history-service;1"
 
 #define NS_ANNOTATIONSERVICE_CONTRACTID \
   "@mozilla.org/browser/annotation-service;1"
 
 #define NS_NAVBOOKMARKSSERVICE_CONTRACTID \
   "@mozilla.org/browser/nav-bookmarks-service;1"
@@ -177,23 +172,16 @@
 // {c2be6dc0-ef1e-4abd-86a2-4f864ddc57f6}
 #define NS_URLCLASSIFIERSTREAMUPDATER_CID \
 { 0xc2be6dc0, 0xef1e, 0x4abd, { 0x86, 0xa2, 0x4f, 0x86, 0x4d, 0xdc, 0x57, 0xf6} }
 
 // {b7b2ccec-7912-4ea6-a548-b038447004bd}
 #define NS_URLCLASSIFIERUTILS_CID \
 { 0xb7b2ccec, 0x7912, 0x4ea6, { 0xa5, 0x48, 0xb0, 0x38, 0x44, 0x70, 0x04, 0xbd} }
 
-#define NS_PARSERUTILS_CID  \
-{ 0xaf7b24cb, 0x893f, 0x41bb, { 0x96, 0x1f, 0x5a, 0x69, 0x38, 0x8e, 0x27, 0xc3 } }
-
-// {10f2f5f0-f103-4901-980f-ba11bd70d60d}
-#define NS_SCRIPTABLEUNESCAPEHTML_CID  \
-{ 0x10f2f5f0, 0xf103, 0x4901, { 0x98, 0x0f, 0xba, 0x11, 0xbd, 0x70, 0xd6, 0x0d} }
-
 #define NS_NAVHISTORYSERVICE_CID \
 { 0x88cecbb7, 0x6c63, 0x4b3b, { 0x8c, 0xd4, 0x84, 0xf3, 0xb8, 0x22, 0x8c, 0x69 } }
 
 #define NS_NAVHISTORYRESULTTREEVIEWER_CID \
 { 0x2ea8966f, 0x0671, 0x4c02, { 0x9c, 0x70, 0x94, 0x59, 0x56, 0xd4, 0x54, 0x34 } }
 
 #define NS_ANNOTATIONSERVICE_CID \
 { 0x5e8d4751, 0x1852, 0x434b, { 0xa9, 0x92, 0x2c, 0x6d, 0x2a, 0x25, 0xfa, 0x46 } }
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -59,20 +59,16 @@
 
 #ifdef MOZ_URL_CLASSIFIER
 #include "nsUrlClassifierDBService.h"
 #include "nsUrlClassifierStreamUpdater.h"
 #include "nsUrlClassifierUtils.h"
 #include "nsUrlClassifierPrefixSet.h"
 #endif
 
-#ifdef MOZ_FEEDS
-#include "nsScriptableUnescapeHTML.h"
-#endif
-
 #include "nsBrowserStatusFilter.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserInfo)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFindService)
 
@@ -110,20 +106,16 @@ nsUrlClassifierDBServiceConstructor(nsIS
     /* NS_ADDREF(inst); */
     rv = inst->QueryInterface(aIID, aResult);
     NS_RELEASE(inst);
 
     return rv;
 }
 #endif
 
-#ifdef MOZ_FEEDS
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnescapeHTML)
-#endif
-
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
 
 NS_DEFINE_NAMED_CID(NS_TOOLKIT_APPSTARTUP_CID);
 NS_DEFINE_NAMED_CID(NS_USERINFO_CID);
 #ifdef ALERTS_SERVICE
 NS_DEFINE_NAMED_CID(NS_ALERTSSERVICE_CID);
 #endif
 #if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
@@ -134,20 +126,16 @@ NS_DEFINE_NAMED_CID(NS_DOWNLOAD_CID);
 NS_DEFINE_NAMED_CID(NS_FIND_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_TYPEAHEADFIND_CID);
 #ifdef MOZ_URL_CLASSIFIER
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERPREFIXSET_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERDBSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTILS_CID);
 #endif
-#ifdef MOZ_FEEDS
-NS_DEFINE_NAMED_CID(NS_PARSERUTILS_CID);
-NS_DEFINE_NAMED_CID(NS_SCRIPTABLEUNESCAPEHTML_CID);
-#endif
 NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
 NS_DEFINE_NAMED_CID(NS_CHARSETMENU_CID);
 
 static const mozilla::Module::CIDEntry kToolkitCIDs[] = {
   { &kNS_TOOLKIT_APPSTARTUP_CID, false, NULL, nsAppStartupConstructor },
   { &kNS_USERINFO_CID, false, NULL, nsUserInfoConstructor },
 #ifdef ALERTS_SERVICE
   { &kNS_ALERTSSERVICE_CID, false, NULL, nsAlertsServiceConstructor },
@@ -160,20 +148,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_FIND_SERVICE_CID, false, NULL, nsFindServiceConstructor },
   { &kNS_TYPEAHEADFIND_CID, false, NULL, nsTypeAheadFindConstructor },
 #ifdef MOZ_URL_CLASSIFIER
   { &kNS_URLCLASSIFIERPREFIXSET_CID, false, NULL, nsUrlClassifierPrefixSetConstructor },
   { &kNS_URLCLASSIFIERDBSERVICE_CID, false, NULL, nsUrlClassifierDBServiceConstructor },
   { &kNS_URLCLASSIFIERSTREAMUPDATER_CID, false, NULL, nsUrlClassifierStreamUpdaterConstructor },
   { &kNS_URLCLASSIFIERUTILS_CID, false, NULL, nsUrlClassifierUtilsConstructor },
 #endif
-#ifdef MOZ_FEEDS
-  { &kNS_PARSERUTILS_CID, false, NULL, nsScriptableUnescapeHTMLConstructor },
-  { &kNS_SCRIPTABLEUNESCAPEHTML_CID, false, NULL, nsScriptableUnescapeHTMLConstructor },
-#endif
   { &kNS_BROWSERSTATUSFILTER_CID, false, NULL, nsBrowserStatusFilterConstructor },
   { &kNS_CHARSETMENU_CID, false, NULL, NS_NewCharsetMenu },
   { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kToolkitContracts[] = {
   { NS_APPSTARTUP_CONTRACTID, &kNS_TOOLKIT_APPSTARTUP_CID },
   { NS_USERINFO_CONTRACTID, &kNS_USERINFO_CID },
@@ -189,20 +173,16 @@ static const mozilla::Module::ContractID
   { NS_TYPEAHEADFIND_CONTRACTID, &kNS_TYPEAHEADFIND_CID },
 #ifdef MOZ_URL_CLASSIFIER
   { NS_URLCLASSIFIERPREFIXSET_CONTRACTID, &kNS_URLCLASSIFIERPREFIXSET_CID },
   { NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
   { NS_URICLASSIFIERSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
   { NS_URLCLASSIFIERSTREAMUPDATER_CONTRACTID, &kNS_URLCLASSIFIERSTREAMUPDATER_CID },
   { NS_URLCLASSIFIERUTILS_CONTRACTID, &kNS_URLCLASSIFIERUTILS_CID },
 #endif
-#ifdef MOZ_FEEDS
-  { NS_PARSERUTILS_CONTRACTID, &kNS_PARSERUTILS_CID },
-  { NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID, &kNS_SCRIPTABLEUNESCAPEHTML_CID },
-#endif
   { NS_BROWSERSTATUSFILTER_CONTRACTID, &kNS_BROWSERSTATUSFILTER_CID },
   { NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID, &kNS_CHARSETMENU_CID },
   { NULL }
 };
 
 static const mozilla::Module kToolkitModule = {
   mozilla::Module::kVersion,
   kToolkitCIDs,
--- a/toolkit/components/feeds/Makefile.in
+++ b/toolkit/components/feeds/Makefile.in
@@ -58,21 +58,16 @@ XPIDLSRCS = \
   nsIFeedElementBase.idl \
   nsIFeedEntry.idl \
   nsIFeedGenerator.idl \
   nsIFeedListener.idl \
   nsIFeedPerson.idl \
   nsIFeedProcessor.idl \
   nsIFeedResult.idl \
   nsIFeedTextConstruct.idl \
-  nsIScriptableUnescapeHTML.idl \
-  $(NULL)
-
-CPPSRCS = \
-  nsScriptableUnescapeHTML.cpp \
   $(NULL)
 
 EXTRA_COMPONENTS = FeedProcessor.js FeedProcessor.manifest
 
 include $(topsrcdir)/config/rules.mk
 
 ABS_SRCDIR := $(shell cd $(srcdir) && pwd)
 ifeq ($(OS_ARCH),WINNT)