nsHTMLMappedAttributes::QueryInterface(const nsIID& aIID, void** aInstancePtrResult) { NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER; } static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); if (aIID.Equals(nsIHTMLMappedAttributes::GetIID())) { *aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(nsIStyleRule::GetIID())) { *aInstancePtrResult = (void*) ((nsIStyleRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kISupportsIID)) { *aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this); NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE; }
NS_IMPL_QUERY_INTERFACE(HTMLAttributesImpl, kIHTMLAttributesIID);
nsHTMLMappedAttributes::QueryInterface(const nsIID& aIID,                                       void** aInstancePtrResult){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);  if (aIID.Equals(nsIHTMLMappedAttributes::GetIID())) {    *aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(nsIStyleRule::GetIID())) {    *aInstancePtrResult = (void*) ((nsIStyleRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kISupportsIID)) {    *aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this);    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}