зеркало из https://github.com/mozilla/pjs.git
Exposed nsCSSParser via layout factory.
This commit is contained in:
Родитель
a92eed5279
Коммит
fdffef1329
|
@ -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__
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче