Update PDF.js to new version 529906c74f1a53198200be7f61e63f8f94d1a371 from 2024-09-24 10:44:34
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox132 | --- | affected |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: BHbSPe29RyuYJ7r9AEp_Ow])
Attachments
(1 obsolete file)
This update covers 29 commits. Here are the overall diff statistics, and then the commit information.
taskcluster/kinds/fetch/toolchains.yml | 2 +-
toolkit/components/pdfjs/moz.yaml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
50517b8fba3f7e30a9def3af2573a3a0f2e731cd by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/50517b8fba3f7e30a9def3af2573a3a0f2e731cd
Authored: 2024-09-24 12:31:43 +0200
Committed: 2024-09-24 12:31:43 +0200
Remove duplicated --toolbar-height definition in the css
Files Modified:
- web/viewer.css
e9b10ae8b253bec336fec4113cd042ae95e2eb64 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/e9b10ae8b253bec336fec4113cd042ae95e2eb64
Authored: 2024-09-24 09:58:17 +0200
Committed: 2024-09-24 09:58:17 +0200
Remove useless css variable --editor-toolbar-base-offset
Files Modified:
- web/viewer.css
6f40ed729bf8b504bb47b1e28c4c26fb4601435f by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/6f40ed729bf8b504bb47b1e28c4c26fb4601435f
Authored: 2024-07-01 22:37:48 +0200
Committed: 2024-09-23 22:43:44 +0200
Refactor the toolbar html & css to improve its overall accessibility (bug 1171799, bug 1855695)
The first goal of this patch was to remove the tabindex because it helps
to improve overall a11y. That led to move some html elements associated
with the buttons which helped to position these elements relatively to their
buttons.
Consequently it was easy to change the toolbar height (configurable in Firefox
with the pref browser.uidensity): it's the second goal of this patch.
For a11y reasons we want to be able to change the height of the toolbar to make
the buttons larger.
Files Modified:
- test/integration/find_spec.mjs
- web/annotation_editor_layer_builder.css
- web/app.js
- web/pdf_find_bar.js
- web/toolbar.js
- web/viewer-geckoview.html
- web/viewer.css
- web/viewer.html
- web/viewer.js
c8af3f14d3c5b3fde4a591b5b77a1f7948dc3f43 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/c8af3f14d3c5b3fde4a591b5b77a1f7948dc3f43
Authored: 2024-09-23 20:33:05 +0200
Committed: 2024-09-23 20:34:35 +0200
Update typescript
to version 5.6.2
This is unblocked because in commit bb302dd the default value for the
constructor got removed, which apparently confused TypeScript before.
Fixes #18770.
Files Modified:
- package-lock.json
- package.json
d35a20a8c1dd89d6d2fc0f301f1454eebc9d96b7 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/d35a20a8c1dd89d6d2fc0f301f1454eebc9d96b7
Authored: 2024-09-23 19:46:32 +0200
Committed: 2024-09-23 19:46:32 +0200
[Editor] Don't show the ml toggle button when the ml is disabled (bug 1920515)
Files Modified:
- test/integration/stamp_editor_spec.mjs
- web/app.js
- web/new_alt_text_manager.js
be60ca66e10ea6d72ab8f9204b1e3d01e708edd7 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/be60ca66e10ea6d72ab8f9204b1e3d01e708edd7
Authored: 2024-09-23 14:40:09 +0200
Committed: 2024-09-23 14:40:09 +0200
Bump library version to 4.7
Files Modified:
- pdfjs.config
bb302dd99337ed4705f2b5d4000091d844366b78 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/bb302dd99337ed4705f2b5d4000091d844366b78
Authored: 2024-09-23 10:22:39 +0200
Committed: 2024-09-23 11:26:30 +0200
[api-minor] Pass CanvasFactory
/FilterFactory
, rather than instances, to getDocument
This unifies the various factory-options, since it's consistent with CMapReaderFactory
/StandardFontDataFactory
, and ensures that any needed parameters will always be consistently provided when creating CanvasFactory
/FilterFactory
-instances.
As shown in the modified example this may simplify some custom implementations, since we now provide the ability to access the CanvasFactory
-instance used with a particular getDocument
-invocation.
Files Modified:
- examples/node/pdf2png/pdf2png.mjs
- src/display/api.js
- src/display/base_factory.js
- src/display/display_utils.js
- test/unit/api_spec.js
- test/unit/custom_spec.js
- test/unit/display_utils_spec.js
ed100f2ef231920b7e7e367313a87b5a3ae362d0 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/ed100f2ef231920b7e7e367313a87b5a3ae362d0
Authored: 2024-09-21 19:57:33 +0200
Committed: 2024-09-22 20:27:10 +0200
Update translations to the most recent versions
Files Modified:
- l10n/be/viewer.ftl
- l10n/eo/viewer.ftl
- l10n/gn/viewer.ftl
- l10n/hr/viewer.ftl
- l10n/ja/viewer.ftl
- l10n/kab/viewer.ftl
- l10n/nb-NO/viewer.ftl
- l10n/nn-NO/viewer.ftl
- l10n/pa-IN/viewer.ftl
- l10n/pt-BR/viewer.ftl
- l10n/skr/viewer.ftl
- l10n/sq/viewer.ftl
- l10n/tg/viewer.ftl
- l10n/uk/viewer.ftl
3753387e9dd9b9dd16a1e742384d978e11516f56 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/3753387e9dd9b9dd16a1e742384d978e11516f56
Authored: 2024-09-21 19:42:19 +0200
Committed: 2024-09-22 20:27:10 +0200
Update dependencies to the most recent versions
Files Modified:
- package-lock.json
- package.json
1a1dfe60bfe0f029fa90a5b5c11f3a29d391e3b6 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/1a1dfe60bfe0f029fa90a5b5c11f3a29d391e3b6
Authored: 2024-09-22 13:00:57 +0200
Committed: 2024-09-22 13:00:57 +0200
Add more optional chaining in the test/
directory
Files Modified:
- test/driver.js
- test/test.mjs
0a621ba73a974d1052fc9a6f796632be3c9b975e by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/0a621ba73a974d1052fc9a6f796632be3c9b975e
Authored: 2024-09-22 12:57:23 +0200
Committed: 2024-09-22 12:57:23 +0200
Use fs/promises
in the Node.js unit-tests (PR 17714 follow-up)
This is available in all Node.js versions that we currently support, and using it allows us to remove callback-functions; please see https://nodejs.org/docs/latest-v18.x/api/fs.html#promises-api
Files Modified:
- test/unit/test_utils.js
67af371e587d0ec440c7d3c118841e0fd444eb63 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/67af371e587d0ec440c7d3c118841e0fd444eb63
Authored: 2024-09-19 21:46:19 +0200
Committed: 2024-09-19 21:55:02 +0200
Ignore non-existing /Shading resources during parsing (issue 18765)
Files Added:
- test/pdfs/issue18765.pdf.link
Files Modified:
- src/core/evaluator.js
- test/test_manifest.json
9e001f851330e99e02b6aad781d4823c0c3f4cc0 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/9e001f851330e99e02b6aad781d4823c0c3f4cc0
Authored: 2024-09-19 16:11:17 +0200
Committed: 2024-09-19 16:14:39 +0200
Link to the new issue templates from the README (PR 18308 follow-up)
Files Modified:
- README.md
b29278efb802ce00e21cda2bec79aad2719026da by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/b29278efb802ce00e21cda2bec79aad2719026da
Authored: 2024-09-19 14:31:04 +0200
Committed: 2024-09-19 15:24:01 +0200
Fix the rendering of the different separators we've in the UI
Currently, the css for a separator is something like { height: 1px; background-color: ... }.
But its rendering depends on its position on the screen.
So instead of setting the height to 1px, we just set something like { border-top: 1px solid ...; },
this way the final rendering is exactly the same for all the separators.
Files Modified:
- web/annotation_editor_layer_builder.css
- web/dialog.css
- web/viewer-geckoview.css
- web/viewer.css
78dd35483ceaccab29a7584e454170e6412f5e47 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/78dd35483ceaccab29a7584e454170e6412f5e47
Authored: 2024-09-18 22:09:17 +0200
Committed: 2024-09-18 22:09:17 +0200
Read a signed integer when using PUSHW in sanitizing a font (bug 1919513)
Files Added:
- test/pdfs/bug1919513.pdf
Files Modified:
- src/core/fonts.js
- test/pdfs/.gitignore
- test/test_manifest.json
ee89bd1c39c39327df0a4837728d5a9e30734ad9 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/ee89bd1c39c39327df0a4837728d5a9e30734ad9
Authored: 2024-09-17 18:08:03 +0200
Committed: 2024-09-17 20:34:38 +0200
Rename the toolbar buttons in order to free their current names
which can then be used for their future parent container.
This patch aims to simplify a bit the patch in #18385.
Files Modified:
- test/integration/accessibility_spec.mjs
- test/integration/find_spec.mjs
- test/integration/freetext_editor_spec.mjs
- test/integration/scripting_spec.mjs
- test/integration/test_utils.mjs
- web/viewer.css
- web/viewer.html
- web/viewer.js
f77a29d6759475854d98386ab0b1546c811a29c4 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/f77a29d6759475854d98386ab0b1546c811a29c4
Authored: 2024-09-17 12:10:04 +0200
Committed: 2024-09-17 12:23:43 +0200
Simplify the code that picks the appropriate NetworkStream-implementation
This code is quite old and has been moved/re-factored a few times over the years, however we can simplify this even further since we don't actually need a function to determine what NetworkStream-implementation to use.
Files Modified:
- src/display/api.js
46fac8b2c1442f3f7e7916962d6c68dd6164d550 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/46fac8b2c1442f3f7e7916962d6c68dd6164d550
Authored: 2024-09-15 20:40:01 +0200
Committed: 2024-09-16 14:48:26 +0200
[Editor] Take into account the device pixel ratio when drawing an added image
Fixes #18626.
Files Modified:
- src/display/display_utils.js
- src/display/editor/stamp.js
- src/pdf.js
- test/unit/pdf_spec.js
- web/new_alt_text_manager.js
- web/pdf_page_view.js
- web/pdf_thumbnail_view.js
- web/pdfjs.js
- web/ui_utils.js
3170bf3f690fd28e6d45e84dc3eb927e237fc758 by Rob Wu <rob@robwu.nl>
https://github.com/mozilla/pdf.js/commit/3170bf3f690fd28e6d45e84dc3eb927e237fc758
Authored: 2024-09-15 12:58:38 +0200
Committed: 2024-09-15 12:58:38 +0200
[CRX] Enable WebAssembly in Chrome extension
After the removal of 'unsafe-eval' CSP in #18651, WebAssembly fails to
load, resulting in issues such as seen in #18457.
Manifest Version 3 does not allow 'unsafe-eval', does accept the more
specific 'wasm-unsafe-eval' as of Chrome 103. Note that manifest.json
already sets minimum_chrome_version to 103.
This patch also adds object-src 'self'
because it was required until
Chrome 110. As of Chrome 111, the default is object-src 'self'
and
object-src
is no longer required. We could drop object-src
in the
future, but for now we need to include it to support Chrome 103 - 110.
Files Modified:
- extensions/chromium/manifest.json
d86f94a3db6540407e28db783ef6791156e99343 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/d86f94a3db6540407e28db783ef6791156e99343
Authored: 2024-09-02 10:05:09 +0200
Committed: 2024-09-12 21:15:15 +0200
Use the "pageColorsBackground" option as background-color for non-loaded pages (issue 18680)
This should prevent non-loaded pages from flashing white in e.g. high contrast mode (HCM).
Files Modified:
- web/pdf_page_view.js
- web/pdf_viewer.css
- web/pdf_viewer.js
6e1b4d63e75623a4e70693bf65071272d19d9d88 by Francesco Lodolo <flod@lodolo.net>
https://github.com/mozilla/pdf.js/commit/6e1b4d63e75623a4e70693bf65071272d19d9d88
Authored: 2024-09-12 16:53:18 +0200
Committed: 2024-09-12 16:53:18 +0200
Fluent: use explicit NUMBER() in plural variants
Files Modified:
- l10n/en-US/viewer.ftl
85e8bac45d89118b653ab43eab95afc3761a824d by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/85e8bac45d89118b653ab43eab95afc3761a824d
Authored: 2024-09-12 15:35:15 +0200
Committed: 2024-09-12 15:35:19 +0200
[Editor] Avoid an extra new line when serializing a FreeText annotation (bug 1897909)
The extra new line is added because of using shift+enter to add a new line
in the text editor.
Files Modified:
- src/display/editor/freetext.js
- test/integration/freetext_editor_spec.mjs
edd1dfb6992de9d3853882c8ffa141fcf0e2e13f by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/edd1dfb6992de9d3853882c8ffa141fcf0e2e13f
Authored: 2024-09-11 23:53:47 +0000
Committed: 2024-09-11 23:53:47 +0000
Bump dset from 3.1.3 to 3.1.4
Bumps dset from 3.1.3 to 3.1.4.
updated-dependencies:
- dependency-name: dset
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- package-lock.json
ca95264e8bc353e4a72cb46c1a1c397d2d8b8b23 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/ca95264e8bc353e4a72cb46c1a1c397d2d8b8b23
Authored: 2024-09-11 17:19:34 +0200
Committed: 2024-09-11 17:19:34 +0200
[JS] Correctly format floating numbers when they're close to an integer (bug 1918115)
Files Added:
- test/pdfs/bug1918115.pdf
Files Modified:
- src/scripting_api/util.js
- test/integration/scripting_spec.mjs
- test/pdfs/.gitignore
5b3d3c7dd93eb3e3f88ad8c9123657a3020ddfbd by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/5b3d3c7dd93eb3e3f88ad8c9123657a3020ddfbd
Authored: 2024-09-10 11:34:55 +0200
Committed: 2024-09-11 15:28:51 +0200
Ensure that textLayers can be rendered in parallel, without interfering with each other
Note that the textContent is returned in "chunks" from the API, through the use of ReadableStream
s, and on the main-thread we're (normally) using just one temporary canvas in order to measure the size of the textLayer span
s; see the #layout
method.
Order of events, for parallel textLayer rendering:
- Call
render
of the textLayer for page A. - Immediately call
render
of the textLayer for page B. - The first text-chunk for pageA arrives, and it's parsed/layout which means updating the cached fontSize/fontFamily for the textLayer of page A.
- The first text-chunk for pageB arrives, which means updating the cached fontSize/fontFamily for the textLayer of page B since this data is unique to each
TextLayer
-instance. - The second text-chunk for pageA arrives, and we don't update the canvas-font since the cached fontSize/fontFamily still apply from step 3 above.
Where this potentially breaks down is between the last steps, since we're using just one temporary canvas for all measurements but have individual fontSize/fontFamily caches for each textLayer.
Hence it's possible that the canvas-font has actually changed, despite the cached values suggesting otherwise, and to address this we instead cache the fontSize/fontFamily globally through a new (static) helper method.
Note: Includes a basic unit-test, using dummy text-content, which fails on master
and passes with this patch.
Finally, pun intended, ensure that temporary textLayer-data is cleared before the render
-promise resolves to avoid any intermittent problems in the unit-tests.
Files Modified:
- src/display/text_layer.js
- test/unit/text_layer_spec.js
06f9d8002d04b91113d3d7e44ce6bc1f7770d835 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/06f9d8002d04b91113d3d7e44ce6bc1f7770d835
Authored: 2024-09-10 22:00:04 +0200
Committed: 2024-09-11 15:01:54 +0200
Consider foo-\nBar as a compound word
Fixes #18693.
Files Added:
- test/pdfs/issue18693.pdf
Files Modified:
- test/pdfs/.gitignore
- test/unit/pdf_find_controller_spec.js
- web/pdf_find_controller.js
518b776e431b239539856f01ef5881b401f80fe9 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/518b776e431b239539856f01ef5881b401f80fe9
Authored: 2024-09-10 15:06:51 +0200
Committed: 2024-09-10 16:44:30 +0200
Consume any pending path before drawing an annotation
Fixes #18058.
Files Added:
- test/pdfs/issue18058.pdf.link
Files Modified:
- src/display/canvas.js
- test/test_manifest.json
a91ba11185621664eb5fb7213454b17c33472673 by Rob Wu <rob@robwu.nl>
https://github.com/mozilla/pdf.js/commit/a91ba11185621664eb5fb7213454b17c33472673
Authored: 2024-09-10 16:00:13 +0200
Committed: 2024-09-10 16:05:11 +0200
[CRX] Fix feature detect of DNR responseHeaders option
Fix regression from #18711. urlFilter
is a key of condition
, not of
the rule
. Consequently, the feature detection method failed to detect
the availability of the feature in Chrome 128+.
Files Modified:
- extensions/chromium/pdfHandler.js
2883a9460e08a72efeb1b9a40f77bf65cd03c47b by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/2883a9460e08a72efeb1b9a40f77bf65cd03c47b
Authored: 2024-09-10 10:00:41 +0200
Committed: 2024-09-10 10:00:41 +0200
Remove ununsed static HighlightEditor._l10nPromise
field
Files Modified:
- src/display/editor/highlight.js
Reporter | ||
Comment 2•5 months ago
|
||
BHbSPe29RyuYJ7r9AEp_Ow |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=b23f13ee419f74198883ed042a13e74d2fbac68a
Reporter | ||
Comment 3•5 months ago
|
||
Reporter | ||
Comment 4•5 months ago
|
||
SZoIEDOITSe7gtyImW8rWA |
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•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Description
•