Merge pull request #14894 from Snuffleupagus/rm-mozOpaque

Try to remove the `mozOpaque` canvas-property (PR 6551 follow-up)
This commit is contained in:
Tim van der Meij 2022-05-12 22:03:05 +02:00 committed by GitHub
commit fbc7981c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 34 deletions

View File

@ -730,12 +730,6 @@ class TextLayerRenderTask {
const canvas = this._document.createElement("canvas");
canvas.height = canvas.width = DEFAULT_FONT_SIZE;
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
canvas.mozOpaque = true;
}
this._layoutTextCtx = canvas.getContext("2d", { alpha: false });
if (this._textContent) {

View File

@ -607,7 +607,6 @@ class Driver {
this._log(
" Loading page " + task.pageNum + "/" + task.pdfDoc.numPages + "... "
);
this.canvas.mozOpaque = true;
ctx = this.canvas.getContext("2d", { alpha: false });
task.pdfDoc.getPage(task.pageNum).then(
page => {

View File

@ -783,13 +783,6 @@ class PDFPageView {
canvasWrapper.appendChild(canvas);
this.canvas = canvas;
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
canvas.mozOpaque = true;
}
const ctx = canvas.getContext("2d", { alpha: false });
const outputScale = (this.outputScale = new OutputScale());

View File

@ -51,13 +51,6 @@ class TempImageFactory {
// Since this is a temporary canvas, we need to fill it with a white
// background ourselves. `_getPageDrawContext` uses CSS rules for this.
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
tempCanvas.mozOpaque = true;
}
const ctx = tempCanvas.getContext("2d", { alpha: false });
ctx.save();
ctx.fillStyle = "rgb(255, 255, 255)";
@ -225,13 +218,6 @@ class PDFThumbnailView {
// Keep the no-thumbnail outline visible, i.e. `data-loaded === false`,
// until rendering/image conversion is complete, to avoid display issues.
const canvas = document.createElement("canvas");
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
canvas.mozOpaque = true;
}
const ctx = canvas.getContext("2d", { alpha: false });
const outputScale = new OutputScale();

View File

@ -261,12 +261,6 @@ class Toolbar {
// The temporary canvas is used to measure text length in the DOM.
let canvas = document.createElement("canvas");
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
canvas.mozOpaque = true;
}
let ctx = canvas.getContext("2d", { alpha: false });
await animationStarted;