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

Change the PDFViewerApplication.open method to only accept objects #15972

Conversation

Snuffleupagus
Copy link
Collaborator

If this method was added today, I really can't imagine that we'd support anything except objects. Unfortunately we cannot just remove this now, since the code has existed since "forever", however we can deprecate this and limit it to only the GENERIC build.

Furthermore, we can avoid a redundant PDFViewerApplication.setTitleUsingUrl call in the Firefox PDF Viewer since the title has already been set previously in that case.

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/2d83cf37fc0d8c7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/be505d39c006094/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/be505d39c006094/output.txt

Total script time: 4.88 mins

  • Integration Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/2d83cf37fc0d8c7/output.txt

Total script time: 17.01 mins

  • Integration Tests: FAILED

web/app.js Outdated Show resolved Hide resolved
@Snuffleupagus Snuffleupagus force-pushed the PDFViewerApplication-open-signature branch 3 times, most recently from 37cb647 to 6129be7 Compare January 28, 2023 17:55
If this method was added today, I really can't imagine that we'd support anything *except* objects. Unfortunately we cannot just remove this now, since the code has existed since "forever", however we can deprecate this and limit it to only the GENERIC build.

Furthermore, we can avoid a redundant `PDFViewerApplication.setTitleUsingUrl` call in the Firefox PDF Viewer since the title has already been set previously in that case.
@timvandermeij timvandermeij merged commit 5620456 into mozilla:master Jan 28, 2023
@timvandermeij
Copy link
Contributor

Thank you for doing this!

@Snuffleupagus Snuffleupagus deleted the PDFViewerApplication-open-signature branch January 29, 2023 14:31
The-Compiler added a commit to qutebrowser/qutebrowser that referenced this pull request Mar 14, 2023
A quick tour through the PDF.js API:

v1.0.1040 introduced the ability to pass an object to PDFView.open()
instead of passing an URL:
mozilla/pdf.js#5254

v1.6.210 (?) renamed PDFView to PDFViewerApplication:
ffa276a

v3.3.122 made it mandatory to pass an object (and also made originalURL
optional when doing so):
mozilla/pdf.js#15972

We should probably properly get rid of old version support at some point
(see #7619), but until then, I *think* this approach should work with
older versions still.

Fixes #7618
The-Compiler added a commit to qutebrowser/qutebrowser that referenced this pull request Mar 14, 2023
A quick tour through the PDF.js API:

v1.0.1040 introduced the ability to pass an object to PDFView.open()
instead of passing an URL:
mozilla/pdf.js#5254

v1.6.210 (?) renamed PDFView to PDFViewerApplication:
ffa276a

v3.3.122 made it mandatory to pass an object (and also made originalURL
optional when doing so):
mozilla/pdf.js#15972

We should probably properly get rid of old version support at some point
(see #7619), but until then, I *think* this approach should work with
older versions still.

Fixes #7618

(cherry picked from commit 924a7a5)
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.

3 participants