if (!*aDoingPrintPreview) { nsCOMPtr<nsIDocShellTreeItem> item(do_QueryInterface(mContainer)); nsCOMPtr<nsIContentViewer> viewer;  if (item) { nsCOMPtr<nsIDocShellTreeItem> parent; item->GetParent(getter_AddRefs(parent));  nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(parent));  if (docShell) { docShell->GetContentViewer(getter_AddRefs(viewer)); } }  nsCOMPtr<nsIWebBrowserPrint> wbp(do_QueryInterface(viewer));  if (wbp) { return wbp->GetDoingPrintPreview(aDoingPrintPreview); } }
DocumentViewerImpl::GetDoingPrintPreview(PRBool *aDoingPrintPreview){  NS_ENSURE_ARG_POINTER(aDoingPrintPreview);  *aDoingPrintPreview = mIsDoingPrintPreview;  return NS_OK;}