From 8e6fe3df91be33464822a6eddfbf16a4d4fffbaa Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Thu, 6 May 1999 19:28:09 +0000 Subject: [PATCH] Use component manager to create a css parser --- content/xul/content/src/nsXULAttributes.cpp | 8 +++++++- rdf/content/src/nsXULAttributes.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/content/xul/content/src/nsXULAttributes.cpp b/content/xul/content/src/nsXULAttributes.cpp index cfaf14a8bbaa..7c5b91e172c2 100644 --- a/content/xul/content/src/nsXULAttributes.cpp +++ b/content/xul/content/src/nsXULAttributes.cpp @@ -44,9 +44,12 @@ #include "nsIServiceManager.h" #include "nsIURL.h" #include "nsXULAttributes.h" +#include "nsLayoutCID.h" static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); +static NS_DEFINE_CID(kCSSParserCID, NS_CSSPARSER_CID); +static NS_DEFINE_CID(kICSSParserIID, NS_ICSS_PARSER_IID); //////////////////////////////////////////////////////////////////////// @@ -577,7 +580,10 @@ nsresult nsXULAttributes::UpdateStyleRule(nsIURL* aDocURL, const nsString& aValu } nsICSSParser* css; - nsresult result = NS_NewCSSParser(&css); + nsresult result = nsComponentManager::CreateInstance(kCSSParserCID, + nsnull, + kICSSParserIID, + (void**)&css); if (NS_OK != result) { return result; } diff --git a/rdf/content/src/nsXULAttributes.cpp b/rdf/content/src/nsXULAttributes.cpp index cfaf14a8bbaa..7c5b91e172c2 100644 --- a/rdf/content/src/nsXULAttributes.cpp +++ b/rdf/content/src/nsXULAttributes.cpp @@ -44,9 +44,12 @@ #include "nsIServiceManager.h" #include "nsIURL.h" #include "nsXULAttributes.h" +#include "nsLayoutCID.h" static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); +static NS_DEFINE_CID(kCSSParserCID, NS_CSSPARSER_CID); +static NS_DEFINE_CID(kICSSParserIID, NS_ICSS_PARSER_IID); //////////////////////////////////////////////////////////////////////// @@ -577,7 +580,10 @@ nsresult nsXULAttributes::UpdateStyleRule(nsIURL* aDocURL, const nsString& aValu } nsICSSParser* css; - nsresult result = NS_NewCSSParser(&css); + nsresult result = nsComponentManager::CreateInstance(kCSSParserCID, + nsnull, + kICSSParserIID, + (void**)&css); if (NS_OK != result) { return result; }