Closed Bug 1982249 Opened 1 year ago Closed 1 year ago

Update PDF.js to new version 1bada43a227c63893fd2f53431f5e112bc329c2f from 2025-08-10 09:15:19

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 external file)

This update covers 8 commits. Here are the overall diff statistics, and then the commit information.


toolkit/components/pdfjs/content/build/pdf.mjs | 63 ++++++---
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 13 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 99 +++++++++++---
toolkit/components/pdfjs/content/web/viewer.mjs | 99 +++++++++++---
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 197 insertions(+), 85 deletions(-)


02635814a28d4dc3e6d7e1881cab4468f4114006 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/+/02635814a28d4dc3e6d7e1881cab4468f4114006
Authored: 2025-08-08 14:46:17 +0200
Committed: 2025-08-08 14:46:17 +0200

Update l10n files

Files Modified:

  • l10n/be/viewer.ftl
  • l10n/cak/viewer.ftl
  • l10n/cs/viewer.ftl
  • l10n/da/viewer.ftl
  • l10n/dsb/viewer.ftl
  • l10n/en-GB/viewer.ftl
  • l10n/es-AR/viewer.ftl
  • l10n/es-CL/viewer.ftl
  • l10n/fi/viewer.ftl
  • l10n/fr/viewer.ftl
  • l10n/fy-NL/viewer.ftl
  • l10n/he/viewer.ftl
  • l10n/hsb/viewer.ftl
  • l10n/ia/viewer.ftl
  • l10n/it/viewer.ftl
  • l10n/ja/viewer.ftl
  • l10n/ka/viewer.ftl
  • l10n/kab/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/pt-BR/viewer.ftl
  • l10n/ro/viewer.ftl
  • l10n/ru/viewer.ftl
  • l10n/sk/viewer.ftl
  • l10n/sl/viewer.ftl
  • l10n/sv-SE/viewer.ftl
  • l10n/tg/viewer.ftl
  • l10n/tr/viewer.ftl
  • l10n/zh-TW/viewer.ftl

760c8d632c62ecfd598975ebbf69deb70ce86a64 by Knut Hühne <knut.huehne@afilio.de>

https://github.com/mozilla/pdf.js/+/760c8d632c62ecfd598975ebbf69deb70ce86a64
Authored: 2025-08-06 12:38:30 +0200
Committed: 2025-08-06 12:38:30 +0200

Mark canvasContext as optional

In #20016, the canvasContext property of RenderParameters was deprecated in favor of the new canvas property.

The JSDoc was updated to include the new parameter along with the old one.

I think the old one should be enclosed in [] to mark it as optional (and to allow usage from TypeScript with just the canvas parameter provided).

I also reordered the properties so that all required properties come first, follow by optional ones.

Files Modified:

  • src/display/api.js

3d9374e02e92ca8b4f2b4979cbbde53eba390038 by 宋铄运 (Alan Song) <fnlctrl@gmail.com>

https://github.com/mozilla/pdf.js/+/3d9374e02e92ca8b4f2b4979cbbde53eba390038
Authored: 2025-08-05 22:29:32 +0000
Committed: 2025-08-05 22:29:32 +0000

lazy initialize IccColorSpace.#finalizer

Files Modified:

  • src/core/icc_colorspace.js

9babc144a7c492f5535d0f49c0b4b0692b2079e7 by Aditi <aditisingh1400@gmail.com>

https://github.com/mozilla/pdf.js/+/9babc144a7c492f5535d0f49c0b4b0692b2079e7
Authored: 2025-08-04 15:29:52 +0530
Committed: 2025-08-04 15:29:52 +0530

Make horizontal padding relative to device width

The fixed -400px horizontal offset used by
scrollIntoView led to horizontal scroll only moving
part-way right on narrow screens. The highlights near
the right-edge remained party or completely off
screen.

This centres the highlighted match on any viewport width while
clamping the left margin to 20-400px. On very narrow screens
the scrollbar now moves all the way to the right instead of
stopping midway.

Files Modified:

  • test/integration/find_spec.mjs
  • test/integration/viewer_spec.mjs
  • web/pdf_find_controller.js
  • web/ui_utils.js

287776483f01d75a4aef4df6850cf09de233bacd by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/+/287776483f01d75a4aef4df6850cf09de233bacd
Authored: 2025-08-01 19:06:14 +0200
Committed: 2025-08-01 19:06:26 +0200

Trigger a fake scrollend event in case it hasn't been triggered by the browser (bug 1957680)

This way, it should unblock zooming with ctrl+wheel after scrolling.

Files Modified:

  • web/app.js

a81e99168a116b8ea513f3752438b5cc06d0b74f by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/+/a81e99168a116b8ea513f3752438b5cc06d0b74f
Authored: 2025-07-31 21:02:50 +0200
Committed: 2025-07-31 21:03:32 +0200

[Editor] Highlight text on a selectionchange event which hasn't been triggered by the pointer or the keyboard (bug 1976597)

It's useful for users highlighting with NVDA.
They've to enable native selection and then selection some text.
In this case only a selectionchange is triggered once the selection is done.

Files Modified:

  • src/display/editor/tools.js
  • test/integration/highlight_editor_spec.mjs

806f9c1cee624f9257bbd4e62442a144be767368 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/+/806f9c1cee624f9257bbd4e62442a144be767368
Authored: 2025-07-28 17:42:13 +0200
Committed: 2025-07-30 19:29:01 +0200

Disable printing when enablePermission is true and the pdf isn't allowed to be printed (bug 1978985)

Files Added:

  • test/pdfs/print_protection.pdf

Files Modified:

  • test/integration/viewer_spec.mjs
  • test/pdfs/.gitignore
  • web/app.js
  • web/pdf_print_service.js
  • web/pdf_viewer.js

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

https://github.com/mozilla/pdf.js/+/48c6253b3274f964463f3d7ca1b66c8558ee6580
Authored: 2025-07-29 19:01:28 +0200
Committed: 2025-07-29 19:31:08 +0200

Fix intermittent failure in the "must check that the computed value is correct" scripting integration test

Typing in the text field causes a sandbox event to trigger, which we
should await to avoid continuing to the next part of the test before
the sandbox event is fully processed.

Files Modified:

  • test/integration/scripting_spec.mjs

Duplicate of this bug: 1980844

The try push is done, we found jobs with unclassified failures.

Needs Close Investigation:

  • minidumpwriter exited with status: 1

    • 4 of 4 failed on the same (retriggered) task
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (VjuOi8LYR2CflUdimwRIBw)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (GME6gTFbTfCH09NsjInNkA)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (I3kGq4nKT3uBjC0J2M1kcQ)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (UdeAEpmET7C1f73TMfy-tA)
  • toolkit/components/pdfjs/test/browser_pdfjs_alttext_telemetry.js

    • 20 of 20 failed on different tasks
      - test-linux2404-64/opt-mochitest-browser-chrome-swr-a11y-checks-1 (EUsYtThdSY6ql0I2UPQu1Q)
      - test-linux2404-64/opt-mochitest-browser-chrome-spi-nw-1 (fSoX1sgJTOi-oH4xPnifqQ)
      - test-linux2404-64/opt-mochitest-browser-chrome-swr-1 (URf3IvogSN6oLe7RcFBFVA)
      - test-windows11-32-24h2/opt-mochitest-browser-chrome-1 (MN0QS8yLSOWGaNDjB-RAVQ)
      - test-linux2404-64/debug-mochitest-browser-chrome-spi-nw-1 (N1bSPfuJSIKPqYZ3lCax8Q)
      - test-windows11-64-24h2/opt-mochitest-browser-chrome-spi-nw-1 (N30G3BiuRJGyYRe4NUPubg)
      - test-windows11-64-24h2/opt-mochitest-browser-chrome-1 (SKds0WTGRu6s_FaCtG7FNA)
      - test-macosx1015-64-qr/debug-mochitest-browser-chrome-spi-nw-1 (UQDayV_fTnexroVoRTGUMA)
      - test-macosx1015-64-qr/opt-mochitest-browser-chrome-spi-nw-1 (Pxd8MZeiT5yd6h_PuO2UeQ)
      - test-macosx1015-64-qr/opt-mochitest-browser-chrome-1 (XOl_UM9oQ9SAgweguxcoWQ)
      - test-macosx1015-64-qr/debug-mochitest-browser-chrome-1 (YO_PxAlQSWmhWaXw2B9X4A)
      - test-linux2404-64/debug-mochitest-browser-chrome-swr-1 (Vfndb2zsS6mozPFeM4HsKg)
      - test-windows11-64-24h2/debug-mochitest-browser-chrome-msix-1 (dhwB36uhReiWhSqYVkgpcQ)
      - test-windows11-64-24h2/opt-mochitest-browser-chrome-msix-1 (HJa4JTMuRne-zKKJncbySQ)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (VjuOi8LYR2CflUdimwRIBw)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (GME6gTFbTfCH09NsjInNkA)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (I3kGq4nKT3uBjC0J2M1kcQ)
      - test-windows11-32-24h2/debug-mochitest-browser-chrome-1 (UdeAEpmET7C1f73TMfy-tA)
      - test-windows11-64-24h2/debug-mochitest-browser-chrome-1 (OYqHEpSfQ1-8dwkGeRVIQw)
      - test-windows11-64-24h2/debug-mochitest-browser-chrome-spi-nw-1 (UGBa1FK3TQKwq-kbVFro5w)

These failures could mean that the library update changed something and caused
tests to fail. You'll need to review them yourself and decide where to go from here.

In either event, I have done all I can and you will need to take it from here. If you
don't want to land my patch, you can replicate it locally for editing with
./mach vendor toolkit/components/pdfjs/moz.yaml

When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

Assignee: nobody → cdenizet
Flags: needinfo?(cdenizet)
Attachment #9506283 - Attachment description: Bug 1982249 - Update PDF.js to 1bada43a227c63893fd2f53431f5e112bc329c2f → Bug 1982249 - Update PDF.js to 1bada43a227c63893fd2f53431f5e112bc329c2f r=#pdfjs-reviewers

This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1983432
Resolution: --- → DUPLICATE

Updatebot encountered an error while trying to abandon the phabricator patch 260609.
Updatebot will be unable to do anything more for this library version.

Pushed by cdenizet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8a21702ee853 https://hg.mozilla.org/integration/autoland/rev/c6b23188a9e8 Update PDF.js to 1bada43a227c63893fd2f53431f5e112bc329c2f r=pdfjs-reviewers,robwu
No longer blocks: 1957680, 1976597, 1978985
No longer duplicate of bug: 1983432
Flags: needinfo?(cdenizet)
Resolution: DUPLICATE → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: