Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the disableCanvasToImageConversion functionality from PDFThumbnailView (PR 7029 follow-up) #13357

Conversation

Snuffleupagus
Copy link
Collaborator

This functionality was originally implemented in PR #7029; however it's not, nor has it ever been, used as far as I can tell.[1]
Note in particular that the default viewer does not expose either a preference or even an option with which disableCanvasToImageConversion can be toggled, and source-code modification is thus required.

Furthermore, note also that we have multiple other instances of canvas-data accesses in both the src/display/canvas.js and src/display/text_layer.js files. If any of those are blocked, by e.g. browser settings, there will be outright rendering bugs and non-working thumbnails thus seem like a very small issue in the grand scheme of things; hence why I'm suggesting that we remove the unused disableCanvasToImageConversion functionality.


[1] For the Tor use-case mentioned in issue #7026, I believe that the solution was to white-list canvas-data accesses for its built-in PDF Viewer.

…umbnailView` (PR 7029 follow-up)

This functionality was originally implemented in PR 7029; however it's not, nor has it ever been, used as far as I can tell.[1]
Note in particular that the default viewer does not expose either a preference or even an option with which `disableCanvasToImageConversion` can be toggled, and source-code modification is thus required.

Furthermore, note also that we have multiple other instances of `canvas`-data accesses in both the `src/display/canvas.js` and `src/display/text_layer.js` files. If any of those are blocked, by e.g. browser settings, there will be outright rendering bugs and non-working thumbnails thus seem like a very small issue in the grand scheme of things; hence why I'm suggesting that we remove the unused `disableCanvasToImageConversion` functionality.

---
[1] For the Tor use-case mentioned in issue 7026, I *believe* that the solution was to white-list `canvas`-data accesses for its built-in PDF Viewer.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented May 9, 2021

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/0044be66578f391/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 9, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0044be66578f391/output.txt

Total script time: 4.49 mins

Published

@timvandermeij timvandermeij merged commit 99eac86 into mozilla:master May 9, 2021
@timvandermeij
Copy link
Contributor

Looks like a good plan to me. Thanks!

@Snuffleupagus Snuffleupagus deleted the rm-disableCanvasToImageConversion branch May 9, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants