Merge pull request #15459 from calixteman/1774427
Don't use window.print in the Firefox builtin viewer (bug 1774427)
This commit is contained in:
commit
bf78ccac30
@ -152,6 +152,10 @@ class DefaultExternalServices {
|
|||||||
|
|
||||||
static reportTelemetry(data) {}
|
static reportTelemetry(data) {}
|
||||||
|
|
||||||
|
static print() {
|
||||||
|
window.print();
|
||||||
|
}
|
||||||
|
|
||||||
static createDownloadManager(options) {
|
static createDownloadManager(options) {
|
||||||
throw new Error("Not implemented: createDownloadManager");
|
throw new Error("Not implemented: createDownloadManager");
|
||||||
}
|
}
|
||||||
@ -1897,7 +1901,7 @@ const PDFViewerApplication = {
|
|||||||
if (!this.supportsPrinting) {
|
if (!this.supportsPrinting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.print();
|
this.externalServices.print();
|
||||||
},
|
},
|
||||||
|
|
||||||
bindEvents() {
|
bindEvents() {
|
||||||
|
@ -402,6 +402,10 @@ class FirefoxExternalServices extends DefaultExternalServices {
|
|||||||
FirefoxCom.request("updateEditorStates", data);
|
FirefoxCom.request("updateEditorStates", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static print() {
|
||||||
|
FirefoxCom.request("print", null);
|
||||||
|
}
|
||||||
|
|
||||||
static createL10n(options) {
|
static createL10n(options) {
|
||||||
const mozL10n = document.mozL10n;
|
const mozL10n = document.mozL10n;
|
||||||
// TODO refactor mozL10n.setExternalLocalizerServices
|
// TODO refactor mozL10n.setExternalLocalizerServices
|
||||||
|
Loading…
Reference in New Issue
Block a user