Bug 965693 - Remove annoying "Printing XUL documents is not supported" error dialog. r=roc

This commit is contained in:
Chris Peterson 2014-01-29 20:40:34 -08:00
parent cc70f90133
commit f6f08af0a0
5 changed files with 2 additions and 15 deletions

View File

@ -58,4 +58,3 @@ PERR_GFX_PRINTER_ENDDOC=Printing failed while completing the print job.
PERR_GFX_PRINTER_STARTPAGE=Printing failed while starting a new page.
PERR_GFX_PRINTER_DOC_IS_BUSY=Cannot print this document yet, it is still being loaded.
PERR_GFX_PRINTER_DOC_IS_BUSY_PP=Cannot print-preview this document yet, it is still being loaded.
PERR_GFX_PRINTER_NO_XUL=Printing XUL documents is not supported.

View File

@ -210,8 +210,6 @@ XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_STARTDOC , "Printing failed while s
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_ENDDOC , "Printing failed while completing the print job.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_STARTPAGE , "Printing failed while starting a new page.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY , "Cannot print this document yet, it is still being loaded.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_NO_XUL , "Printing XUL documents is not supported.") // bugs 136185 & 240490
/* Codes related to content */
XPC_MSG_DEF(NS_ERROR_CONTENT_CRASHED , "The process that hosted this content has crashed.")

View File

@ -3540,15 +3540,11 @@ NS_IMETHODIMP
nsDocumentViewer::Print(nsIPrintSettings* aPrintSettings,
nsIWebProgressListener* aWebProgressListener)
{
#ifdef MOZ_XUL
// Temporary code for Bug 136185 / Bug 240490
// Printing XUL documents is not supported.
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
if (xulDoc) {
nsPrintEngine::ShowPrintErrorDialog(NS_ERROR_GFX_PRINTER_NO_XUL);
return NS_ERROR_FAILURE;
}
#endif
if (!mContainer) {
PR_PL(("Container was destroyed yet we are still trying to use it!"));
@ -3655,15 +3651,12 @@ nsDocumentViewer::PrintPreview(nsIPrintSettings* aPrintSettings,
return NS_ERROR_FAILURE;
}
#ifdef MOZ_XUL
// Temporary code for Bug 136185 / Bug 240490
// Printing XUL documents is not supported.
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocument));
if (xulDoc) {
nsPrintEngine::CloseProgressDialog(aWebProgressListener);
nsPrintEngine::ShowPrintErrorDialog(NS_ERROR_GFX_PRINTER_NO_XUL, false);
return NS_ERROR_FAILURE;
}
#endif
nsCOMPtr<nsIDocShell> docShell(mContainer);
if (!docShell || !mDeviceContext) {

View File

@ -1558,7 +1558,6 @@ nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, bool aIsPrinting)
ENTITY_FOR_ERROR(GFX_PRINTER_ENDDOC);
ENTITY_FOR_ERROR(GFX_PRINTER_STARTPAGE);
ENTITY_FOR_ERROR(GFX_PRINTER_DOC_IS_BUSY);
ENTITY_FOR_ERROR(GFX_PRINTER_NO_XUL); // bug 136185 / bug 240490
ENTITY_FOR_ERROR(ABORT);
ENTITY_FOR_ERROR(NOT_AVAILABLE);

View File

@ -108,8 +108,6 @@
ERROR(NS_ERROR_GFX_PRINTER_STARTPAGE, FAILURE(6)),
/* The document is still being loaded */
ERROR(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY, FAILURE(7)),
/* Cannot Print or Print Preview XUL Documents (bug 136185 / bug 240490) */
ERROR(NS_ERROR_GFX_PRINTER_NO_XUL, FAILURE(8)),
/* Font cmap is strangely structured - avoid this font! */
ERROR(NS_ERROR_GFX_CMAP_MALFORMED, FAILURE(51)),