mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-22 16:05:56 +02:00
Remove the unused HTMLElement branch in the paintInlineImageXObject method
This branch isn't covered by any tests, and as far as I can tell it's been unused ever since PR 11601 which simplified the JPEG image handling. Prior to that we'd create an `Image` instance in one case, see [this code](https://github.com/mozilla/pdf.js/pull/11601/changes#diff-082d6b37ad01db7ac97cc07c6ddb0dc52040484c5ef91b110b072f50144d9f39L2312-L2314), which is why that branch was necessary since `new Image()` creates a `HTMLImageElement` instance which in itself is an instance of `HTMLElement`; note [this](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) respectively [this](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement).
This commit is contained in:
parent
3956ac1b39
commit
a443a635a1
@ -3996,12 +3996,6 @@ class CanvasGraphics {
|
||||
const result = this.applyTransferMapsToBitmap(imgData);
|
||||
imgToPaint = result.img;
|
||||
inlineImgCanvas = result.canvasEntry;
|
||||
} else if (
|
||||
(typeof HTMLElement === "function" && imgData instanceof HTMLElement) ||
|
||||
!imgData.data
|
||||
) {
|
||||
// typeof check is needed due to node.js support, see issue #8489
|
||||
imgToPaint = imgData;
|
||||
} else {
|
||||
const tmpCanvas = this.canvasFactory.create(width, height);
|
||||
putBinaryImageData(tmpCanvas.context, imgData);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user