Closed Bug 1916519 Opened 16 days ago Closed 13 days ago

Update PDF.js to new version da99f5d6cd7ffc2c361627da2fdfe72a122cb4ac from 2024-09-03 18:14:37

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox132 --- affected

People

(Reporter: update-bot, Unassigned)

References

(Blocks 3 open bugs)

Details

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

This update covers 18 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 | 229 ++++++++-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 24 +-
toolkit/components/pdfjs/content/web/images/altText_spinner.svg | 30 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 34 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 92 +--
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 294 insertions(+), 125 deletions(-)


843fde3b1304ee0bcc7b0fedc7684d0a625d6b79 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/843fde3b1304ee0bcc7b0fedc7684d0a625d6b79
Authored: 2024-08-29 18:16:21 +0200
Committed: 2024-09-03 16:38:21 +0200

[Editor] Make the focused stamp annotation more clear from a screen reader point of view (bug 1911994)

It has been tested with Voice Over (mac) and with NVDA (windows).

When an added stamp annotation is focused, the screen reader will announce
that it's a figure containing a graphic with the added alt-text.

Files Modified:

  • src/display/editor/alt_text.js
  • src/display/editor/editor.js
  • src/display/editor/stamp.js
  • src/display/editor/toolbar.js

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

https://github.com/mozilla/pdf.js/commit/a62ceedb692f33bf9d7b25e2ca1a9fe9d25f3c84
Authored: 2024-07-11 22:31:55 +0200
Committed: 2024-09-03 15:27:55 +0200

[Editor] Make highlight annotations editable (bug 1883884)

The goal of this patch is to be able to edit existing highlight annotations.

Files Added:

  • test/pdfs/highlight.pdf
  • test/pdfs/highlights.pdf

Files Modified:

  • src/core/annotation.js
  • src/display/annotation_layer.js
  • src/display/draw_layer.js
  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/editor.js
  • src/display/editor/highlight.js
  • test/integration/highlight_editor_spec.mjs
  • test/integration/test_utils.mjs
  • test/pdfs/.gitignore
  • test/test_manifest.json

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

https://github.com/mozilla/pdf.js/commit/8084ae2054525357b100c5bb3f52fa9705809dba
Authored: 2024-09-01 19:59:22 +0200
Committed: 2024-09-01 19:59:22 +0200

Update translations to the most recent versions

Files Modified:

  • l10n/nn-NO/viewer.ftl
  • l10n/rm/viewer.ftl
  • l10n/sk/viewer.ftl
  • l10n/uk/viewer.ftl

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

https://github.com/mozilla/pdf.js/commit/ec7d0f6860004235476f56539c284f2d9a766369
Authored: 2024-09-01 19:57:15 +0200
Committed: 2024-09-01 19:58:26 +0200

Update dependencies to the most recent versions

Files Modified:

  • package-lock.json
  • package.json

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

https://github.com/mozilla/pdf.js/commit/4220116c1a4e0d6d742c3252478c45d24d49b93f
Authored: 2024-09-01 19:36:48 +0200
Committed: 2024-09-01 19:36:48 +0200

Bump the stable version in pdfjs.config

Files Modified:

  • pdfjs.config

1b0bfcae3ef58e2029fd969434ee20c018c28d0b by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/1b0bfcae3ef58e2029fd969434ee20c018c28d0b
Authored: 2024-08-31 22:29:24 +0200
Committed: 2024-08-31 22:29:24 +0200

Add an option (i.e. --noFirefox) to only use Chrome when running tests

Files Modified:

  • gulpfile.mjs
  • test/test.mjs

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

https://github.com/mozilla/pdf.js/commit/b01df2881044c41cf104d5082f81dd13a5f82cef
Authored: 2024-08-31 18:22:47 +0200
Committed: 2024-08-31 18:31:31 +0200

Use "full" localization ids throughout the code-base

It was recently brought to my attention that using partial or generated localization ids is bad for maintainability, hence this patch goes through the code-base and replaces any such occurrences.

Files Modified:

  • src/display/editor/toolbar.js
  • web/new_alt_text_manager.js
  • web/password_prompt.js
  • web/pdf_find_bar.js

044f1c9e074f71bede758f4ff0ac3d65d88042dc by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/044f1c9e074f71bede758f4ff0ac3d65d88042dc
Authored: 2024-08-31 11:58:43 +0200
Committed: 2024-08-31 11:58:43 +0200

Shorten the code that inits AnnotationEditorLayerBuilder in the web/pdf_page_view.js file

This code can now utilize logical OR assignment, which is ever so slightly shorter.

Files Modified:

  • web/pdf_page_view.js

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

https://github.com/mozilla/pdf.js/commit/bcc511119e7bd8dec126feb4674477b232f004d4
Authored: 2024-08-31 11:17:38 +0200
Committed: 2024-08-31 11:17:38 +0200

Update l10n files

Given the recent l10n-id changes, let's do one more update before the next release to avoid "broken" translations.

Files Modified:

  • l10n/be/viewer.ftl
  • l10n/bg/viewer.ftl
  • l10n/cs/viewer.ftl
  • l10n/da/viewer.ftl
  • l10n/dsb/viewer.ftl
  • l10n/el/viewer.ftl
  • l10n/en-GB/viewer.ftl
  • l10n/eo/viewer.ftl
  • l10n/es-AR/viewer.ftl
  • l10n/es-CL/viewer.ftl
  • l10n/fr/viewer.ftl
  • l10n/fy-NL/viewer.ftl
  • l10n/he/viewer.ftl
  • l10n/hsb/viewer.ftl
  • l10n/hu/viewer.ftl
  • l10n/ia/viewer.ftl
  • l10n/is/viewer.ftl
  • l10n/it/viewer.ftl
  • l10n/kk/viewer.ftl
  • l10n/ko/viewer.ftl
  • l10n/nl/viewer.ftl
  • l10n/nn-NO/viewer.ftl
  • l10n/pl/viewer.ftl
  • l10n/pt-BR/viewer.ftl
  • l10n/ru/viewer.ftl
  • l10n/sc/viewer.ftl
  • l10n/skr/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

36c5d192c7b96d8b92d59ac96ffce69eada57cf7 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/36c5d192c7b96d8b92d59ac96ffce69eada57cf7
Authored: 2024-08-30 10:52:52 +0200
Committed: 2024-08-30 15:48:51 +0200

[Editor] Update the loading icon when wait for ML to take into account prefered-reduced-motion setting

Files Added:

  • .svglintrc.js

Files Modified:

  • gulpfile.mjs
  • package-lock.json
  • package.json
  • web/images/altText_spinner.svg

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

https://github.com/mozilla/pdf.js/commit/a94e8ba9e8933d0893ee96638814a91b32949d76
Authored: 2024-08-29 22:45:19 +0200
Committed: 2024-08-29 22:52:26 +0200

Add a helper function for http/https requests in src/display/node_stream.js

Currently we repeat virtually the same http/https request code in two different classes in this file, which seems unnecessary and it leads to more code.

Files Modified:

  • src/display/node_stream.js

39ac3ef1a6c5123b1ded1482d7517dba4de1f659 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/39ac3ef1a6c5123b1ded1482d7517dba4de1f659
Authored: 2024-08-29 12:57:57 +0200
Committed: 2024-08-29 20:26:11 +0200

Move the metric-locale check into PDFDocumentProperties.#parsePageSize

With the introduction of Fluent the getLanguage-method became synchronous, hence it no longer seems necessary to do the metric-locale check eagerly in the constructor and it can instead be "delayed" until actually needed.

Files Modified:

  • web/pdf_document_properties.js

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

https://github.com/mozilla/pdf.js/commit/a6e54160cc13bfd723e4aeede29c6295dd88138b
Authored: 2024-08-29 12:49:53 +0200
Committed: 2024-08-29 20:26:11 +0200

Use "full" localization ids in the PDFDocumentProperties class

It was recently brought to my attention that using partial or generated localization ids is bad for maintainability, which means that PR 18636 wasn't the correct thing to do.
However, just reverting that one doesn't really fix the problems which is why this patch updates every l10n-id in the PDFDocumentProperties class (but doesn't touch any viewer.ftl-files). Obviously this leads to more verbose code, but that cannot really be helped.

Files Modified:

  • web/pdf_document_properties.js

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

https://github.com/mozilla/pdf.js/commit/a5d0e410c7bcadbd4decbf4eea9da232c1ec01a4
Authored: 2024-08-27 14:48:18 +0200
Committed: 2024-08-29 12:48:11 +0200

Simplify the PDFDocumentProperties.#updateUI method

We can remove the reset-parameter, since it's redundant, given that it's only used after PDFDocumentProperties.#reset has been invoked which means that this.#fieldData === null which is equivalent to resetting.
Also, we don't need to have two separate loops in order to update the UI in this method.

Finally, inline the DEFAULT_FIELD_CONTENT constant now that it's only used once.

Files Modified:

  • web/pdf_document_properties.js

229ad1bb2ccf27eaee7fb0ebec5f4f2471041667 by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/229ad1bb2ccf27eaee7fb0ebec5f4f2471041667
Authored: 2024-08-27 17:58:04 +0200
Committed: 2024-08-27 18:19:25 +0200

Use the URL global instead of the deprecated url.parse

The Node.js url.parse API (https://nodejs.org/api/url.html#urlparseurlstring-parsequerystring-slashesdenotehost)
is deprecated because it's prone to security issues (to the point that Node.js doesn't even publish CVEs for it anymore).

The official reccomendation is to instead use the global URL constructor, available both in Node.js and in browsers.
Node.js filesystem APIs accept URL objects as parameter, so this also avoids a few URL->filepath conversions.

Files Modified:

  • src/display/node_stream.js
  • test/test.mjs
  • test/unit/node_stream_spec.js
  • test/webserver.mjs

1d545382a3363347db9ecdb4385555870c4b4a96 by Rob Wu <rob@robwu.nl>

https://github.com/mozilla/pdf.js/commit/1d545382a3363347db9ecdb4385555870c4b4a96
Authored: 2024-08-25 22:03:38 +0200
Committed: 2024-08-25 22:03:38 +0200

[CRX] Remove obsolete extension API calls

These work arounds are no longer relevant to the latest Chrome versions.

Files Modified:

  • extensions/chromium/preserve-referer.js

683b511f20e2550b6f580173f0e626f14e3ee06e by Rob Wu <rob@robwu.nl>

https://github.com/mozilla/pdf.js/commit/683b511f20e2550b6f580173f0e626f14e3ee06e
Authored: 2024-08-25 20:34:03 +0200
Committed: 2024-08-25 20:34:03 +0200

[CRX] Remove obsolete manifest features

In preparation for migrating the Chrome extension to Manifest Version 3,
this patch removes parts of the manifest that are obsolete and/or
unsupported in MV3.

Remove ftp mentions: ftp was dropped from 6 years ago, in Chrome 59.

Remove file_browser_handlers: does not work on Chrome OS according to
https://github.com/mozilla/pdf.js/issues/14161 . MV3 replacement needs
a different manifest key and logic, which will be added later.

Remove content_security_policy: MV3 does not support unsafe-eval CSP,
and PDF.js does not require it. This may result in a mild performance
degradation in PDFs that contain PostScript.

Remove page_action logic: When this logic was originally introduced,
Chrome showed page action buttons in the address bar, which enabled
the extension to display the button on specific PDF viewer tabs only.
In Chrome 49 (2016), pageActions were dropped from the address bar and
put in an UI area that is hidden by default. The user can pin the button
to be unconditionally visible on the toolbar, which is distracting.
Because the UX is no longer serving the original needs, this patch
removes page_action from the manifest.

Files Deleted:

  • extensions/chromium/icon19.png
  • extensions/chromium/icon38.png
  • extensions/chromium/pageAction/background.js
  • extensions/chromium/pageAction/popup.html
  • extensions/chromium/pageAction/popup.js
  • extensions/chromium/pdfHandler-vcros.js

Files Modified:

  • extensions/chromium/extension-router.js
  • extensions/chromium/manifest.json
  • extensions/chromium/pdfHandler.html
  • web/chromecom.js
  • web/pdf_history.js

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

https://github.com/mozilla/pdf.js/commit/54eead78abcdf26d98fea706ed5c2d38b216c903
Authored: 2024-08-09 19:05:42 +0200
Committed: 2024-08-25 12:49:20 +0200

Upgrade Puppeteer to version 23.1.1

This major version contains three breaking changes that impact us:

  • The product option has been renamed to the more suitable browser.
  • The page.screenshot() API returns a Uint8Array instead of a
    Buffer, but since pngjs requires a Buffer object we need to do
    the conversion using Buffer.from() before passing data to pngjs.
  • The browser configuration should be set using a configuration file
    instead of environment variables. Note that as a bonus this allows us
    to remove the cross-env dependency since that was only used to set
    the Puppeteer environment variable equally for all operating systems.

For more information about the changes between the old and new Puppeteer
versions refer to https://github.com/puppeteer/puppeteer/releases.

Files Added:

  • .puppeteerrc

Files Modified:

  • package-lock.json
  • package.json
  • test/integration/freetext_editor_spec.mjs
  • test/test.mjs

Duplicate of this bug: 1915145

Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(cdenizet)
Status: NEW → RESOLVED
Closed: 13 days ago
Flags: needinfo?(cdenizet)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.