diff --git a/layout/build/nsLayoutCID.h b/layout/build/nsLayoutCID.h index 63b58401809..fbcdcbf6150 100644 --- a/layout/build/nsLayoutCID.h +++ b/layout/build/nsLayoutCID.h @@ -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__ diff --git a/layout/build/nsLayoutFactory.cpp b/layout/build/nsLayoutFactory.cpp index 2230889e039..d7aa54322d6 100644 --- a/layout/build/nsLayoutFactory.cpp +++ b/layout/build/nsLayoutFactory.cpp @@ -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;