if (aIID.Equals(NS_GET_IID(nsIContentSink))) { nsIContentSink* tmp = this; *aInstancePtr = (void*) tmp; NS_ADDREF_THIS(); return NS_OK; }
nsHTMLFragmentContentSink::QueryInterface(REFNSIID aIID, void** aInstancePtr){                                                                          if (NULL == aInstancePtr) {                                                return NS_ERROR_NULL_POINTER;                                          }                                                                                                                                                 *aInstancePtr = NULL;                                                                                                                             static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);                   if (aIID.Equals(NS_GET_IID(nsIHTMLFragmentContentSink))) {    nsIHTMLFragmentContentSink* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }   if (aIID.Equals(NS_GET_IID(nsIHTMLContentSink))) {    nsIHTMLContentSink* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }   if (aIID.Equals(kISupportsIID)) {    *aInstancePtr = (void*) ((nsISupports*)this);    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}