Closed Bug 1962964 Opened 16 days ago Closed 15 days ago

Update PDF.js to new version b47b248e15e9f4fdae7d4847218ccb3195c29ce6 from 2025-04-27 12:53:05

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox139 --- wontfix
firefox140 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [3pl-filed][task_id: ZRG1XhN6TPWRDwF7qmwLZA])

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 | 31 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 10 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 48 +-
toolkit/components/pdfjs/content/web/debugger.css | 5 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 232 ++---
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 82 +-
toolkit/components/pdfjs/content/web/viewer.css | 504 ++++---------
toolkit/components/pdfjs/content/web/viewer.mjs | 82 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 417 insertions(+), 581 deletions(-)


6d0e8d752d328352ae798a1fcf1c62062b285bae by Tim van der Meij <timvandermeij@gmail.com>

https://github.com/mozilla/pdf.js/commit/6d0e8d752d328352ae798a1fcf1c62062b285bae
Authored: 2025-04-27 14:49:27 +0200
Committed: 2025-04-27 14:49:27 +0200

Bump the stable version in pdfjs.config

Files Modified:

  • pdfjs.config

967e34046a5851b058948c4c8d8d2fa880209430 by Tim van der Meij <timvandermeij@gmail.com>

https://github.com/mozilla/pdf.js/commit/967e34046a5851b058948c4c8d8d2fa880209430
Authored: 2025-04-26 19:15:20 +0200
Committed: 2025-04-27 14:00:50 +0200

Fix the "must work properly when selecting undo by keyboard" integration test

This integration test fails intermittently because the undo button can
only be activated if focus can be put on it, and that in turn can only
happen if it's visible. The test tried to make sure that the undo bar
is visible, but checking for the absence of the hidden attribute is
unfortunately not enough to assert visibility according to Puppeteer
documentation [1]. Moreover, the undo button wasn't checked at all.

To fix the issue we let Puppeteer do the visibility detection for the
undo bar by providing the visible: true option to waitForSelector
[2]. This is consistent with the other tests that already do this, and
also with the existing code that detects if the undo bar is hidden
(which uses the hidden: true option of waitForSelector). Moreover,
we wait for the undo button to be present before putting focus on it.

For consistency, and to avoid intermittent failures elsewhere, we mirror
this solution to the other undo bar/button tests of the various editors.

[1] https://pptr.dev/api/puppeteer.elementhandle.isvisible
[2] https://pptr.dev/api/puppeteer.waitforselectoroptions

Files Modified:

  • test/integration/freetext_editor_spec.mjs
  • test/integration/highlight_editor_spec.mjs
  • test/integration/ink_editor_spec.mjs
  • test/integration/stamp_editor_spec.mjs

0852c42c15e2f5b0089b0844d822eaa973f7da20 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/0852c42c15e2f5b0089b0844d822eaa973f7da20
Authored: 2025-04-26 20:37:16 +0200
Committed: 2025-04-26 20:44:07 +0200

Always render the Annotation- and XFA-layers with light color-scheme (issue 19871)

The intention with PR 19819 was to change how colours are specified for the viewer UI, however it wasn't intended to affect elements in the Annotation- and XFA-layers.
Hence we enforce the light color-scheme for these layers, and also make sure to provide a default color for PopupAnnotations.

Files Modified:

  • web/annotation_layer_builder.css
  • web/xfa_layer_builder.css

b8dd236ae6cdaa5494b1a5b82e73e2c90755ecc7 by Tim van der Meij <timvandermeij@gmail.com>

https://github.com/mozilla/pdf.js/commit/b8dd236ae6cdaa5494b1a5b82e73e2c90755ecc7
Authored: 2025-04-26 15:52:12 +0200
Committed: 2025-04-26 15:52:12 +0200

Update translations to the most recent versions

Files Modified:

  • l10n/be/viewer.ftl
  • l10n/bg/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-CA/viewer.ftl
  • l10n/en-GB/viewer.ftl
  • l10n/eo/viewer.ftl
  • l10n/es-AR/viewer.ftl
  • l10n/es-CL/viewer.ftl
  • l10n/es-ES/viewer.ftl
  • l10n/es-MX/viewer.ftl
  • l10n/eu/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/id/viewer.ftl
  • l10n/is/viewer.ftl
  • l10n/it/viewer.ftl
  • l10n/ka/viewer.ftl
  • l10n/kk/viewer.ftl
  • l10n/ko/viewer.ftl
  • l10n/ml/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/pt-PT/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/th/viewer.ftl
  • l10n/tr/viewer.ftl
  • l10n/uk/viewer.ftl
  • l10n/vi/viewer.ftl
  • l10n/zh-CN/viewer.ftl
  • l10n/zh-TW/viewer.ftl

cbf61712f9821374ea83c601bda4943eb9cf44c7 by Tim van der Meij <timvandermeij@gmail.com>

https://github.com/mozilla/pdf.js/commit/cbf61712f9821374ea83c601bda4943eb9cf44c7
Authored: 2025-04-26 15:49:58 +0200
Committed: 2025-04-26 15:51:20 +0200

Update dependencies to the most recent versions

Files Modified:

  • package-lock.json
  • package.json

af3d13c22dbb9f13ddc0b5aca4c9c792bb8813cd by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/af3d13c22dbb9f13ddc0b5aca4c9c792bb8813cd
Authored: 2025-04-26 11:06:01 +0200
Committed: 2025-04-26 11:09:52 +0200

Use the MathClamp helper function more in the web/ folder (PR 19617 follow-up)

There's one more spot that I missed in PR 19617.

Files Modified:

  • web/pdf_viewer.js

abc9522886d230f983208b586ddb09cdaa260844 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/abc9522886d230f983208b586ddb09cdaa260844
Authored: 2025-04-25 18:14:22 +0200
Committed: 2025-04-25 23:13:05 +0200

Avoid (most) string parsing when removing/replacing the hash property of a URL

Files Modified:

  • extensions/chromium/extension-router.js
  • src/core/catalog.js
  • src/display/filter_factory.js
  • src/pdf.js
  • src/shared/util.js
  • test/unit/pdf_spec.js
  • web/app.js
  • web/app_options.js
  • web/generic_scripting.js
  • web/pdf_history.js
  • web/pdfjs.js

785991a97cba7f006efc27e82f64cf8bc0bbad19 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/785991a97cba7f006efc27e82f64cf8bc0bbad19
Authored: 2025-04-24 19:22:51 +0200
Committed: 2025-04-24 20:19:12 +0200

Fix 'print to pdf' on Mac with a cid font (bug 1961423)

Files Modified:

  • src/core/cff_parser.js
  • test/unit/cff_parser_spec.js

6b76bdac3ac6e9e80e8c350e54b08ded93370f65 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/6b76bdac3ac6e9e80e8c350e54b08ded93370f65
Authored: 2025-04-24 17:30:18 +0200
Committed: 2025-04-24 17:34:29 +0200

Fix the debugger CSS when using the dark theme (PR 19819 follow-up)

Perhaps we should update the debugger CSS to properly account for the light/dark theme, however since that's not UI that end-users ever see we simply force using the light theme for now.

Files Modified:

  • web/debugger.css

940b4657fcc85cb475c01c29aab1eb4fe2c7d07a by zhangningning <zhangningning@360.cn>

https://github.com/mozilla/pdf.js/commit/940b4657fcc85cb475c01c29aab1eb4fe2c7d07a
Authored: 2025-04-24 15:04:15 +0800
Committed: 2025-04-24 15:04:15 +0800

Tweak the Node.js version listed in "engines", to ensure that process.getBuiltinModule is available

Files Modified:

  • gulpfile.mjs
  • package-lock.json
  • package.json

8630822a6366aedc4a1f380d384eca308e9958d8 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/8630822a6366aedc4a1f380d384eca308e9958d8
Authored: 2025-04-23 15:59:50 +0200
Committed: 2025-04-23 23:04:24 +0200

Fix errors when running the integration tests

JavaScript error: http://127.0.0.1:42301/build/generic/web/viewer.mjs, line 5822: TypeError: this[#state] is null
JavaScript error: http://127.0.0.1:42301/build/generic/web/viewer.mjs, line 6001: TypeError: can't access property "getPage", this._pdfDocument is null

Files Modified:

  • web/pdf_find_controller.js

ae1cbc6a9ecc738d6777830488ad5481b97338bc by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/ae1cbc6a9ecc738d6777830488ad5481b97338bc
Authored: 2025-04-16 11:14:02 +0200
Committed: 2025-04-23 15:31:39 +0200

Use the light-dark CSS function in the viewer (issue 17780)

This removes the need for (most) separate @media (prefers-color-scheme: dark) blocks when defining colors values, and also provides a simple way of forcing use of either the light or dark theme.

Please refer to https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark and https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme

NOTE: To support this in older browsers, we utilize a PostCSS plugin.

Files Modified:

  • gulpfile.mjs
  • package-lock.json
  • package.json
  • src/display/display_utils.js
  • src/display/editor/signature.js
  • test/integration/signature_editor_spec.mjs
  • web/annotation_editor_layer_builder.css
  • web/app.js
  • web/dialog.css
  • web/message_bar.css
  • web/pdf_viewer.css
  • web/signature_manager.css
  • web/toggle_button.css
  • web/viewer-geckoview.css
  • web/viewer.css

05a45346a5fb2e43fa989abbe8255c8dfd3c155c by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/05a45346a5fb2e43fa989abbe8255c8dfd3c155c
Authored: 2025-04-23 15:25:09 +0200
Committed: 2025-04-23 15:25:12 +0200

Disable userActivation before executing a setTimeout/setInterval callback

Fixes issue #19850.

Files Modified:

  • src/scripting_api/app.js

64007e777e6a84cafb02c19b61cf411eb473331f by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/64007e777e6a84cafb02c19b61cf411eb473331f
Authored: 2025-04-23 09:55:04 +0200
Committed: 2025-04-23 10:19:20 +0200

Ensure that the /Form XObject /Resources-entry is actually a dictionary (issue 19848)

Files Added:

  • test/pdfs/issue19848.pdf

Files Modified:

  • src/core/evaluator.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

b4626a77a2048c06a1f158415400088d0bb60875 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/b4626a77a2048c06a1f158415400088d0bb60875
Authored: 2025-04-22 09:15:52 +0200
Committed: 2025-04-22 09:15:52 +0200

Fix printing of XFA documents, by calling XfaLayerBuilder.prototype.render correctly (issue 19840)

When changing the format of various render-methods in PR 19365 I forgot to update the code used to print XFA documents, sorry about that.

Files Modified:

  • web/print_utils.js

adc9eb5a5a91ad8f7edc71f92fa3c84c7b6a1b87 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/adc9eb5a5a91ad8f7edc71f92fa3c84c7b6a1b87
Authored: 2025-04-20 13:56:52 +0200
Committed: 2025-04-20 14:53:10 +0200

Always fallback to checking all destinations, when lookup fails (issue 19835)

In the referenced PDF document the keys, in the /Dests dictionary, need to account for PDFDocEncoding.
To improve destination handling in general we'll now unconditionally fallback to always checking all destinations.

Files Added:

  • test/pdfs/issue19835.pdf.link

Files Modified:

  • src/core/catalog.js
  • test/test_manifest.json
  • test/unit/api_spec.js

8e7060158e86bb87034e4eb73360d38b10e8ed3b by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/8e7060158e86bb87034e4eb73360d38b10e8ed3b
Authored: 2025-04-17 10:51:51 +0200
Committed: 2025-04-17 10:51:51 +0200

Remove duplicate secondaryToolbar button mask-image definitions (PR 18385 follow-up)

It appears that all secondaryToolbar buttons currently have their mask-image definitions duplicated, which leads to larger than necessary CSS files.

Files Modified:

  • web/viewer.css

97fe7d6a19cef06076cc8113c11d7f3ac9a3a0d7 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/97fe7d6a19cef06076cc8113c11d7f3ac9a3a0d7
Authored: 2025-04-15 12:36:39 +0200
Committed: 2025-04-15 12:43:11 +0200

Add a "supportsPrinting" viewer-option (bug 1957401)

This will allow us to respect the print.enabled Firefox preference, by extending this method, which will hide the toolbar and secondaryToolbar print-buttons.

Files Modified:

  • web/app.js
  • web/app_options.js

245d9ba925a6840ab248d53cebdbeb7b54f22073 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/245d9ba925a6840ab248d53cebdbeb7b54f22073
Authored: 2025-04-14 09:58:15 +0200
Committed: 2025-04-14 09:58:15 +0200

Ensure that "local" /Contents stream-dict /Resources aren't empty (PR 19803 follow-up)

This is a small, and quite possibly pointless, optimization which ensures that any "local" /Resources aren't empty, to avoid needlessly trying to load and merge dictionaries.

Files Modified:

  • src/core/document.js

ba7c34ff56e178265890bde0a866673f229967d8 by Logan Rosen <loganrosen@gmail.com>

https://github.com/mozilla/pdf.js/commit/ba7c34ff56e178265890bde0a866673f229967d8
Authored: 2025-04-13 18:57:56 -0400
Committed: 2025-04-13 18:57:56 -0400

Fix beginner bugs link in README

Files Modified:

  • README.md

Assignee: nobody → update-bot
Status: NEW → ASSIGNED

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.

Assignee: update-bot → cdenizet
Pushed by cdenizet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4441e64648e Update PDF.js to b47b248e15e9f4fdae7d4847218ccb3195c29ce6 r=pdfjs-reviewers,calixte
Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: