зеркало из https://github.com/mozilla/pjs.git
Added Option constructor support to factory.
This commit is contained in:
Родитель
0089d292a7
Коммит
cdac942783
|
@ -43,6 +43,11 @@
|
|||
0xd6008c40, 0x4dad, 0x11d2, \
|
||||
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
|
||||
|
||||
#define NS_HTMLOPTIONELEMENT_CID \
|
||||
{ /* a6cf90f5-15b3-11d2-932e-00805f8add32 */ \
|
||||
0xa6cf90f5, 0x15b3, 0x11d2, \
|
||||
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
#define NS_NAMESPACEMANAGER_CID \
|
||||
{ /* d9783472-8fe9-11d2-9d3c-0060088f9ff7 */ \
|
||||
0xd9783472, 0x8fe9, 0x11d2, \
|
||||
|
|
|
@ -49,6 +49,7 @@ static NS_DEFINE_IID(kCCSSParserCID, NS_CSSPARSER_CID);
|
|||
static NS_DEFINE_CID(kHTMLStyleSheetCID, NS_HTMLSTYLESHEET_CID);
|
||||
static NS_DEFINE_CID(kHTMLCSSStyleSheetCID, NS_HTML_CSS_STYLESHEET_CID);
|
||||
static NS_DEFINE_IID(kCHTMLImageElementCID, NS_HTMLIMAGEELEMENT_CID);
|
||||
static NS_DEFINE_IID(kCHTMLOptionElementCID, NS_HTMLOPTIONELEMENT_CID);
|
||||
static NS_DEFINE_IID(kCRangeListCID, NS_RANGELIST_CID);
|
||||
static NS_DEFINE_IID(kCRangeCID, NS_RANGE_CID);
|
||||
static NS_DEFINE_IID(kCContentIteratorCID, NS_CONTENTITERATOR_CID);
|
||||
|
@ -193,6 +194,13 @@ nsresult nsLayoutFactory::CreateInstance(nsISupports *aOuter,
|
|||
}
|
||||
refCounted = PR_TRUE;
|
||||
}
|
||||
else if (mClassID.Equals(kCHTMLOptionElementCID)) {
|
||||
res = NS_NewHTMLOptionElement((nsIHTMLContent**)&inst, nsHTMLAtoms::option);
|
||||
if (NS_FAILED(res)) {
|
||||
return res;
|
||||
}
|
||||
refCounted = PR_TRUE;
|
||||
}
|
||||
else if (mClassID.Equals(kPresShellCID)) {
|
||||
res = NS_NewPresShell((nsIPresShell**) &inst);
|
||||
if (NS_FAILED(res)) {
|
||||
|
@ -346,6 +354,19 @@ LayoutScriptNameSet::AddNameSet(nsIScriptContext* aScriptContext)
|
|||
result = manager->RegisterGlobalName("HTMLImageElement",
|
||||
kCHTMLImageElementCID,
|
||||
PR_TRUE);
|
||||
if (NS_FAILED(result)) {
|
||||
NS_RELEASE(manager);
|
||||
return result;
|
||||
}
|
||||
|
||||
result = manager->RegisterGlobalName("HTMLOptionElement",
|
||||
kCHTMLOptionElementCID,
|
||||
PR_TRUE);
|
||||
if (NS_FAILED(result)) {
|
||||
NS_RELEASE(manager);
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_RELEASE(manager);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче