зеркало из https://github.com/mozilla/pjs.git
Expose nsWellFormedDTD via the factory.
This commit is contained in:
Родитель
652b6c228b
Коммит
25bdc21851
|
@ -33,6 +33,9 @@
|
|||
{0x9039c670, 0x2717, 0x11d2, \
|
||||
{0x92, 0x46, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6}}
|
||||
|
||||
// {E6FD9941-899D-11d2-8EAE-00805F29F370}
|
||||
#define NS_WELLFORMEDDTD_CID \
|
||||
{ 0xe6fd9941, 0x899d, 0x11d2, { 0x8e, 0xae, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsILoggingSink.h"
|
||||
#include "nsParser.h"
|
||||
#include "nsParserNode.h"
|
||||
#include "nsWellFormedDTD.h"
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
@ -31,6 +32,7 @@ static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
|||
static NS_DEFINE_IID(kCParser, NS_PARSER_IID);
|
||||
static NS_DEFINE_IID(kCParserNode, NS_PARSER_NODE_IID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_IID);
|
||||
static NS_DEFINE_CID(kWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
|
||||
class nsParserFactory : public nsIFactory
|
||||
{
|
||||
|
@ -136,6 +138,12 @@ nsresult nsParserFactory::CreateInstance(nsISupports *aOuter,
|
|||
*aResult = cs;
|
||||
return rv;
|
||||
}
|
||||
else if (mClassID.Equals(kWellFormedDTDCID)) {
|
||||
nsresult rv = NS_NewWellFormed_DTD((nsIDTD**) &inst);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
{0x9039c670, 0x2717, 0x11d2, \
|
||||
{0x92, 0x46, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6}}
|
||||
|
||||
// {E6FD9941-899D-11d2-8EAE-00805F29F370}
|
||||
#define NS_WELLFORMEDDTD_CID \
|
||||
{ 0xe6fd9941, 0x899d, 0x11d2, { 0x8e, 0xae, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsILoggingSink.h"
|
||||
#include "nsParser.h"
|
||||
#include "nsParserNode.h"
|
||||
#include "nsWellFormedDTD.h"
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
@ -31,6 +32,7 @@ static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
|||
static NS_DEFINE_IID(kCParser, NS_PARSER_IID);
|
||||
static NS_DEFINE_IID(kCParserNode, NS_PARSER_NODE_IID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_IID);
|
||||
static NS_DEFINE_CID(kWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
|
||||
class nsParserFactory : public nsIFactory
|
||||
{
|
||||
|
@ -136,6 +138,12 @@ nsresult nsParserFactory::CreateInstance(nsISupports *aOuter,
|
|||
*aResult = cs;
|
||||
return rv;
|
||||
}
|
||||
else if (mClassID.Equals(kWellFormedDTDCID)) {
|
||||
nsresult rv = NS_NewWellFormed_DTD((nsIDTD**) &inst);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче