mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 07:40:42 +00:00
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:
parent
27bb5a7ac9
commit
f02efd4826
@ -409,6 +409,7 @@ class PrintingChild extends ActorChild {
|
||||
cv.QueryInterface(Ci.nsIWebBrowserPrint);
|
||||
this.mm.sendAsyncMessage("Printing:Preview:UpdatePageCount", {
|
||||
numPages: cv.printPreviewNumPages,
|
||||
totalPages: cv.rawNumPages,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ var PrintEventHandler = {
|
||||
}
|
||||
|
||||
function onUpdatePageCount(msg) {
|
||||
numPages = msg.data.numPages;
|
||||
numPages = msg.data.totalPages;
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user