-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Change the PDFViewerApplication.open
method to only accept objects
#15972
Conversation
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/2d83cf37fc0d8c7/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/be505d39c006094/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/be505d39c006094/output.txt Total script time: 4.88 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/2d83cf37fc0d8c7/output.txt Total script time: 17.01 mins
|
37cb647
to
6129be7
Compare
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.
Thank you for doing this! |
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
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)
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.