Exposed nsCSSParser via layout factory.

This commit is contained in:
waterson%netscape.com 1998-12-01 23:29:16 +00:00
parent c504261ae7
commit a3fbabc790
2 changed files with 20 additions and 0 deletions

View File

@ -43,4 +43,14 @@
0xd6008c40, 0x4dad, 0x11d2, \
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
// XXX This should really be factored into a style-specific DLL so
// that all the HTML, generic layout, and style stuff isn't munged
// together.
// {2E363D60-872E-11d2-B531-000000000000}
#define NS_CSSPARSER_CID \
{ 0x2e363d60, 0x872e, 0x11d2, { 0xb5, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
#endif // nsLayoutCID_h__

View File

@ -30,11 +30,13 @@
#include "nsDOMCID.h"
#include "nsIDOMNativeObjectRegistry.h"
#include "nsIServiceManager.h"
#include "nsICSSParser.h"
#include "nsICollection.h"
static NS_DEFINE_IID(kCHTMLDocumentCID, NS_HTMLDOCUMENT_CID);
static NS_DEFINE_IID(kCXMLDocumentCID, NS_XMLDOCUMENT_CID);
static NS_DEFINE_IID(kCImageDocumentCID, NS_IMAGEDOCUMENT_CID);
static NS_DEFINE_IID(kCCSSParserCID, NS_CSSPARSER_CID);
static NS_DEFINE_IID(kCHTMLImageElementFactoryCID, NS_HTMLIMAGEELEMENTFACTORY_CID);
static NS_DEFINE_IID(kIDOMHTMLImageElementFactoryIID, NS_IDOMHTMLIMAGEELEMENTFACTORY_IID);
static NS_DEFINE_IID(kIDOMHTMLImageElementIID, NS_IDOMHTMLIMAGEELEMENT_IID);
@ -213,6 +215,14 @@ nsresult nsLayoutFactory::CreateInstance(nsISupports *aOuter,
}
refCounted = PR_TRUE;
}
else if (mClassID.Equals(kCCSSParserCID)) {
// XXX this should really be factored into a style-specific DLL so
// that all the HTML, generic layout, and style stuff isn't munged
// together.
if (NS_FAILED(res = NS_NewCSSParser((nsICSSParser**)&inst)))
return res;
refCounted = PR_TRUE;
}
else
{
return NS_NOINTERFACE;