Bug 1287446: Check and add nsIPrintProgressParams and print progress listener separately in nsPrintEngine::ShowPrintProgress. r=tnikkel

MozReview-Commit-ID: GngheT4Mizd
This commit is contained in:
Bob Owen 2016-08-03 09:50:24 +01:00
parent 6ae2ecbc02
commit 5df096d268

View File

@ -1072,8 +1072,11 @@ nsPrintEngine::ShowPrintProgress(bool aIsForPrinting, bool& aDoNotify)
getter_AddRefs(mPrt->mPrintProgressParams),
&aDoNotify);
if (NS_SUCCEEDED(rv)) {
if (printProgressListener && mPrt->mPrintProgressParams) {
if (printProgressListener) {
mPrt->mPrintProgressListeners.AppendObject(printProgressListener);
}
if (mPrt->mPrintProgressParams) {
SetDocAndURLIntoProgress(mPrt->mPrintObject, mPrt->mPrintProgressParams);
}
}