nsresult CSSStyleRuleImpl::QueryInterface(const nsIID& aIID, void** aInstancePtrResult) { NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER; } if (aIID.Equals(kICSSStyleRuleIID)) { *aInstancePtrResult = (void*) ((nsICSSStyleRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kICSSRuleIID)) { *aInstancePtrResult = (void*) ((nsICSSRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIStyleRuleIID)) { *aInstancePtrResult = (void*) ((nsIStyleRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIDOMCSSRuleIID)) { nsIDOMCSSRule *tmp = this; *aInstancePtrResult = (void*) tmp; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIDOMCSSStyleRuleIID)) { nsIDOMCSSStyleRule *tmp = this; *aInstancePtrResult = (void*) tmp; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIScriptObjectOwnerIID)) { nsIScriptObjectOwner *tmp = this; *aInstancePtrResult = (void*) tmp; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kISupportsIID)) { nsICSSStyleRule *tmp = this; nsISupports *tmp2 = tmp; *aInstancePtrResult = (void*) tmp2; NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE; }
NS_IMPL_ISUPPORTS(CSSImportantRule, kIStyleRuleIID);
nsresult CSSStyleRuleImpl::QueryInterface(const nsIID& aIID,                                          void** aInstancePtrResult){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(kICSSStyleRuleIID)) {    *aInstancePtrResult = (void*) ((nsICSSStyleRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kICSSRuleIID)) {    *aInstancePtrResult = (void*) ((nsICSSRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIStyleRuleIID)) {    *aInstancePtrResult = (void*) ((nsIStyleRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIDOMCSSRuleIID)) {    nsIDOMCSSRule *tmp = this;    *aInstancePtrResult = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIDOMCSSStyleRuleIID)) {    nsIDOMCSSStyleRule *tmp = this;    *aInstancePtrResult = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIScriptObjectOwnerIID)) {    nsIScriptObjectOwner *tmp = this;    *aInstancePtrResult = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kISupportsIID)) {    nsICSSStyleRule *tmp = this;    nsISupports *tmp2 = tmp;    *aInstancePtrResult = (void*) tmp2;    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}