Added nsIDOMElementObserver interface to QI.

This commit is contained in:
waterson%netscape.com 1999-02-17 11:56:15 +00:00
parent d69f284086
commit 24b3945071
2 changed files with 18 additions and 30 deletions

View File

@ -682,43 +682,37 @@ XULDocumentImpl::QueryInterface(REFNSIID iid, void** result)
if (iid.Equals(kIDocumentIID) ||
iid.Equals(kISupportsIID)) {
*result = NS_STATIC_CAST(nsIDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIRDFDocumentIID) ||
iid.Equals(kIXMLDocumentIID)) {
*result = NS_STATIC_CAST(nsIRDFDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(nsIDOMXULDocument::IID()) ||
iid.Equals(nsIDOMDocument::IID()) ||
iid.Equals(nsIDOMNode::IID())) {
*result = NS_STATIC_CAST(nsIDOMXULDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIJSScriptObjectIID)) {
*result = NS_STATIC_CAST(nsIJSScriptObject*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIScriptObjectOwnerIID)) {
*result = NS_STATIC_CAST(nsIScriptObjectOwner*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIHTMLContentContainerIID)) {
*result = NS_STATIC_CAST(nsIHTMLContentContainer*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(nsIDOMNodeObserver::IID())) {
*result = NS_STATIC_CAST(nsIDOMNodeObserver*, this);
NS_ADDREF(this);
return NS_OK;
}
return NS_NOINTERFACE;
else if (iid.Equals(nsIDOMElementObserver::IID())) {
*result = NS_STATIC_CAST(nsIDOMElementObserver*, this);
}
else {
*result = nsnull;
return NS_NOINTERFACE;
}
NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_ADDREF(XULDocumentImpl);

View File

@ -682,43 +682,37 @@ XULDocumentImpl::QueryInterface(REFNSIID iid, void** result)
if (iid.Equals(kIDocumentIID) ||
iid.Equals(kISupportsIID)) {
*result = NS_STATIC_CAST(nsIDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIRDFDocumentIID) ||
iid.Equals(kIXMLDocumentIID)) {
*result = NS_STATIC_CAST(nsIRDFDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(nsIDOMXULDocument::IID()) ||
iid.Equals(nsIDOMDocument::IID()) ||
iid.Equals(nsIDOMNode::IID())) {
*result = NS_STATIC_CAST(nsIDOMXULDocument*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIJSScriptObjectIID)) {
*result = NS_STATIC_CAST(nsIJSScriptObject*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIScriptObjectOwnerIID)) {
*result = NS_STATIC_CAST(nsIScriptObjectOwner*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(kIHTMLContentContainerIID)) {
*result = NS_STATIC_CAST(nsIHTMLContentContainer*, this);
NS_ADDREF(this);
return NS_OK;
}
else if (iid.Equals(nsIDOMNodeObserver::IID())) {
*result = NS_STATIC_CAST(nsIDOMNodeObserver*, this);
NS_ADDREF(this);
return NS_OK;
}
return NS_NOINTERFACE;
else if (iid.Equals(nsIDOMElementObserver::IID())) {
*result = NS_STATIC_CAST(nsIDOMElementObserver*, this);
}
else {
*result = nsnull;
return NS_NOINTERFACE;
}
NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_ADDREF(XULDocumentImpl);