Update PDF.js to new version 231c79800b4e0bb5b705353a98c7e8c8cff70393 from 2023-12-31 14:34:28
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox123 | --- | fixed |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: cNqEk1WBSriqnCc3PQe-Hg])
Attachments
(1 file)
This update covers 20 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/build/pdf.mjs | 65 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 36 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 4 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 6 +-
toolkit/components/pdfjs/content/web/viewer.css | 12 +-
toolkit/components/pdfjs/content/web/viewer.html | 6 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 331 ++++++-------
toolkit/components/pdfjs/moz.yaml | 4 +-
toolkit/locales/en-US/toolkit/pdfviewer/viewer.ftl | 3 +
10 files changed, 250 insertions(+), 221 deletions(-)
fea192fbf93060e5cdf577c8074ad6da0eb37319 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/fea192fbf93060e5cdf577c8074ad6da0eb37319
Authored: 2023-12-31 15:31:03 +0100
Committed: 2023-12-31 15:31:03 +0100
Bump the stable version in pdfjs.config
Files Modified:
- pdfjs.config
b1ca27016217b641f3287c33b31292fb67a2dffc by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/b1ca27016217b641f3287c33b31292fb67a2dffc
Authored: 2023-12-26 10:56:48 +0100
Committed: 2023-12-26 11:03:07 +0100
Remove the internal "secondarytoolbarreset" event and slightly re-factor the code
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.
Please note: This patch slightly reduces the size of the web/secondary_toolbar.js file.
Files Modified:
- web/secondary_toolbar.js
234b57bb45ac8be7d7b9866382db92781a0358eb by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/234b57bb45ac8be7d7b9866382db92781a0358eb
Authored: 2023-12-26 10:56:38 +0100
Committed: 2023-12-26 10:57:02 +0100
Remove the internal "toolbarreset" event and slightly re-factor the code
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.
Please note: This patch slightly reduces the size of the web/toolbar.js file.
Files Modified:
- web/toolbar.js
4e786f68bcc41fd1eb086d60b38311c16e07beaa by dependabot[bot]
https://github.com/mozilla/pdf.js/commit/4e786f68bcc41fd1eb086d60b38311c16e07beaa
Authored: 2023-12-25 12:11:47 +0000
Committed: 2023-12-25 12:11:47 +0000
Bump actions/deploy-pages from 3 to 4
Bumps actions/deploy-pages from 3 to 4.
updated-dependencies:
- dependency-name: actions/deploy-pages
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/publish_website.yml
f56d6802ad3e9a3a494c03873c713d58c8ef4858 by dependabot[bot]
https://github.com/mozilla/pdf.js/commit/f56d6802ad3e9a3a494c03873c713d58c8ef4858
Authored: 2023-12-25 12:11:44 +0000
Committed: 2023-12-25 12:11:44 +0000
Bump actions/upload-artifact from 3 to 4
Bumps actions/upload-artifact from 3 to 4.
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/publish_website.yml
0324187734e31e63ef5930d328a0d14127ac48b1 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/0324187734e31e63ef5930d328a0d14127ac48b1
Authored: 2023-12-23 12:32:00 +0100
Committed: 2023-12-23 12:32:00 +0100
Update l10n files
Files Modified:
- l10n/be/viewer.ftl
- l10n/br/viewer.ftl
- l10n/cs/viewer.ftl
- l10n/cy/viewer.ftl
- l10n/da/viewer.ftl
- l10n/de/viewer.ftl
- l10n/dsb/viewer.ftl
- l10n/el/viewer.ftl
- l10n/en-GB/viewer.ftl
- l10n/es-AR/viewer.ftl
- l10n/es-CL/viewer.ftl
- l10n/es-ES/viewer.ftl
- l10n/fi/viewer.ftl
- l10n/fr/viewer.ftl
- l10n/fur/viewer.ftl
- l10n/fy-NL/viewer.ftl
- l10n/gn/viewer.ftl
- l10n/he/viewer.ftl
- l10n/hsb/viewer.ftl
- l10n/hu/viewer.ftl
- l10n/ia/viewer.ftl
- l10n/is/viewer.ftl
- l10n/it/viewer.ftl
- l10n/ja/viewer.ftl
- l10n/ka/viewer.ftl
- l10n/kab/viewer.ftl
- l10n/kk/viewer.ftl
- l10n/ko/viewer.ftl
- l10n/nb-NO/viewer.ftl
- l10n/nl/viewer.ftl
- l10n/nn-NO/viewer.ftl
- l10n/pa-IN/viewer.ftl
- l10n/pl/viewer.ftl
- l10n/pt-BR/viewer.ftl
- l10n/rm/viewer.ftl
- l10n/ru/viewer.ftl
- l10n/sk/viewer.ftl
- l10n/sl/viewer.ftl
- l10n/sq/viewer.ftl
- l10n/sv-SE/viewer.ftl
- l10n/tg/viewer.ftl
- l10n/tr/viewer.ftl
- l10n/uk/viewer.ftl
- l10n/vi/viewer.ftl
- l10n/zh-CN/viewer.ftl
- l10n/zh-TW/viewer.ftl
3793a561166e1fb67244dec2609951c4015d0d15 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/3793a561166e1fb67244dec2609951c4015d0d15
Authored: 2023-12-23 12:29:51 +0100
Committed: 2023-12-23 12:29:51 +0100
Update npm packages
Files Modified:
- gulpfile.mjs
- package-lock.json
- package.json
9f02cc36d48d349011916ac1878dede898528934 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/9f02cc36d48d349011916ac1878dede898528934
Authored: 2023-12-14 21:57:48 +0100
Committed: 2023-12-21 21:26:21 +0100
Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up)
In PR 11912 we started caching images that occur on multiple pages globally, which improved performance a lot in many PDF documents.
However, one slightly annoying limitation of the implementation is the need to re-parse the image once the global-caching threshold has been reached. Previously this was difficult to avoid, since large image-resources will cause cleanup to run on the main-thread after rendering has finished. In PR 16108 we started delaying this cleanup a little bit, to improve performance if a user e.g. zooms and/or rotates the document immediately after rendering completes.
Taking those two PRs together, we now have a situation where it's much more likely that the main-thread has "globally used" images cached at the page-level. Hence we can instead attempt to copy a locally cached image into the global object-cache on the main-thread and thus reduce unnecessary re-parsing of large/complex global images, which significantly reduces the rendering time in many cases.
For the PDF document in issue 11878, the rendering time of the second page changes as follows (on my computer):
- With the
master-branch it takes >600 ms to render. - With this patch that goes down to ~50 ms, which is one order of magnitude faster.
(Note that all other pages are, as expected, completely unaffected by these changes.)
This new main-thread copying is limited to "large" global images, since:
- Re-parsing of small images, on the worker-thread, is usually fast enough to not be an issue.
- With the delayed cleanup after rendering, it's still not guaranteed that an image is available in a page-level cache on the main-thread.
- This forces the worker-thread to wait for the main-thread, which is a pattern that you always want to avoid unless absolutely necessary.
Files Modified:
- src/core/evaluator.js
- src/display/api.js
- test/unit/api_spec.js
e547b198a3e44b0198afe58ab74b0c7c74d8006a by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/e547b198a3e44b0198afe58ab74b0c7c74d8006a
Authored: 2023-12-14 21:32:08 +0100
Committed: 2023-12-21 21:26:21 +0100
Compute the length of the final image-bitmap/data on the worker-thread
Currently this is done in the API, but moving it into the worker-thread will simplify upcoming changes.
Files Modified:
- src/core/evaluator.js
- src/display/api.js
b09f238436237c5b7d2c058972cb268c0bc1c5af by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/b09f238436237c5b7d2c058972cb268c0bc1c5af
Authored: 2023-12-14 20:09:47 +0100
Committed: 2023-12-21 21:26:21 +0100
Add iteration support in the PDFObjects class
This (obviously) only includes "resolved" data, and will be used in an upcoming patch.
Files Modified:
- src/display/api.js
4d34107228b431029a18920d441e01c3aa411159 by Varun Patil
https://github.com/mozilla/pdf.js/commit/4d34107228b431029a18920d441e01c3aa411159
Authored: 2023-12-19 19:23:41 +0530
Committed: 2023-12-20 23:18:34 +0530
Prevent error in AnnotationEditorUIManager.destroy if altTextManager is null
Files Modified:
- src/display/editor/tools.js
82464294b9845d159b390686111c6d534cfeb030 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/82464294b9845d159b390686111c6d534cfeb030
Authored: 2023-12-19 10:01:16 +0100
Committed: 2023-12-19 10:01:16 +0100
Toggle the visibility of the outlineOptionsContainer, in the sidebar, using only CSS
Now that :has() is available we no longer need to use JavaScript to toggle the visibility of this DOM element.
Files Modified:
- web/pdf_sidebar.js
- web/viewer.css
- web/viewer.html
- web/viewer.js
933e107073b6e0ebd27660090f4a8bed4969d061 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/933e107073b6e0ebd27660090f4a8bed4969d061
Authored: 2023-12-18 15:01:19 +0100
Committed: 2023-12-18 15:01:19 +0100
Revert "Bump actions/upload-artifact from 3 to 4"
Files Modified:
- .github/workflows/publish_website.yml
25a0a68deff339faa6b5b4855ff9baa5ee611ef1 by dependabot[bot]
https://github.com/mozilla/pdf.js/commit/25a0a68deff339faa6b5b4855ff9baa5ee611ef1
Authored: 2023-12-18 12:39:30 +0000
Committed: 2023-12-18 12:39:30 +0000
Bump actions/upload-artifact from 3 to 4
Bumps actions/upload-artifact from 3 to 4.
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/publish_website.yml
2e82d947a61a2e929ff48204208105e3dcdd78af by dependabot[bot]
https://github.com/mozilla/pdf.js/commit/2e82d947a61a2e929ff48204208105e3dcdd78af
Authored: 2023-12-18 12:39:26 +0000
Committed: 2023-12-18 12:39:26 +0000
Bump github/codeql-action from 2 to 3
Bumps github/codeql-action from 2 to 3.
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
f9a0d4efe8290dcb857d87f0888044041200d027 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/f9a0d4efe8290dcb857d87f0888044041200d027
Authored: 2023-12-17 20:37:58 +0100
Committed: 2023-12-17 21:53:50 +0100
Modernize the rewriteWebArchiveUrl test helper function
This commit changes the code to use a template string and to use const
instead of var. Combined with the previous commits this allows for
enabling the ESLint no-var rule for this file now.
Files Modified:
- test/downloadutils.mjs
0a10a7b57b3aaa020283118e9f69c883dddc0863 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/0a10a7b57b3aaa020283118e9f69c883dddc0863
Authored: 2023-12-17 20:26:53 +0100
Committed: 2023-12-17 21:53:50 +0100
Modernize the downloadManifestFiles/ensurePDFsDownloaded test helper functions
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.
This commit:
- replaces the callback argument with returning a promise;
- replaces the recursive function calls with a simple loop;
- uses
const/letinstead ofvar; - uses arrow functions for shorter code;
- uses template strings for shorter string formatting code.
Files Modified:
- test/downloadutils.mjs
- test/test.mjs
86bee4409a51578503b548fad649a5b23ec50904 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/86bee4409a51578503b548fad649a5b23ec50904
Authored: 2023-12-17 20:11:23 +0100
Committed: 2023-12-17 21:53:50 +0100
Modernize the downloadFile test helper function
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.
This commit:
- replaces the callback argument with returning a promise;
- uses
constinstead ofvar; - uses arrow functions for shorter code;
- uses template strings for shorter string formatting code;
- uses
Array.includesfor shorter response code checking code.
Files Modified:
- test/downloadutils.mjs
12999127440201d177db1be106c40b741e501f39 by Jeremy Danyow
https://github.com/mozilla/pdf.js/commit/12999127440201d177db1be106c40b741e501f39
Authored: 2023-12-16 07:28:03 -0800
Committed: 2023-12-16 07:28:03 -0800
Center radio button checkmark
fixes #12238
Files Modified:
- web/annotation_layer_builder.css
eff8b2c67b9222d808f70ea37f19a5bdb839fd3d by Calixte Denizet
https://github.com/mozilla/pdf.js/commit/eff8b2c67b9222d808f70ea37f19a5bdb839fd3d
Authored: 2023-12-11 17:20:56 +0100
Committed: 2023-12-12 19:57:38 +0100
[Editor] Add some missing strings to localize for highlighting
Files Modified:
- l10n/en-US/viewer.ftl
- web/viewer.html
| Reporter | ||
Comment 2•2 years ago
|
||
| cNqEk1WBSriqnCc3PQe-Hg | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=1ef45d8de04adc8ad48f6b9bb3a196e3a69bedb0
| Reporter | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
| Reporter | ||
Comment 4•2 years ago
|
||
| EqClnzXCQMK9vc8glbLoaw | ||
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
Comment 6•2 years ago
|
||
| bugherder | ||
Description
•