nsresult result = frame->QueryInterface(kIFormControlFrameIID, (void**)&fcFrame);
nsresult result = frame->QueryInterface(NS_GET_IID(nsIFormControlFrame), (void**)&fcFrame);
nsLabelFrame::FindForControl(nsIFormControlFrame*& aResultFrame){  nsAutoString forId;  if (NS_CONTENT_ATTR_HAS_VALUE != GetFor(forId)) {    return PR_FALSE;  }  nsCOMPtr<nsIDocument> iDoc;  if (NS_FAILED(mContent->GetDocument(*getter_AddRefs(iDoc))))    return PR_FALSE;    nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(iDoc);  nsCOMPtr<nsIDOMElement> domElement;  if (htmlDoc) {    if (NS_FAILED(htmlDoc->GetElementById(forId, getter_AddRefs(domElement))))      return PR_FALSE;  }#ifdef INCLUDE_XUL  else {    nsCOMPtr<nsIDOMXULDocument> xulDoc = do_QueryInterface(iDoc);    if (xulDoc) {      if (NS_FAILED(xulDoc->GetElementById(forId, getter_AddRefs(domElement))))        return PR_FALSE;    }  }#endif // INCLUDE_XUL  if (!domElement)    return PR_FALSE;  nsCOMPtr<nsIPresShell> shell = getter_AddRefs(iDoc->GetShellAt(0));  if (nsnull == shell)    return PR_FALSE;  nsCOMPtr<nsIFormControl> control = do_QueryInterface(domElement);  nsCOMPtr<nsIContent> controlContent = do_QueryInterface(domElement);  // Labels have to be linked to form controls  if (!control)    return PR_FALSE;  // buttons have implicit labels and we don't allow them to have explicit ones  PRBool returnValue = PR_FALSE;  PRInt32 type;  control->GetType(&type);  if (!IsButton(type)) {      nsIFrame* frame;    shell->GetPrimaryFrameFor(controlContent, &frame);    if (nsnull != frame) {      nsIFormControlFrame* fcFrame = nsnull;      nsresult result = frame->QueryInterface(kIFormControlFrameIID, (void**)&fcFrame);      if ((NS_OK == result) && (nsnull != fcFrame)) {        aResultFrame = fcFrame;        NS_RELEASE(fcFrame);        returnValue = PR_TRUE;      }    }  }  return returnValue;}