PrintUtils.printPreview(enterPPCallback, exitPPCallback) where the optional callback functions are called just before entering and after exiting PP mode
- disable all short keys in PP mode except ctrl-W and fix bug 178485 and bug 215277. Now clicking the close window icon actually closes the window.
- global vars gPrintSettingsAreGlobal, gSavePrintSettings, gPrintSettings, gOldCloseHandler, gInPrintPreviewMode, gWebProgress are removed.
- A lot of cleanup.
- define an object PrintUtils that has two "public" methods: PrintUtils.print() to print the content and PrintUtils.showPageSetup() to launch the setup dialog.
- global variables gPrintSettings, gPrintSettingsAreGlobal and gSavePrintSettings are removed. These variables were not true cached variables since they were recalculated every time and only used as intermediary.