} else if (aIID.Equals(NS_GET_IID(nsIAccessible))) { nsresult rv; NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv); if (accService) { nsIAccessible* acc = nsnull; accService->CreateHTML4ButtonAccessible(NS_STATIC_CAST(nsIFrame*, this),&acc); *aInstancePtr = acc; return NS_OK; } return NS_ERROR_FAILURE;
nsImageControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr){  NS_PRECONDITION(0 != aInstancePtr, "null ptr");  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(NS_GET_IID(nsIFormControlFrame))) {    *aInstancePtr = (void*) ((nsIFormControlFrame*) this);    return NS_OK;  } else if (aIID.Equals(NS_GET_IID(nsIAccessible))) {    nsresult rv;    NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv);    if (accService) {      nsIAccessible* acc = nsnull;      accService->CreateHTML4ButtonAccessible(NS_STATIC_CAST(nsIFrame*, this),&acc);      *aInstancePtr = acc;      return NS_OK;    }    return NS_ERROR_FAILURE;  }   return nsImageControlFrameSuper::QueryInterface(aIID, aInstancePtr);}