if (innerPtr) return NS_NewXTFInterfaceAggregator(aIID, NS_STATIC_CAST(nsISupports*, innerPtr), NS_STATIC_CAST(nsIContent*, this), aInstancePtr);
if (inner) { rv = NS_NewXTFInterfaceAggregator(aIID, inner, NS_STATIC_CAST(nsIContent*, this), aInstancePtr);  return rv; }
nsXTFBindableElementWrapper::QueryInterface(REFNSIID aIID, void** aInstancePtr){  nsresult rv;    if (aIID.Equals(NS_GET_IID(nsIXTFElementWrapperPrivate))) {    *aInstancePtr = NS_STATIC_CAST(nsIXTFElementWrapperPrivate*, this);    NS_ADDREF_THIS();    return NS_OK;  }  if(aIID.Equals(NS_GET_IID(nsIXTFElementWrapper))) {    *aInstancePtr =      NS_STATIC_CAST(nsIXTFElementWrapper*,                      NS_STATIC_CAST(nsXTFBindableElementWrapperBase*, this));    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(NS_GET_IID(nsIXTFBindableElementWrapper))) {    *aInstancePtr = NS_STATIC_CAST(nsIXTFBindableElementWrapper*, this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(NS_GET_IID(nsIXTFStyledElementWrapper))) {    *aInstancePtr = NS_STATIC_CAST(nsIXTFStyledElementWrapper*, this);    NS_ADDREF_THIS();    return NS_OK;  }  // Note, using the nsIClassInfo from nsXMLElement.  if (NS_SUCCEEDED(rv = nsXTFElementWrapperBase::QueryInterface(aIID, aInstancePtr))) {    return rv;  }  // try to get get the interface from our wrapped element:  void *innerPtr = nsnull;  QueryInterfaceInner(aIID, &innerPtr);  if (innerPtr)    return NS_NewXTFInterfaceAggregator(aIID,                                        NS_STATIC_CAST(nsISupports*, innerPtr),                                        NS_STATIC_CAST(nsIContent*, this),                                        aInstancePtr);  return NS_ERROR_NO_INTERFACE;}