rem: gInPrintPreviewMode = true; 
add: var ifreq; var webBrowserPrint; try { ifreq = _content.QueryInterface(Components.interfaces.nsIInterfaceRequestor); webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint); gPrintSettings = GetPrintSettings(); 
context: function BrowserPrintPreview(){  gInPrintPreviewMode = true;  var browser = getBrowser();  browser.setAttribute("handleCtrlPageUpDown", "false");  var mainWin = document.getElementById("main-window");  // save previous close handler to restoreon exiting print preview mode  if (mainWin.hasAttribute("onclose"))    gOldCloseHandler = mainWin.getAttribute("onclose");  else    gOldCloseHandler = null;  mainWin.setAttribute("onclose", "BrowserExitPrintPreview(); return false;");   try {    var ifreq = _content.QueryInterface(      Components.interfaces.nsIInterfaceRequestor);    var webBrowserPrint = ifreq.getInterface(      Components.interfaces.nsIWebBrowserPrint);         if (webBrowserPrint) {      gPrintSettings = GetPrintSettings();      webBrowserPrint.printPreview(gPrintSettings, null, null);    }    // show the toolbar after we go into print preview mode so    // that we can initialize the toolbar with total num pages    showPrintPreviewToolbar();    _content.focus();  } catch (e) {    // Pressing cancel is expressed as an NS_ERROR_ABORT return value,    // causing an exception to be thrown which we catch here.    // Unfortunately this will also consume helpful failures, so add a    // dump(e); // if you need to debug  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0a08c632e835cdf2d5a8f294ba55bf908bc10664/browser.js/clean/xpfe/browser/resources/content/browser.js