Bug 1660908 - Use rawNumPages rather than printPreviewNumPages for the total number of pages. r=emalysz,dholbert

Differential Revision: https://phabricator.services.mozilla.com/D88223
This commit is contained in:
Sam Foster 2020-08-27 05:10:16 +00:00
parent 27bb5a7ac9
commit f02efd4826
3 changed files with 5 additions and 4 deletions

View File

@ -409,6 +409,7 @@ class PrintingChild extends ActorChild {
cv.QueryInterface(Ci.nsIWebBrowserPrint);
this.mm.sendAsyncMessage("Printing:Preview:UpdatePageCount", {
numPages: cv.printPreviewNumPages,
totalPages: cv.rawNumPages,
});
}

View File

@ -359,7 +359,7 @@ var PrintEventHandler = {
}
function onUpdatePageCount(msg) {
numPages = msg.data.numPages;
numPages = msg.data.totalPages;
}
function cleanup() {

View File

@ -447,9 +447,9 @@ customElements.define(
receiveMessage(message) {
if (message.name == "Printing:Preview:UpdatePageCount") {
let numPages = message.data.numPages;
this.mTotalPages.value = numPages;
this.mPageTextBox.max = numPages;
let totalPages = message.data.totalPages;
this.mTotalPages.value = totalPages;
this.mPageTextBox.max = totalPages;
}
}
},