if (mPrt && mPrt->mPrintObject) { PrintObject* po = FindPrintObjectByDOMWin(mPrt->mPrintObject, aDOMWin); iFrameIsSelected = po && po->mFrameType == eIFrame; } else {  if (!aIsParentFrameSet) {    if (aDOMWin != nsnull) {   nsCOMPtr<nsIDOMWindowInternal> domWin = getter_AddRefs(GetDOMWinForWebShell(aWebShell)); if (aDOMWin != nsnull && domWin != aDOMWin) { iFrameIsSelected = PR_TRUE; }
DocumentViewerImpl::IsThereAnIFrameSelected(nsIWebShell*           aWebShell,                                            nsIDOMWindowInternal * aDOMWin,                                            PRPackedBool&          aIsParentFrameSet){  aIsParentFrameSet = IsParentAFrameSet(aWebShell);  PRBool iFrameIsSelected = PR_FALSE;#if 1  PrintObject* po = FindPrintObjectByDOMWin(mPrt->mPrintObject, aDOMWin);  iFrameIsSelected = po && po->mFrameType == eIFrame;#else  // First, check to see if we are a frameset  if (!aIsParentFrameSet) {    // Check to see if there is a currenlt focused frame    // if so, it means the selected frame is either the main webshell    // or an IFRAME    if (aDOMWin != nsnull) {      // Get the main webshell's DOMWin to see if it matches      // the frame that is selected      nsCOMPtr<nsIDOMWindowInternal> domWin = getter_AddRefs(GetDOMWinForWebShell(aWebShell));      if (aDOMWin != nsnull && domWin != aDOMWin) {        iFrameIsSelected = PR_TRUE; // we have a selected IFRAME      }    }  }#endif  return iFrameIsSelected;}