Update PDF.js to new version f9ff613e56dca65b95ce9e10d13350008b523979 from 2024-06-21 14:13:54
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert, Whiteboard: [3pl-filed][task_id: LrV4muGRTAKqqvNIOrbrQA])
Attachments
(1 file)
This update covers 42 commits. Here are the overall diff statistics, and then the commit information.
taskcluster/kinds/fetch/toolchains.yml | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 508 ++++++---
toolkit/components/pdfjs/content/build/pdf.sandbox.external.sys.mjs | 3 +
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 23 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 152 ++-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 4 +
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 63 +-
toolkit/components/pdfjs/content/web/viewer.css | 6 +
toolkit/components/pdfjs/content/web/viewer.mjs | 63 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
10 files changed, 559 insertions(+), 269 deletions(-)
1480e6778bc77783c94a36f155372d05bcda3d15 by Nicolò Ribaudo <nribaudo@igalia.com>
https://github.com/mozilla/pdf.js/commit/1480e6778bc77783c94a36f155372d05bcda3d15
Authored: 2024-06-19 12:47:19 +0200
Committed: 2024-06-21 15:42:31 +0200
Use the new formatted issue templates
Files Added:
- .github/ISSUE_TEMPLATE/bug.yml
- .github/ISSUE_TEMPLATE/config.yml
- .github/ISSUE_TEMPLATE/feature.yml
Files Deleted:
- .github/ISSUE_TEMPLATE.md
890c567eca9e08b338aaa7f91ef7467354547760 by bootleq <bootleq@gmail.com>
https://github.com/mozilla/pdf.js/commit/890c567eca9e08b338aaa7f91ef7467354547760
Authored: 2024-06-20 16:24:45 +0800
Committed: 2024-06-21 13:12:59 +0800
Expose entireWord in updateFindControlState
Allow apps with supportsIntegratedFind to better monitor the find state.
A recognized use case is the Firefox findbar, its "not found" sound must
consider entireWord
and only make noise when it is off.
See related implementation in
https://hg.mozilla.org/mozilla-central/rev/16b902cbcf26
This change can help if we have to move the implementation from cpp to jsm.
Files Modified:
- test/unit/pdf_find_controller_spec.js
- web/app.js
- web/pdf_find_controller.js
8c9a665728aa88cde5cc1e692963112e6932ddd8 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/8c9a665728aa88cde5cc1e692963112e6932ddd8
Authored: 2024-06-20 15:30:56 +0200
Committed: 2024-06-20 15:33:34 +0200
Always use DW if it's a number for the font default width (bug 1903731)
Files Added:
- test/pdfs/bug1903731.pdf.link
Files Modified:
- src/core/evaluator.js
- test/test_manifest.json
67f9756fcec353893707df94c71792cba02de7a2 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/67f9756fcec353893707df94c71792cba02de7a2
Authored: 2024-06-19 17:20:42 +0200
Committed: 2024-06-20 13:52:58 +0200
[Editor] Correctly set the accessibility data when copying & pasting a stamp with an alt text (bug 1903589)
Files Modified:
- src/display/editor/editor.js
- test/integration/stamp_editor_spec.mjs
- test/integration/test_utils.mjs
3fae2d71f624187f6fd3eb4fb2dbd40c7fd1ffef by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/3fae2d71f624187f6fd3eb4fb2dbd40c7fd1ffef
Authored: 2024-06-20 12:50:22 +0200
Committed: 2024-06-20 13:03:17 +0200
Don't throw if there's not enough data to get the header in FlateStream
(issue 18298)
Following in the footsteps of PR 17340.
Files Added:
- test/pdfs/issue18298.pdf.link
Files Modified:
- src/core/flate_stream.js
- test/test_manifest.json
02c03154b354f58e07d9bad8cf279c14a8f99b29 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/02c03154b354f58e07d9bad8cf279c14a8f99b29
Authored: 2024-06-20 11:51:21 +0200
Committed: 2024-06-20 11:51:21 +0200
Close PDFFindBar
when closing the viewer during testing
By closing PDFFindBar
we also disconnect the ResizeObserver
, since we've seen at least one case where that's running during shutdown: http://54.193.163.58:8877/91c40554d1b07c0/output.txt
Files Modified:
- web/app.js
7d7ae34e34f4b8863277e1e5170032d00ba83ab5 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/7d7ae34e34f4b8863277e1e5170032d00ba83ab5
Authored: 2024-06-20 10:52:28 +0200
Committed: 2024-06-20 10:52:28 +0200
[Editor] Don't create an observer for the stamp annotation after the viewer has been closed
Files Modified:
- src/display/editor/stamp.js
- test/integration/stamp_editor_spec.mjs
de23bb9b82b5d63cd591caeddbc96ed13e4827ef by Nicolò Ribaudo <nribaudo@igalia.com>
https://github.com/mozilla/pdf.js/commit/de23bb9b82b5d63cd591caeddbc96ed13e4827ef
Authored: 2024-06-07 14:08:43 +0200
Committed: 2024-06-19 15:23:16 +0200
Respect maxCanvasPixels
when computing canvas dimensions
Ensure that we never round the canvas dimensions above maxCanvasPixels
by rounding them to the preceeding multiple of the display ratio rather
than the succeeding one.
Files Modified:
- test/integration/viewer_spec.mjs
- web/pdf_page_view.js
- web/ui_utils.js
12692d2e393bff3946131cc07fb89786ff59cd15 by Nicolò Ribaudo <nribaudo@igalia.com>
https://github.com/mozilla/pdf.js/commit/12692d2e393bff3946131cc07fb89786ff59cd15
Authored: 2024-06-07 13:44:22 +0200
Committed: 2024-06-19 15:22:53 +0200
Add test for CSS-only zoom above maxCanvasPixels
This commit introduces a test to ensure that:
- When zooming below the maxCanvasPixels limit, the canvas is rendered
with the correct size (the two sides are multiplied by the zoom factor). - When zooming above the maxCanvasPixels limit, the canvas size is capped.
Files Modified:
- test/integration/test_utils.mjs
- test/integration/viewer_spec.mjs
c771ac81cd5d4cfca7b246d216af6db8b419e989 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/c771ac81cd5d4cfca7b246d216af6db8b419e989
Authored: 2024-06-19 07:45:34 +0200
Committed: 2024-06-19 13:48:08 +0200
Add a new helper, in the viewer, to close everything during testing
This has two advantages, as far as I'm concerned:
- The tests don't need to manually invoke multiple functions to properly clean-up, which reduces the risk of missing something.
- By collecting all the relevant clean-up in one method, rather than spreading it out, we get a much better overview of exactly what is being reset.
Files Modified:
- test/integration/test_utils.mjs
- web/app.js
df058edf2283c5c0fa255a5db5cb45b089a8c3d6 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/df058edf2283c5c0fa255a5db5cb45b089a8c3d6
Authored: 2024-06-19 12:21:10 +0200
Committed: 2024-06-19 12:21:10 +0200
Update the regular expression in tweakWebpackOutput
to support minified-legacy builds (issue 18290)
Files Modified:
- gulpfile.mjs
390afcb6851e0d54820ce205cfe2f43163f18335 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/390afcb6851e0d54820ce205cfe2f43163f18335
Authored: 2024-06-18 21:05:26 +0200
Committed: 2024-06-19 10:33:52 +0200
[Editor] Remove the various listeners when destroying the editor manager
Files Modified:
- src/display/editor/alt_text.js
- src/display/editor/annotation_editor_layer.js
- src/display/editor/color_picker.js
- src/display/editor/editor.js
- src/display/editor/freetext.js
- src/display/editor/highlight.js
- src/display/editor/ink.js
- src/display/editor/stamp.js
- src/display/editor/toolbar.js
- src/display/editor/tools.js
4bdbf4bb3d258d55937f380bec0bd48641afda3c by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4bdbf4bb3d258d55937f380bec0bd48641afda3c
Authored: 2024-06-18 22:30:21 +0200
Committed: 2024-06-18 22:30:21 +0200
Avoid to call a function in the js sandbox when it has been destroyed
Files Modified:
- src/pdf.sandbox.external.js
58dd289971bdc25bbfa717db3e1142c6f7d64ea6 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/58dd289971bdc25bbfa717db3e1142c6f7d64ea6
Authored: 2024-06-18 18:37:32 +0200
Committed: 2024-06-18 21:49:38 +0200
Upgrade eslint-plugin-unicorn
to version 54.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v54.0.0
doesn't indicate any breaking changes that should impact us.
Files Modified:
- package-lock.json
- package.json
c77dbe04966111b8b80383e8befa8d4f9438a346 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/c77dbe04966111b8b80383e8befa8d4f9438a346
Authored: 2024-06-18 18:36:21 +0200
Committed: 2024-06-18 21:49:34 +0200
Update dependencies to the most recent versions
Files Modified:
- package-lock.json
- package.json
34389d4e47c3bfdd1e26b9aca3be4501dcdfe792 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/34389d4e47c3bfdd1e26b9aca3be4501dcdfe792
Authored: 2024-06-18 19:27:45 +0200
Committed: 2024-06-18 21:08:47 +0200
Pause l10n (i.e. disconnect the mutation observer in fluent) when closing the viewer
Files Modified:
- web/app.js
9e811b97b12a1f9722a058ba2f009566fe30fbb9 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/9e811b97b12a1f9722a058ba2f009566fe30fbb9
Authored: 2024-06-18 20:05:11 +0200
Committed: 2024-06-18 20:05:11 +0200
Don't save modified documents, when running tests, upon closing the viewer (issue 18274)
Files Modified:
- web/app.js
acf8600a3d3fb49ba2a108eef12d8248900371cc by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/acf8600a3d3fb49ba2a108eef12d8248900371cc
Authored: 2024-06-18 17:55:55 +0200
Committed: 2024-06-18 18:44:29 +0200
[Editor] Set the canvas in the stamp editor at the right position in odd spread mode
Files Modified:
- test/integration/stamp_editor_spec.mjs
- web/annotation_editor_layer_builder.css
- web/app.js
4cc77f1470754a01f0f6aa1f2897c69afc43896d by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4cc77f1470754a01f0f6aa1f2897c69afc43896d
Authored: 2024-06-18 18:29:25 +0200
Committed: 2024-06-18 18:29:25 +0200
[Editor] Fix intermittent failure in integration test when highlighting with the keyboard
Files Modified:
- test/integration/highlight_editor_spec.mjs
3c02dc6d1d93955ada6888252f01d11714f6468c by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/3c02dc6d1d93955ada6888252f01d11714f6468c
Authored: 2024-06-16 20:52:38 +0200
Committed: 2024-06-18 18:03:26 +0200
Enable dumpio when running the tests in order to have some useful debug data
Files Modified:
- test/test.mjs
604e8977e9432dbae55ba375c01ed0bed7c25932 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/604e8977e9432dbae55ba375c01ed0bed7c25932
Authored: 2024-06-18 17:01:30 +0200
Committed: 2024-06-18 17:20:40 +0200
Add a helper function for handling locally cached image data (PR 18269 follow-up)
This avoids having to duplicate the same exact code multiple times.
Files Modified:
- src/core/evaluator.js
43be717ce3a8f07cc15b62201071e4e56235a80e by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/43be717ce3a8f07cc15b62201071e4e56235a80e
Authored: 2024-06-18 14:02:46 +0200
Committed: 2024-06-18 14:23:19 +0200
Clean up before closing the tab in integration tests
Files Modified:
- test/integration/test_utils.mjs
- web/app.js
22ca7d52d397e27ede742f4a6a2b7966a8b2c7a5 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/22ca7d52d397e27ede742f4a6a2b7966a8b2c7a5
Authored: 2024-06-18 11:25:27 +0200
Committed: 2024-06-18 12:25:53 +0200
Ensure that dependencies are added to the operatorList for locally cached images (issue 18259)
Files Modified:
- src/core/evaluator.js
0981716bfa61785dde7a12e0b8825da0e6fab5a6 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/0981716bfa61785dde7a12e0b8825da0e6fab5a6
Authored: 2024-06-18 11:54:49 +0200
Committed: 2024-06-18 11:54:49 +0200
Only use the l10n fallback bundle when normal ftl-file fetching failed (issue 18264)
Files Modified:
- web/genericl10n.js
44e0fae9d1bb03469fe2758b3d387dc54079f182 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/44e0fae9d1bb03469fe2758b3d387dc54079f182
Authored: 2024-06-16 16:51:56 +0200
Committed: 2024-06-16 20:32:55 +0200
Implement reproducibility for the release builds
The release builds are currently not reproducible because ZIP files
record the modification date of files generated during the build
process, meaning that two builds from identical source code, made
at different times, result in different output.
This is undesirable because it makes detecting differences in the output
harder, for instance recently during the Gulp 5 efforts, because the
modification date differences are irrelevant and could obscure actually
important differences in the output during e.g. code changes. Moreover,
reprodicibility of build artifacts has become increasingly important;
please refer to the Reproducible Builds initiative at
https://reproducible-builds.org (note the "Why does it matter?" section
specifically) and https://reproducible-builds.org/docs/timestamps which
further explains the problem of timestamps in build artifacts.
This commit fixes the issue by configuring the ZIP file creation to use
the (fixed) date of the last Git commit for which the release is being
made. With this the build is fully reproducible so that identical source
code builds result in bit-by-bit identical output artifacts.
To improve readability we convert the compression method to take a
parameter object and use template strings where useful.
Files Modified:
- gulpfile.mjs
7255b75ee97ed243fe299cfd0dd5f1d6e0d90795 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/7255b75ee97ed243fe299cfd0dd5f1d6e0d90795
Authored: 2024-06-16 19:05:21 +0200
Committed: 2024-06-16 19:05:26 +0200
Update jpx decoder
The decoder has been updated to reduce the number of copies after
having decoded an image:
https://github.com/mozilla/pdf.js.openjpeg/commit/b4ba3b3090347e5efe663f60d61e49f278bfc283
Files Modified:
- external/openjpeg/openjpeg.js
9d0002555df08addf99a058519bd8ce692ab8683 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/9d0002555df08addf99a058519bd8ce692ab8683
Authored: 2024-06-16 14:47:06 +0200
Committed: 2024-06-16 15:10:34 +0200
Implement reproducibility for the JSDoc builds
The JSDoc builds are currently not reproducible because a timestamp is
included in the output, meaning that two builds from identical source
code, made at different times, result in different output.
This is undesirable because it makes diffing the output difficult, for
instance recently during the Gulp 5 efforts, because the timestamp
differences are irrelevant and could obscure actually important
differences in the output during e.g. code changes. Moreover,
reprodicibility of build artifacts has become increasingly important;
please refer to the Reproducible Builds initiative at
https://reproducible-builds.org (note the "Why does it matter?" section
specifically) and https://reproducible-builds.org/docs/timestamps which
further explains the problem of timestamps in build artifacts.
This commit fixes the issue by configuring JSDoc to not include the
timestamps in the output. It's not relevant for end users and without it
the build is fully reproducible so that identical source code builds
result in bit-by-bit identical output artifacts.
Note that this option sadly can only be set via a configuration file,
and not via the command line parameters like we used to have, so for
consistency we also move the other options into the configuration file
so they are all in one place and the Gulpfile becomes a bit simpler.
Files Added:
- jsdoc.json
Files Modified:
- gulpfile.mjs
52a06e64f622978993c0ac8691861862faf0bda8 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/52a06e64f622978993c0ac8691861862faf0bda8
Authored: 2024-06-16 12:13:15 +0200
Committed: 2024-06-16 12:14:33 +0200
Only disable HWA in m-c build and for local dev
This way, we keep pdf.js working as before except for Firefox.
Files Modified:
- extensions/chromium/preferences_schema.json
- web/app_options.js
f4912db2ae58cec0c2e9b6e302f0ae6e6c15d252 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/f4912db2ae58cec0c2e9b6e302f0ae6e6c15d252
Authored: 2024-06-15 17:45:38 +0200
Committed: 2024-06-15 18:00:18 +0200
Remove the _ensureDownloadComplete
helper method in web/app.js
After the previous commit this method has only a single call-site, hence we can inline the needed part of that check directly in PDFViewerApplication.download
instead.
Files Modified:
- web/app.js
7c5e9cf8be1c833ecaafbe963959755a53b6556e by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/7c5e9cf8be1c833ecaafbe963959755a53b6556e
Authored: 2024-06-15 17:39:59 +0200
Committed: 2024-06-15 17:58:58 +0200
Ensure that saving, in the viewer, works for partially loaded documents
Currently saving a modified PDF document may fail intermittently, if it's triggered before the entire document has been downloaded.
When saving was originally added we only supported forms, and such PDF documents are usually small/simple enough for this issue to be difficult to trigger. However, with editing-support now available as well it's possible to modify much larger documents and this issue thus becomes easier to trigger.
One way to reproduce this issue consistently is to:
- Open http://localhost:8888/web/viewer.html?file=/test/pdfs/pdf.pdf#disableHistory=true&disableStream=true&disableAutoFetch=true
- Add an annotation on the first page, it doesn't matter what kind.
- Save the document.
- Open the resulting document, and notice that with the
master
branch the annotation is missing.
Files Modified:
- web/app.js
d1452206d9a381a10bc7ccc48bdfb489fb810f0e by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/d1452206d9a381a10bc7ccc48bdfb489fb810f0e
Authored: 2024-06-15 17:43:58 +0200
Committed: 2024-06-15 17:51:34 +0200
Compute correctly the unitsPerEm value from the fontMatrix when converting a font (bug 1539074)
Files Added:
- test/pdfs/bug1539074.pdf
Files Modified:
- src/core/fonts.js
- test/pdfs/.gitignore
- test/test_manifest.json
e30dda526148bcc128b50a4cbd0754dbd7f64e79 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/e30dda526148bcc128b50a4cbd0754dbd7f64e79
Authored: 2024-06-15 15:11:37 +0200
Committed: 2024-06-15 15:13:01 +0200
Include the generated API documentation directly on the API page
This should make the API documentation slightly quicker to access for
users by removing an extra click. Moreover, it makes the API
documentation blend in with the rest of the website/theme (one of the
points in #6526).
Fixes #18249.
Files Modified:
- docs/contents/api/index.md
- docs/contents/css/main.css
f3f88eecb447bd33d1c0040954c649f3f6565b50 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/f3f88eecb447bd33d1c0040954c649f3f6565b50
Authored: 2024-06-15 13:48:41 +0200
Committed: 2024-06-15 14:35:32 +0200
Use an AbortController
to remove the temporary "error" handler for the worker
Files Modified:
- src/display/api.js
2d0e08f1c86e8ced259bf175e7ee48580dfd843c by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/2d0e08f1c86e8ced259bf175e7ee48580dfd843c
Authored: 2024-06-15 13:37:04 +0200
Committed: 2024-06-15 14:35:30 +0200
Introduce a helper method for resolving the PDFWorker
promise
This avoids having to repeat the same code multiple times, since besides resolving the promise we also need to send the "configure" message to the worker-thread.
Files Modified:
- src/display/api.js
8d4456172b795d61ff4dcfbf8d7cbad87e78856f by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/8d4456172b795d61ff4dcfbf8d7cbad87e78856f
Authored: 2024-06-15 13:25:51 +0200
Committed: 2024-06-15 14:35:28 +0200
Reduce duplication when handling the "test" message from the worker
The feature-testing on the worker-thread has been simplified in previous pull requests, which means that we can simplify this main-thread handler as well.
Files Modified:
- src/display/api.js
0a36b667e4ddb5c5e9b3ba0589f9e0ba9905d02f by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/0a36b667e4ddb5c5e9b3ba0589f9e0ba9905d02f
Authored: 2024-06-15 13:17:55 +0200
Committed: 2024-06-15 14:35:12 +0200
Use an early return in PDFWorker.prototype._initialize
when workers are disabled
This helps reduce overall indentation in the method, thus leading to slightly less code.
Also, remove an old comment referring to Chrome 15 since that's no longer relevant now.
Files Modified:
- src/display/api.js
d6612b34274e88e72b699d62093d25cc53ca91f2 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/d6612b34274e88e72b699d62093d25cc53ca91f2
Authored: 2024-06-15 13:10:54 +0200
Committed: 2024-06-15 14:35:10 +0200
Remove some now redundant validation in getDocument
Given that we now check/validate all options properly this old code can be simplified.
Files Modified:
- src/display/api.js
ce7cdf46704222b149970bdd843677a185988f1f by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/ce7cdf46704222b149970bdd843677a185988f1f
Authored: 2024-06-13 20:53:05 +0200
Committed: 2024-06-14 20:37:13 +0200
Replace Wintersmith with Metalsmith
Wintersmith is no longer maintained given that the most recent version
is from six years ago, and all vulnerabilities that NPM reports
originate from Wintersmith's dependencies. Metalsmith, and its plugins,
on the other hand have recently had releases and don't have known
vulnerabilities. In fact, the number of reported vulnerabilities by NPM
even goes down to zero with this patch applied.
This commit therefore replaces Wintersmith with Metalsmith by providing
a transparent drop-in replacement, in a way that requires the least
amount of changes to the code and the generated output.
Note that this patch does update our versions of jQuery, Bootstrap and
the Highlight.js theme because the previous versions were very outdated
and didn't work correctly with Metalsmith. Moreover, those old versions
contained vulnerabilities that are hereby fixed.
Fixes #18198.
Files Added:
- docs/contents/css/a11y-light.css
- docs/contents/js/jquery-3.7.1.min.js
- docs/templates/layout.njk
Files Deleted:
- docs/config.json
- docs/contents/js/jquery-2.1.0.min.js
- docs/plugins/wintersmith-makerelative.coffee
- docs/templates/layout.jade
Files Modified:
- docs/contents/api/index.md
- docs/contents/css/bootstrap.min.css
- docs/contents/css/main.css
- docs/contents/examples/index.md
- docs/contents/getting_started/index.md
- docs/contents/index.md
- docs/contents/js/bootstrap.min.js
- gulpfile.mjs
- package-lock.json
- package.json
0348559ef8214cfa2813b16c25a2dbf1e2c61851 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/0348559ef8214cfa2813b16c25a2dbf1e2c61851
Authored: 2024-06-14 18:29:05 +0200
Committed: 2024-06-14 18:41:44 +0200
Don't recommend installing gulp-cli
globally in the README and on the website
It's recommended to always install dependencies locally in the project
folder because global dependencies can easily conflict with other
projects and, because they are not managed by the project, diverge from
versions defined in e.g. package.json
. Previously we installed
gulp-cli
globally because at the time we lacked a convenient mechanism
to use Gulp otherwise, but nowadays NPM provides the npx
command for
that purpose and recommends using it over global installations (see
https://docs.npmjs.com/downloading-and-installing-packages-globally
and PR #17489 that provided the ground work for using it).
This commit therefore updates our README and website to no longer recommend
installing gulp-cli
globally but instead installing it locally from the
already existing entries in package.json
like all other dependencies
we use. Not only does this remove the special-casing for gulp-cli
which simplifies the installation procedure, it also ensures that the
version ranges provided in package.json
are respected.
This change is similar to the change in commit 92de2b7.
Fixes #18232.
Fixes 98ef8a1.
Files Modified:
- README.md
- docs/contents/getting_started/index.md
c14c3cfc9ff7612ef53170cea97710977abcc391 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/c14c3cfc9ff7612ef53170cea97710977abcc391
Authored: 2024-06-11 21:49:29 +0200
Committed: 2024-06-14 17:21:50 +0200
Improve date parsing in the js sandbox
If for example dd:mm is failing we just try with d:m which is equivalent
to the regex /d{1,2}:m{1,2}/. This way it allows the user to forget the
0 for the first days/months.
Files Modified:
- src/scripting_api/aform.js
- test/unit/scripting_spec.js
6d1f7e806e5df3a5dcc18145fc0f8db668a2896c by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/6d1f7e806e5df3a5dcc18145fc0f8db668a2896c
Authored: 2024-06-14 16:43:36 +0200
Committed: 2024-06-14 16:43:41 +0200
Fix an query with an empty selector in integration tests
In looking the logs from Chrome bidi tests I noticed a js syntax error
which is fixed thanks to this patch.
Files Modified:
- test/integration/test_utils.mjs
97686c410cdf8f0de1573d7a976c8b2130b490b1 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/97686c410cdf8f0de1573d7a976c8b2130b490b1
Authored: 2024-06-14 10:00:53 +0200
Committed: 2024-06-14 10:06:27 +0200
Improve how the wait-cursor is toggled when copying all text
-
Use a CSS rule to display the wait-cursor during copying. Since copying may take a little while in long documents, there's a theoretical risk that something else could change the cursor in the meantime and just resetting to the saved-cursor could thus be incorrect.
-
Remove the
interruptCopyCondition
listener with an AbortController, since that's slightly shorter code.
Files Modified:
- web/pdf_viewer.css
- web/pdf_viewer.js
Reporter | ||
Comment 1•8 months ago
|
||
LrV4muGRTAKqqvNIOrbrQA |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=c71bebaada2a245b70441da077ada4822adc7245
Reporter | ||
Comment 2•8 months ago
|
||
Updated•8 months ago
|
Reporter | ||
Comment 3•8 months ago
|
||
dWMLZpvzTP6zE-rztodCxw |
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.
Updated•7 months ago
|
Updated•7 months ago
|
Comment 5•7 months ago
|
||
bugherder |
Comment 6•7 months ago
|
||
(In reply to Pulsebot from comment #4)
Pushed by cdenizet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c0290b4f4565
Update PDF.js to f9ff613e56dca65b95ce9e10d13350008b523979
r=pdfjs-reviewers,Snuffleupagus
Perfherder has detected a talos performance change from push c0290b4f456522bc5d389b681c5da0030cbe9ae3.
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
6% | pdfpaint issue11004.pdf | windows10-64-shippable-qr | e10s fission stylo webrender-sw | 839.14 -> 791.44 |
5% | pdfpaint issue9650.pdf | windows10-64-shippable-qr | e10s fission stylo webrender-sw | 808.25 -> 768.26 |
4% | pdfpaint geothermal.pdf | windows10-64-shippable-qr | e10s fission stylo webrender-sw | 869.39 -> 831.08 |
4% | pdfpaint issue9650.pdf | macosx1015-64-shippable-qr | e10s fission stylo webrender-sw | 866.38 -> 835.28 |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.
You can run these tests on try with ./mach try perf --alert 992
For more information on performance sheriffing please see our FAQ.
Description
•