this->FindFocusedWebShell(&mCurFocusFrame);
nsCOMPtr<nsIDOMWindowInternal> curFocusDOMWin = getter_AddRefs(FindFocusedDOMWindowInternal()); nsCOMPtr<nsIDOMWindow> domWin(do_QueryInterface(curFocusDOMWin));
void DocumentViewerImpl::DocumentReadyForPrinting(){nsCOMPtr<nsIWebShell> webContainer;  webContainer = do_QueryInterface(mContainer);  if(webContainer) {    //    // Remove ourselves as an image group observer...    //    nsCOMPtr<nsIImageGroup> imageGroup;    mPrintPC->GetImageGroup(getter_AddRefs(imageGroup));    if (imageGroup) {      imageGroup->RemoveObserver(this);    }    this->FindFocusedWebShell(&mCurFocusFrame);    //    // Send the document to the printer...    //    nsresult rv = PrintContent(webContainer, mPrintDC);    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "bad result from PrintConent");    // printing is complete, clean up now    mIsPrinting = PR_FALSE;    mPrintPS->EndObservingDocument();      if (mPrintListener)      mPrintListener->OnEndPrinting(NS_OK);    NS_IF_RELEASE(mCurFocusFrame);    NS_RELEASE(mPrintPS);    NS_RELEASE(mPrintVM);    NS_RELEASE(mPrintSS);    NS_RELEASE(mPrintDC);    NS_IF_RELEASE(mSelectionDoc);      }}