mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[GeckoView] Bundle the Firefox printing code in the viewer (bug 1810111)
This may not be enough, on its own, to completely fix [bug 1810111](https://bugzilla.mozilla.org/show_bug.cgi?id=1810111) however it's impossible for printing to work in GeckoView without this patch.
This commit is contained in:
parent
0ad5a5551a
commit
e77c7f336d
5 changed files with 67 additions and 3 deletions
|
@ -289,6 +289,9 @@ function abort() {
|
|||
}
|
||||
|
||||
function renderProgress(index, total, l10n) {
|
||||
if (typeof PDFJSDev === "undefined" && window.isGECKOVIEW) {
|
||||
return;
|
||||
}
|
||||
dialog ||= document.getElementById("printServiceDialog");
|
||||
const progress = Math.round((100 * index) / total);
|
||||
const progressBar = dialog.querySelector("progress");
|
||||
|
@ -333,6 +336,11 @@ if ("onbeforeprint" in window) {
|
|||
|
||||
let overlayPromise;
|
||||
function ensureOverlay() {
|
||||
if (typeof PDFJSDev === "undefined" && window.isGECKOVIEW) {
|
||||
return Promise.reject(
|
||||
new Error("ensureOverlay not implemented in GECKOVIEW development mode.")
|
||||
);
|
||||
}
|
||||
if (!overlayPromise) {
|
||||
overlayManager = PDFViewerApplication.overlayManager;
|
||||
if (!overlayManager) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue