  printPreview: function (aEnterPPCallback, aExitPPCallback, aWindow)  {    // if we're already in PP mode, don't set the callbacks; chances    // are they're null because someone is calling printPreview() to    // get us to refresh the display.    var pptoolbar = document.getElementById("print-preview-toolbar");    if (!pptoolbar) {      this._onEnterPP = aEnterPPCallback;      this._onExitPP  = aExitPPCallback;    } else {      // hide the toolbar here -- it will be shown in      // onEnterPrintPreview; this forces a reflow which fixes display      // issues in bug 267422.      pptoolbar.hidden = true;    }    this._webProgressPP = {};    var ppParams        = {};    var notifyOnOpen    = {};    var webBrowserPrint = this.getWebBrowserPrint(aWindow);    var printSettings   = this.getPrintSettings();    // Here we get the PrintingPromptService so we can display the PP Progress from script    // For the browser implemented via XUL with the PP toolbar we cannot let it be    // automatically opened from the print engine because the XUL scrollbars in the PP window    // will layout before the content window and a crash will occur.    // Doing it all from script, means it lays out before hand and we can let printing do it's own thing    var PPROMPTSVC = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"]                               .getService(Components.interfaces.nsIPrintingPromptService);    // just in case we are already printing,     // an error code could be returned if the Prgress Dialog is already displayed    try {      PPROMPTSVC.showProgress(this, webBrowserPrint, printSettings, this._obsPP, false,                              this._webProgressPP, ppParams, notifyOnOpen);      if (ppParams.value) {        var webNav = getBrowser().webNavigation;        ppParams.value.docTitle = webNav.document.title;        ppParams.value.docURL   = webNav.currentURI.spec;      }      // this tells us whether we should continue on with PP or       // wait for the callback via the observer      if (!notifyOnOpen.value.valueOf() || this._webProgressPP.value == null)        this.enterPrintPreview();    } catch (e) {      this.enterPrintPreview();    }  },
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/36d38a4df6b41a5fa9742ad2d6b59cd4ca82fe83/printUtils.js/buggy/toolkit/components/printing/content/printUtils.js