Closed Bug 1939257 Opened 2 months ago Closed 2 months ago

Update PDF.js to new version 4547f230bac8103ebfcc038a649861bae939e81c from 2024-12-22 19:22:20

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

(Whiteboard: [3pl-filed][task_id: H-HQq-1MSnabxyW7NRfGTw])

Attachments

(1 file)

This update covers 49 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 | 750 +++++++++----
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 7 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 298 +++--
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 13 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 320 ++---
toolkit/components/pdfjs/content/web/viewer.css | 24 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 353 ++---
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 993 insertions(+), 778 deletions(-)


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

https://github.com/mozilla/pdf.js/commit/cdce9c2beebbefd78c7fd3983ff3bf4b107508e0
Authored: 2024-12-22 13:35:44 +0100
Committed: 2024-12-22 14:08:56 +0100

Update the page title/favicon of the test runner HTML files

This commit makes sure that the font tests are no longer reported as
being unit tests and that the PDF.js logo is shown in the browser tab to
make PDF.js-specific resources/tabs more easily identifyable during e.g.
development.

Files Modified:

  • test/font/font_test.html
  • test/resources/favicon.ico
  • test/unit/unit_test.html

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

https://github.com/mozilla/pdf.js/commit/22ad864cc7bbe0e2c61b61e1adb689dd6130303c
Authored: 2024-12-22 13:33:41 +0100
Committed: 2024-12-22 14:08:56 +0100

Move the reporter file to the test root folder

The reporter is used in both the unit and the font tests, so this commit
moves it to the test root folder to more clearly indicate that this is a
shared resource and so the font tests don't have to reach into the unit
tests folder to import it (which improves separation).

Files Modified:

  • test/font/jasmine-boot.js
  • test/unit/jasmine-boot.js

Files Changed:

  • R100 test/unit/testreporter.js

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

https://github.com/mozilla/pdf.js/commit/a43fc32bf35c5bce7a4ce031cbc69cbe97d196c2
Authored: 2024-12-22 13:30:57 +0100
Committed: 2024-12-22 14:08:55 +0100

Move the integration tests boot file to the integration tests folder

This file is specific to the integration tests, so this commit moves it
to bundle the integration test logic a bit better and to match the
unit/font tests in terms of folder structure for consistency.

Files Modified:

  • test/test.mjs

Files Changed:

  • R098 test/integration-boot.mjs

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

https://github.com/mozilla/pdf.js/commit/ec1a05c1045215b33bd62a7f49ba59a071babf43
Authored: 2024-12-21 14:15:28 +0100
Committed: 2024-12-21 14:22:18 +0100

Add missing startWorkerTask calls in the "SaveDocument" handler

Without these calls we'll not actually wait for saving to complete when document destruction runs; compare with other WorkerTask-usage in this file.
While I cannot imagine that this has caused any problems for library users, the code is however not technically correct as-is.

Files Modified:

  • src/core/worker.js

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

https://github.com/mozilla/pdf.js/commit/d34ac535f0fc0e5b45c820f0006c6bcaf2f7ea20
Authored: 2024-12-19 21:17:35 +0100
Committed: 2024-12-19 21:17:35 +0100

Update translations to the most recent versions

Files Modified:

  • l10n/be/viewer.ftl
  • l10n/cs/viewer.ftl
  • l10n/cy/viewer.ftl
  • l10n/da/viewer.ftl
  • l10n/de/viewer.ftl
  • l10n/el/viewer.ftl
  • l10n/en-CA/viewer.ftl
  • l10n/eo/viewer.ftl
  • l10n/es-CL/viewer.ftl
  • l10n/es-ES/viewer.ftl
  • l10n/fi/viewer.ftl
  • l10n/fr/viewer.ftl
  • l10n/fy-NL/viewer.ftl
  • l10n/gn/viewer.ftl
  • l10n/he/viewer.ftl
  • l10n/hu/viewer.ftl
  • l10n/ia/viewer.ftl
  • l10n/ja/viewer.ftl
  • l10n/ka/viewer.ftl
  • l10n/kk/viewer.ftl
  • l10n/nl/viewer.ftl
  • l10n/nn-NO/viewer.ftl
  • l10n/oc/viewer.ftl
  • l10n/pl/viewer.ftl
  • l10n/pt-BR/viewer.ftl
  • l10n/pt-PT/viewer.ftl
  • l10n/rm/viewer.ftl
  • l10n/sk/viewer.ftl
  • l10n/skr/viewer.ftl
  • l10n/sl/viewer.ftl
  • l10n/sq/viewer.ftl
  • l10n/tg/viewer.ftl
  • l10n/th/viewer.ftl
  • l10n/tr/viewer.ftl
  • l10n/uk/viewer.ftl
  • l10n/zh-CN/viewer.ftl

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

https://github.com/mozilla/pdf.js/commit/af0ffd29fa3f7d86e98ae7854986c99f8381b9c7
Authored: 2024-12-19 21:14:29 +0100
Committed: 2024-12-19 21:14:29 +0100

Fix vulnerability in the nanoid dependency

This patch is generated with npm audit fix and fixes GHSA-mwcw-c2x4-8c55.

Files Modified:

  • package-lock.json

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

https://github.com/mozilla/pdf.js/commit/d70ede47513d09635cc5a18af93b5720bec3ebe2
Authored: 2024-12-19 21:07:23 +0100
Committed: 2024-12-19 21:13:00 +0100

Update dependencies to the most recent versions

Files Modified:

  • package-lock.json
  • package.json

723ee9bc8c5da98dda42621a6930257ef72efc07 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/723ee9bc8c5da98dda42621a6930257ef72efc07
Authored: 2024-12-18 17:00:45 +0100
Committed: 2024-12-18 17:00:45 +0100

Take the absolute value of the font size when the annotation contents is in xhtml (bug 1938087)

Files Modified:

  • src/core/xfa/xhtml.js
  • test/unit/xfa_tohtml_spec.js

760c4a029729b8be26b40a4d346165bd0db75bee by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/760c4a029729b8be26b40a4d346165bd0db75bee
Authored: 2024-12-18 10:09:56 +0100
Committed: 2024-12-18 10:15:33 +0100

Disable the handle reading ranges with missing/invalid "Content-Range" header unit-test in Google Chrome (PR 19114 follow-up)

Note that PR 19212 tried to change the test-server to fix the intermittent failure in Google Chrome, however that unfortunately caused other unit-tests to start failing.
As long as this unit-test still runs successfully in Mozilla Firefox that should be enough, and it doesn't seem like a good use of our time to hunt down a bug that only happens in Google Chrome.

Files Modified:

  • test/unit/network_spec.js

189183aa1a178ef10079c86b8560e06a739cc8a5 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/189183aa1a178ef10079c86b8560e06a739cc8a5
Authored: 2024-12-18 09:36:19 +0100
Committed: 2024-12-18 09:39:22 +0100

Add basic support for non-embedded HelveticaLTStd-Bold fonts (issue 19234)

Files Added:

  • test/pdfs/issue19234.pdf.link

Files Modified:

  • src/core/standard_fonts.js
  • test/test_manifest.json

4e2aabc5cd8a6b9732241adbaf7c11c027f7a3fc by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/4e2aabc5cd8a6b9732241adbaf7c11c027f7a3fc
Authored: 2024-12-16 16:01:08 +0100
Committed: 2024-12-16 16:04:13 +0100

Fix left offset when scrolling to search result

When computing the left offset of the highlighted text, we cannot use
.offsetLeft because the text might have been scaled through CSS, and it
needs to be taken into account.

Use .getClientRects()/.getBoundingClientRect() instead, which will
return measurements scaled appropriately.

Files Added:

  • test/pdfs/issue19207.pdf

Files Modified:

  • test/integration/find_spec.mjs
  • test/pdfs/.gitignore
  • web/text_highlighter.js

29c3b7bec5211aa4551880c60b55620372bfe0cc by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/29c3b7bec5211aa4551880c60b55620372bfe0cc
Authored: 2024-12-15 18:11:11 +0100
Committed: 2024-12-15 18:13:38 +0100

Disable touch-zooming, in the viewer, if AbortSignal.any is unsupported (PR 19216 follow-up)

This way loading of the entire viewer won't break in older browsers that lack AbortSignal.any support; see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static#browser_compatibility

Files Modified:

  • web/app.js

780692b2265ed13c6197dd68cda43ba7c92a1713 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/780692b2265ed13c6197dd68cda43ba7c92a1713
Authored: 2024-12-15 16:30:31 +0100
Committed: 2024-12-15 16:30:31 +0100

Bump library version to 4.10

Files Modified:

  • pdfjs.config

490e74036556427107ab87f9e2792b19714575e5 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/490e74036556427107ab87f9e2792b19714575e5
Authored: 2024-12-15 14:13:44 +0100
Committed: 2024-12-15 14:13:44 +0100

[api-minor] Remove deprecated getDocument options (PR 18776 follow-up)

Files Modified:

  • src/display/api.js

4ed7f7f1eeff5849c7c7545b708f9660ff2a2f3e by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/4ed7f7f1eeff5849c7c7545b708f9660ff2a2f3e
Authored: 2024-12-12 15:05:22 +0100
Committed: 2024-12-14 19:39:51 +0100

[Editor] Add the ability to resize an editor in using a pinch gesture

Files Modified:

  • src/display/editor/editor.js
  • src/display/editor/tools.js
  • src/display/touch_manager.js
  • web/app.js
  • web/pdf_viewer.js

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

https://github.com/mozilla/pdf.js/commit/e0b63ecd03c67bf557a6ae6c718d2ed135e6c890
Authored: 2024-12-11 16:41:35 +0100
Committed: 2024-12-11 23:20:01 +0100

Move the pinch stuff in its own file in order to use for editors

Files Added:

  • src/display/touch_manager.js

Files Modified:

  • src/pdf.js
  • test/unit/pdf_spec.js
  • web/app.js
  • web/pdfjs.js

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

https://github.com/mozilla/pdf.js/commit/d61b882888006c8fa4479f318459999ed73c535d
Authored: 2024-12-11 13:49:48 +0100
Committed: 2024-12-11 15:06:56 +0100

[Editor] Avoid to focus an existing editor when enabling the layer

It fixes #18911.

Files Added:

  • test/pdfs/issue18911.pdf

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/draw.js
  • src/display/editor/editor.js
  • src/display/editor/freetext.js
  • src/display/editor/highlight.js
  • src/display/editor/stamp.js
  • test/integration/highlight_editor_spec.mjs
  • test/pdfs/.gitignore

08e54053ff28b6cdd605b08a53d045cff9a9eb22 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/08e54053ff28b6cdd605b08a53d045cff9a9eb22
Authored: 2024-12-11 12:03:54 +0100
Committed: 2024-12-11 12:16:31 +0100

Don't remove trailing regular spaces from the "raw" response headers (issue 19205)

This bug only seems to reproduce in Google Chrome, since browsers apparently sort response headers differently.
When the issue occurs the "raw" response headers string looks like this:

content-length: 525404\r\ncontent-type: \r\n

and since we trim any leading/trailing white-space characters the "content-type" header isn't detected correctly, which thus leads to new Headers(...) throwing.

Hence we'll keep regular spaces at the end of the "raw" response headers string, while still removing all other kinds of trailing white-space characters.

Note: The response headers parsing was based on https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders#examples

Files Modified:

  • src/display/network.js

89f61b4262f5c722325214bfb67040804bf35c26 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/89f61b4262f5c722325214bfb67040804bf35c26
Authored: 2024-11-28 17:42:13 +0100
Committed: 2024-12-10 21:54:29 +0100

[Editor] Improve drawing on a touch screen.

  • it's now possible to start a drawing with a pen and use fingers to zoom
    or scroll without interacting with the current drawing;
  • it's now possible to draw with a finger and them zoom with two fingers.

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/draw.js
  • src/display/editor/drawers/inkdraw.js
  • web/annotation_editor_layer_builder.css

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

https://github.com/mozilla/pdf.js/commit/b7ab5ee01831e36902e228895851e73c71cdbded
Authored: 2024-12-10 19:59:54 +0100
Committed: 2024-12-10 19:59:54 +0100

Update Puppeteer to version 23.10.3

Files Modified:

  • package-lock.json
  • package.json

73701ad873fdee657ba6376fc11293d0aea52301 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/73701ad873fdee657ba6376fc11293d0aea52301
Authored: 2024-12-10 18:21:05 +0100
Committed: 2024-12-10 19:55:55 +0100

Update Puppeteer to version 23.10.2

Files Modified:

  • package-lock.json
  • package.json

74a377f72feb68e976ace12617384def4fe47a6f by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/74a377f72feb68e976ace12617384def4fe47a6f
Authored: 2024-12-08 22:16:41 +0100
Committed: 2024-12-10 16:14:26 +0100

Fix intermittent failures when moving a freetext annotation in integration tests

When an editor is moved with the keyboard or in dragging it, it is moved in the DOM in order
to make screen readers happy. But this move is slightly postponed thanks to a setTimeout(..., 0).
The failures were very likely due to the fact that intermittently the DOM move was done in
the middle of the next key sequence which was making the move on screen failing.

Files Modified:

  • src/display/editor/editor.js
  • test/integration/freetext_editor_spec.mjs
  • test/integration/test_utils.mjs

62db66dd4645efadc896f628ac7a5b3067a06e77 by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/62db66dd4645efadc896f628ac7a5b3067a06e77
Authored: 2024-12-10 12:00:09 +0100
Committed: 2024-12-10 12:00:09 +0100

Simplify logic to insert canvas as first element

Instead of conditionally checking if the .cavnasWrapper already
has a child element and then inserting the canvas before it, we can
use .prepend which always injects the new element as the first
child.

Files Modified:

  • web/pdf_page_view.js

3402b727eeab7ae3f2ba3ebf4a97adf578efa771 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/3402b727eeab7ae3f2ba3ebf4a97adf578efa771
Authored: 2024-12-09 19:55:31 +0100
Committed: 2024-12-09 19:55:37 +0100

Make sure the canvas is always the first child of its wrapper

While drawing, in zooming fast enough, it's possible, intermittently, to have the canvas
after the svg which makes the svg invisible.
So this patch makes sure to have the canvas at the right position.

Files Modified:

  • web/pdf_page_view.js

19ea64c6d747bdb4aba6e3be751f193d5d312e0d by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/19ea64c6d747bdb4aba6e3be751f193d5d312e0d
Authored: 2024-12-09 18:02:18 +0100
Committed: 2024-12-09 18:02:18 +0100

Update OpenJPEG to 2.5.3

Files Modified:

  • external/openjpeg/openjpeg.js

166a529ddd1cb5ccc8aa9293f4380661cc9753b2 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/166a529ddd1cb5ccc8aa9293f4380661cc9753b2
Authored: 2024-12-09 17:25:36 +0100
Committed: 2024-12-09 17:25:36 +0100

[Editor] Don't commit the current drawing while zooming

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • web/annotation_editor_layer_builder.js

99f3e6b4ec3003a80971135869a36f787abc65f3 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/99f3e6b4ec3003a80971135869a36f787abc65f3
Authored: 2024-12-09 16:07:39 +0100
Committed: 2024-12-09 16:07:43 +0100

[Editor] When resizing a stamp annotation, the opposite corner must stay fixed

It was due the resize observer which is removed thanks to this patch.
In order to reuse the dragAndDrop function in test, this patch slighty refactors it
in order to make it easier to use.

Files Modified:

  • src/display/editor/stamp.js
  • test/integration/freetext_editor_spec.mjs
  • test/integration/ink_editor_spec.mjs
  • test/integration/stamp_editor_spec.mjs
  • test/integration/test_utils.mjs

6153b15231a9158feb3c8f136cbe6efdd3119f39 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/6153b15231a9158feb3c8f136cbe6efdd3119f39
Authored: 2024-12-09 15:03:09 +0100
Committed: 2024-12-09 15:09:18 +0100

Remove the raw path-strings after creating the actual Path2D glyph-objects

The Path2D glyph-objects are cached on the FontFaceObject-instance, so we can save a little bit of memory by removing the raw path-strings once they're no longer needed.

Files Modified:

  • src/display/api.js
  • src/display/font_loader.js

2b059245049f187ecdc009810bcd5febccb4f27b by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/2b059245049f187ecdc009810bcd5febccb4f27b
Authored: 2024-12-06 23:16:16 +0100
Committed: 2024-12-08 17:12:10 +0100

Improve perfs of the font renderer

Some SVG paths are generated from the font and used in the main thread
to render the glyphs.

Files Modified:

  • src/core/font_renderer.js
  • src/display/canvas.js
  • src/display/font_loader.js
  • src/shared/util.js

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

https://github.com/mozilla/pdf.js/commit/f6662d3f7ca9fb24116f400f7527d62e94d43934
Authored: 2024-12-08 16:06:25 +0100
Committed: 2024-12-08 16:06:25 +0100

Add a ref test for setting disableFontFace to true

Files Modified:

  • test/driver.js
  • test/test_manifest.json

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

https://github.com/mozilla/pdf.js/commit/c6e3fc4fe688165bd9f7d6223d3ef55d935f78c1
Authored: 2024-12-08 14:45:54 +0100
Committed: 2024-12-08 15:51:04 +0100

Take the userUnit into account in the PageViewport class (issue 19176)

Files Added:

  • test/pdfs/issue19176.pdf

Files Modified:

  • src/display/api.js
  • src/display/display_utils.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • test/unit/api_spec.js

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

https://github.com/mozilla/pdf.js/commit/e74080915de27b98e609877a73cbf9cddeee9ee9
Authored: 2024-12-07 19:05:02 +0100
Committed: 2024-12-07 19:28:26 +0100

Fix intermittent issues in the issue14307.pdf integration tests

The must check input for US zip format integration test fails pretty
consistently in Puppeteer 23.4.0+ with Expected '12341' to equal '12345'. This is reproducible with the pdf.sandbox.external.js hack
from https://github.com/mozilla/pdf.js/issues/18396#issuecomment-2211273743.
Investigation uncovered two issues at play here:

  1. We do two clearInput calls, but don't await processing of the two
    sandbox events that are triggered by that action. The three tests that
    use issue14307.pdf are in different describe blocks and therefore
    reload the PDF file, so we can simply remove those calls because the
    inputs are already empty by default.

  2. We don't await processing of the sandbox events that occur after
    switching to another text field. This causes the expectation failure
    because the typing actions will happen too soon and interfere with
    the sandbox event processing. We solve the issue by explicitly
    awaiting the sandbox roundtrip.

Moreover, similar to PR #19001 and #18399 we remove any remaining room
for intermittent issues by directly checking for the expected value,
which also results in shorter code.

Files Modified:

  • test/integration/scripting_spec.mjs

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

https://github.com/mozilla/pdf.js/commit/c60a6d1ebd9c2999f305c1ddbcefb7a06841c40c
Authored: 2024-12-07 14:01:00 +0100
Committed: 2024-12-07 14:08:09 +0100

Print more warnings about potential problems in Node.js environments

  • Warn if the "regular" PDF.js build is used in Node.js environments, since that won't load any of the relevant polyfills.

  • Warn if the require function cannot be accessed, since currently we're just "swallowing" any errors.

Files Modified:

  • src/display/node_utils.js

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

https://github.com/mozilla/pdf.js/commit/2738d1e4f6f9e37dec340d5ef41e451966a49a43
Authored: 2024-12-07 13:23:29 +0100
Committed: 2024-12-07 13:44:57 +0100

Update translations to the most recent versions

Files Modified:

  • l10n/cs/viewer.ftl
  • l10n/dsb/viewer.ftl
  • l10n/en-CA/viewer.ftl
  • l10n/en-GB/viewer.ftl
  • l10n/es-AR/viewer.ftl
  • l10n/fa/viewer.ftl
  • l10n/hr/viewer.ftl
  • l10n/hsb/viewer.ftl
  • l10n/id/viewer.ftl
  • l10n/is/viewer.ftl
  • l10n/it/viewer.ftl
  • l10n/ko/viewer.ftl
  • l10n/pa-IN/viewer.ftl
  • l10n/ru/viewer.ftl
  • l10n/sr/viewer.ftl
  • l10n/sv-SE/viewer.ftl
  • l10n/vi/viewer.ftl
  • l10n/zh-TW/viewer.ftl

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

https://github.com/mozilla/pdf.js/commit/129fc66f65fd4fb63cb08b8c5a86ad60dc12336b
Authored: 2024-12-07 13:34:27 +0100
Committed: 2024-12-07 13:44:48 +0100

Upgrade eslint-plugin-perfectionist to version 4.2.0

This requires two changes on our side:

  • The order of exports in web/viewer{-geckoview}.js changes slightly
    because eslint-plugin-perfectionist aligned the sorting order with
    the eslint-plugin-sort-exports plugin we used before. This restores
    the change from commit 347f155.
  • The eslint-plugin-import plugin contains a bug that causes the new
    version of eslint-plugin-perfectionist to be reported as unresolved.
    This issue is tracked upstream, and since the plugin works fine we
    can simply extend the ignore list we already have to avoid this error
    until the upstream bug is fixed.

Files Modified:

  • eslint.config.mjs
  • package-lock.json
  • package.json
  • web/viewer-geckoview.js
  • web/viewer.js

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

https://github.com/mozilla/pdf.js/commit/7d1ca73acc571e48d612b9efe53a562a9f2a628d
Authored: 2024-12-07 13:21:27 +0100
Committed: 2024-12-07 13:22:44 +0100

Update dependencies to the most recent versions

Files Modified:

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

6fe6b6d6b7eead129622f73cb99bd295a1715562 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/6fe6b6d6b7eead129622f73cb99bd295a1715562
Authored: 2024-12-06 15:53:36 +0100
Committed: 2024-12-06 18:25:13 +0100

Get the first codepoint instead of the first char when using the toUnicode map

It fixes #19182.

Files Added:

  • test/pdfs/issue19182.pdf

Files Modified:

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

49326f71c2baa8874bacdd37b1ddbefd8fbf198f by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/49326f71c2baa8874bacdd37b1ddbefd8fbf198f
Authored: 2024-12-05 17:03:47 +0100
Committed: 2024-12-06 17:53:28 +0100

Support toggling the PDFFindBar options with the Enter key (issue 19175)

These DOM elements are input type="checkbox" and (natively) only support being toggled with the Space key, however we can extend an existing event-listener to "manually" support the Enter key as well.

Files Modified:

  • web/pdf_find_bar.js

202b26487f7ed0bf94d84f49de0a360c39d202ff by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/202b26487f7ed0bf94d84f49de0a360c39d202ff
Authored: 2024-12-02 13:28:20 +0100
Committed: 2024-12-06 14:47:22 +0100

Do not stringify errors when logging them

Converting errors to string drops their stack trace, making it more
difficult to debug their actual reason. We can instead pass the error
objects as-is to console.warn/error, so that Firefox/Chrome devtools
will show both the stack trace of the console.warn/error call, and the
original stack trace of the error.

This commit also enables the unicorn/no-console-spaces ESLint rule,
which avoids accidental extra spaces when passing multiple parameters to
console.* methods.

Files Modified:

  • eslint.config.mjs
  • test/downloadutils.mjs
  • test/driver.js
  • test/unit/testreporter.js
  • web/app.js
  • web/download_manager.js
  • web/firefoxcom.js
  • web/l10n.js
  • web/pdf_page_view.js
  • web/pdf_rendering_queue.js
  • web/pdf_scripting_manager.js
  • web/viewer.js

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

https://github.com/mozilla/pdf.js/commit/eff8ede33ec8d0e338ca50d6fa8dad45ad54f481
Authored: 2024-12-01 11:36:18 +0100
Committed: 2024-12-06 12:09:36 +0100

Make the onError callback required in NetworkManager

This helps ensure that loading errors are always handled correctly, and note that both PDFNetworkStreamFullRequestReader and PDFNetworkStreamRangeRequestReader already provided such a callback.

Files Modified:

  • src/display/network.js

2661d0623bb002eedc8948e190ef9419a3593646 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/2661d0623bb002eedc8948e190ef9419a3593646
Authored: 2024-11-27 12:33:39 +0100
Committed: 2024-12-06 12:09:34 +0100

Ensure that a missing/invalid "Content-Range" header is handled in PDFNetworkStream (issue 19075)

In the event that the "Content-Range" header is missing/invalid, loading will now be aborted rather than hanging indefinitely.

Files Modified:

  • src/display/network.js
  • test/unit/network_spec.js
  • test/webserver.mjs

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

https://github.com/mozilla/pdf.js/commit/f3038406b1c2685a09d300ec3f18a2b89c642b22
Authored: 2024-12-04 19:34:57 +0100
Committed: 2024-12-05 23:15:04 +0100

When zooming replace the css-zoomed canvas by the new one only when rendering is finished

It fixes #18622.

It avoids to recreate a canvasWrapper element in order minimize the DOM operations.

Files Modified:

  • test/integration/viewer_spec.mjs
  • web/pdf_page_view.js
  • web/pdf_viewer.css

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

https://github.com/mozilla/pdf.js/commit/34390ca53a84315bb3c9b1184b10983e490b6086
Authored: 2024-12-05 22:25:31 +0100
Committed: 2024-12-05 22:25:31 +0100

Bump the stable version in pdfjs.config

Files Modified:

  • pdfjs.config

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

https://github.com/mozilla/pdf.js/commit/d1db8d6294fa1be07543ffa60795e02b4fa86b1a
Authored: 2024-12-05 21:03:54 +0100
Committed: 2024-12-05 21:04:07 +0100

Avoid to display an alert or a confirm dialog if the message is empty

It fixes #19171.

Files Modified:

  • src/scripting_api/app.js
  • test/unit/scripting_spec.js

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

https://github.com/mozilla/pdf.js/commit/dfa0e79553110a0b0d7b92edeaa18b404f14bd7b
Authored: 2024-12-05 14:22:00 +0100
Committed: 2024-12-05 14:22:02 +0100

[Editor] Correctly update the current drawing when zooming

We were trying to update the drawing on the current page but if the drawing is an another
page then it wasn't updated.

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/tools.js
  • test/integration/ink_editor_spec.mjs

61e2eceff610cbef562ee0b3696541a3921d6515 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/61e2eceff610cbef562ee0b3696541a3921d6515
Authored: 2024-12-05 13:07:57 +0100
Committed: 2024-12-05 13:07:57 +0100

Ensure that the .toggleButton, as used in the findbar, always have visible hover/focus state (issue 19165)

Similar to the regular toolbarButtons that can be toggled, this ensure that it's always possible to tell when the findbar "buttons" are hovered/focused.

Files Modified:

  • web/viewer.css

3ac55501e9d02db90736cb87549de3ca480e522a by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/3ac55501e9d02db90736cb87549de3ca480e522a
Authored: 2024-12-04 17:57:17 +0100
Committed: 2024-12-04 18:42:49 +0100

Correctly wait for the editor mode when double clicking on an annotation in integration tests

Files Modified:

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

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

https://github.com/mozilla/pdf.js/commit/ef0331877d2e47c14ef5382ac40c29ccb8d77bbc
Authored: 2024-11-13 11:07:55 +0100
Committed: 2024-12-04 10:31:42 +0100

Introduce Promise.try() usage in the code-base

This simplifies the creation of Promises in some cases; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try

Files Modified:

  • src/shared/message_handler.js
  • src/shared/util.js

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

https://github.com/mozilla/pdf.js/commit/a2b889bb9ad1ac7041bbc633b60d62e85429b7e9
Authored: 2024-12-02 13:38:22 +0100
Committed: 2024-12-02 13:38:22 +0100

Prevent Webpack from resolving import.meta.url statements during building (issue 19145)

This fixes a Node.js-specific regression from PR 18959.

Files Modified:

  • gulpfile.mjs

Duplicate of this bug: 1938477
Assignee: nobody → update-bot
Status: NEW → ASSIGNED

All jobs completed, we found the following issues.

Known Issues:

  • browser/base/content/test/static/browser_all_files_referenced.js
    - test-macosx1015-64-qr/opt-mochitest-devtools-chrome-1 (T_yoJMfLRL6aI87c9dHWig)

These failures may mean that the library update succeeded; you'll need to review
them yourself and decide. If there are lint failures, you will need to fix them in
a follow-up patch. (Or ignore the patch I made, and recreate it yourself with
./mach vendor toolkit/components/pdfjs/moz.yaml.)

In either event, I have done all I can, so you will need to take it from here.
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/e5ab532ad1c2 Update PDF.js to 4547f230bac8103ebfcc038a649861bae939e81c r=pdfjs-reviewers,Snuffleupagus
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Regressions: 1947248
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: