Closed Bug 2041566 Opened 1 day ago Closed 19 hours ago

Update PDF.js to new version 25c7d9eaace0438316714aff7033dd5f4c1a542e from 2026-05-22 06:11:19

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

(Whiteboard: [3pl-filed][task_id: NIbqh4BDS-SI2mDaFJeDzw])

Attachments

(1 file)

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


toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 1 +
toolkit/components/pdfjs/content/build/pdf.mjs | 435 ++++-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 1202 +++++++-----
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 3 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 60 +-
toolkit/components/pdfjs/content/web/viewer.css | 31 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 271 ++-
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 1397 insertions(+), 614 deletions(-)


d8c08b980ad3cfa8c0d93dd1d5fbf2e86679ac00 by github-actions[bot] <github-actions[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/d8c08b980ad3cfa8c0d93dd1d5fbf2e86679ac00
Authored: 2026-05-22 00:51:32 +0000
Committed: 2026-05-22 00:51:32 +0000

l10n: Update locale files

Files Modified:

  • l10n/nn-NO/viewer.ftl

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

https://github.com/mozilla/pdf.js/commit/d6a2b91243193cb1efc3cea9fa37ff67d5a5ec07
Authored: 2026-05-19 21:57:24 +0200
Committed: 2026-05-21 21:24:00 +0200

Sanitize glyf composite cycles, OS/2 length and maxp version mismatches

Prune the back-edge components from cyclic composite glyphs in
sanitizeGlyphLocations (leaving non-cyclic siblings intact), reject OS/2
tables whose length is too short for the declared version so a clean
table gets regenerated, and upgrade a version 0.5 maxp table to 1.0 for
TrueType fonts to silence OTS' "wrong maxp version for glyph data".

It fixes #21298.

Files Added:

  • test/font/font_glyf_spec.js

Files Modified:

  • src/core/font_renderer.js
  • src/core/fonts.js
  • src/core/glyf.js
  • test/font/jasmine-boot.js

0f909879275e8aacbe5c794aac1c0af2c9e0e1bb by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/0f909879275e8aacbe5c794aac1c0af2c9e0e1bb
Authored: 2026-05-20 19:30:22 +0200
Committed: 2026-05-21 16:39:34 +0200

Fix 'Select all' after #20981

Files Modified:

  • src/display/draw_layer.js
  • test/integration/text_layer_spec.mjs

74471651c79efceab7eb8b5aa0cfc2cc6085b531 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/74471651c79efceab7eb8b5aa0cfc2cc6085b531
Authored: 2026-05-21 14:03:32 +0200
Committed: 2026-05-21 14:03:32 +0200

Extend unit-test coverage for the getPdfFilenameFromUrl helper function

Currently there's a couple of branches, specifically for dealing with corrupt URLs, that are not covered by tests.

Files Modified:

  • test/unit/display_utils_spec.js

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

https://github.com/mozilla/pdf.js/commit/d79043b3afdd239f3cd8eaed2f8e5c13f33cec59
Authored: 2026-05-20 14:28:54 +0200
Committed: 2026-05-20 18:06:55 +0200

Allow merging a PDF by dropping it onto the thumbnail viewer

Drop an external PDF anywhere in the views-manager thumbnail
sidebar to merge it at the cursor, rather than always inserting
after the current page via the "Add file" button.

The drop reuses the blue separator from page-move drag so the
user can see exactly where the inserted pages will land, and the
merge path is shared with the existing picker so post-merge
selection/current-page behavior stays consistent.

Files Modified:

  • test/integration/reorganize_pages_spec.mjs
  • web/pdf_thumbnail_viewer.js
  • web/views_manager.css

429b469ecbfad83027f6a9a816ea3a4fc03869f5 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/429b469ecbfad83027f6a9a816ea3a4fc03869f5
Authored: 2026-05-20 14:45:29 +0200
Committed: 2026-05-20 17:26:50 +0200

Add basic integration-tests for the PdfTextExtractor class

Files Added:

  • test/integration/text_extractor_spec.mjs

Files Modified:

  • test/integration/jasmine-boot.js
  • web/genericcom.js

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

https://github.com/mozilla/pdf.js/commit/abe8b564a346070b7fc921db0d1335fdb7ff2e1d
Authored: 2026-05-20 16:39:21 +0200
Committed: 2026-05-20 16:39:21 +0200

Don't use "internal" EventBus methods in the integration-tests

This way guarantees that any and all internal viewer state has been updated first, before any test-specific code runs.

Files Modified:

  • test/integration/reorganize_pages_spec.mjs

16a9f1cafc6268e65014393c05d9504cbf4e532e by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/16a9f1cafc6268e65014393c05d9504cbf4e532e
Authored: 2026-05-19 23:20:52 +0000
Committed: 2026-05-19 23:20:52 +0000

Bump github/codeql-action from 4.35.3 to 4.35.4

Bumps github/codeql-action from 4.35.3 to 4.35.4.


updated-dependencies:

  • dependency-name: github/codeql-action
    dependency-version: 4.35.4
    dependency-type: direct:production
    update-type: version-update:semver-patch
    ...

Signed-off-by: dependabot[bot] <support@github.com>

Files Modified:

  • .github/workflows/codeql.yml

5b991730433e4d101dee44e748425a4db8f13e5a by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/5b991730433e4d101dee44e748425a4db8f13e5a
Authored: 2026-05-19 23:19:08 +0000
Committed: 2026-05-19 23:19:08 +0000

Bump actions/create-github-app-token from 3.1.1 to 3.2.0

Bumps actions/create-github-app-token from 3.1.1 to 3.2.0.


updated-dependencies:

  • dependency-name: actions/create-github-app-token
    dependency-version: 3.2.0
    dependency-type: direct:production
    update-type: version-update:semver-minor
    ...

Signed-off-by: dependabot[bot] <support@github.com>

Files Modified:

  • .github/workflows/notify-pdf-sync.yml
  • .github/workflows/update_locales.yml

957e004e38faa2f0175d905ef09fb3ee85347961 by Titus Wormer <tituswormer@gmail.com>

https://github.com/mozilla/pdf.js/commit/957e004e38faa2f0175d905ef09fb3ee85347961
Authored: 2026-03-26 12:14:14 +0100
Committed: 2026-05-19 21:10:12 +0200

Make text selection more visible (bug 1879559)

References https://bugzilla.mozilla.org/show_bug.cgi?id=1879559
(“In HCM, the text selection is barely visible”).

Continues work from @calixteman who had a partial patch.

This PR improves viewer text-selection highlighting by rendering
selection shapes in the draw layer.

  • add selection overlay rendering in the draw layer
    • significant code relates to selections spanning multiple text
      layers/pages, and edges/end-of-content boundaries
  • clear selection on rotate/scale/scroll/spread changes

My main question is: how should it appear?
I don’t have access to the Figma file linked on bugzilla.

In the CSS (draw_layer-builder.css) there are 3 blocks:

  • default
  • @supports for browsers supporting backdrop-filter
  • forced-colors mode

So it’s possible to design for those (or more).
Personally, the backdrop-filter: invert(1) is the most contrast,
so perhaps it’s better to use something else as the default,
and to use invert(1) if high contrast mode is used (maybe with a
prefers-contrast media query instead)?

Files Modified:

  • src/display/draw_layer.js
  • src/display/filter_factory.js
  • test/integration/text_layer_spec.mjs
  • web/annotation_editor_layer_builder.css
  • web/app.js
  • web/app_options.js
  • web/base_pdf_page_view.js
  • web/draw_layer_builder.css
  • web/draw_layer_builder.js
  • web/pdf_page_view.js
  • web/pdf_viewer.js
  • web/text_layer_builder.css

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

https://github.com/mozilla/pdf.js/commit/60591388a85499f3ff970522d98352dca15da8cc
Authored: 2026-05-19 20:16:32 +0200
Committed: 2026-05-19 21:07:26 +0200

Disable hardware acceleration for Chrome tests

This commit fixes the rendering issue that makes the "must update an
existing annotation" ink editor integration test permafail locally in
Chrome. Note that we already do this for Firefox tests, so this also
improves consistency between the two browsers.

Moreover, improve how we define Chrome options to (similar to their
Firefox counterparts) provide them in a single array, and document the
reasoning for why these options are being set more explicitly.

Fixes #21272.

Files Modified:

  • test/test.mjs

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

https://github.com/mozilla/pdf.js/commit/0d69cc4dcf368272d5122fe04c61ba390fcf06e0
Authored: 2026-05-17 16:12:52 +0200
Committed: 2026-05-18 20:52:00 +0200

Introduce integration tests for the presentation mode functionality

This commit provides coverage for the happy flows of basic operations
like entering/exiting and changing pages.

Files Added:

  • test/integration/presentation_mode_spec.mjs

Files Modified:

  • test/integration/jasmine-boot.js

Duplicate of this bug: 2041505
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://github.com/mozilla-firefox/firefox/commit/8f567c3427d8 https://hg.mozilla.org/integration/autoland/rev/4dfbc8ea6250 Update PDF.js to 25c7d9eaace0438316714aff7033dd5f4c1a542e r=pdfjs-reviewers,calixte
Status: ASSIGNED → RESOLVED
Closed: 19 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: