Closed Bug 1882694 Opened 7 months ago Closed 7 months ago

Update PDF.js to new version 9fe15d4a018ad00d821ed78fbf93bad689f3588a from 2024-02-28 19:00:15

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1882583

People

(Reporter: update-bot, Assigned: calixte)

Details

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

Attachments

(1 file)

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


toolkit/components/pdfjs/content/build/pdf.mjs | 455 ++++++++++----
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 6 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 9 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 84 ++-
toolkit/components/pdfjs/content/web/viewer.mjs | 108 ++-
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 480 insertions(+), 186 deletions(-)


3a7e638fcec72964bda030b82220892f3073b6cb by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/3a7e638fcec72964bda030b82220892f3073b6cb
Authored: 2024-02-28 18:24:24 +0100
Committed: 2024-02-28 18:24:24 +0100

[Editor] Count the colors used when highlighting whatever the highlight kind is

Files Modified:

  • src/display/editor/highlight.js

65342d2beeff916705086f576099485d3e27a886 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/65342d2beeff916705086f576099485d3e27a886
Authored: 2024-02-27 21:44:13 +0100
Committed: 2024-02-28 10:17:11 +0100

[Editor] Add some telemetry for the highlight feature (bug 1866437)

Files Modified:

  • src/display/annotation_storage.js
  • src/display/editor/alt_text.js
  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/editor.js
  • src/display/editor/highlight.js
  • src/display/editor/stamp.js
  • src/display/editor/tools.js
  • web/alt_text_manager.js
  • web/app.js

e0b843d9918fcdbefe306b32ccba4e6a884de9ae by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/e0b843d9918fcdbefe306b32ccba4e6a884de9ae
Authored: 2024-02-27 22:19:37 +0100
Committed: 2024-02-27 22:48:08 +0100

Always add links in the annotation layer

Fixes #17730.

Files Added:

  • test/pdfs/issue17730.pdf

Files Modified:

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

5e7941afbf666ed5e281fc71510c3a187c176690 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/5e7941afbf666ed5e281fc71510c3a187c176690
Authored: 2024-02-27 10:16:12 +0100
Committed: 2024-02-27 12:19:54 +0100

Update puppeteer to 22.3.0

Files Modified:

  • package-lock.json
  • package.json

9e042e7accee9c4d41ae53e215e22461592764e2 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/9e042e7accee9c4d41ae53e215e22461592764e2
Authored: 2024-02-24 22:28:06 +0100
Committed: 2024-02-25 21:40:48 +0100

Avoid to have to wait to zoom after scrolling

Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes #17707.

Files Modified:

  • web/app.js

0520f2f0cbf8deca284a190a9ee9f1024be38de9 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/0520f2f0cbf8deca284a190a9ee9f1024be38de9
Authored: 2024-02-23 18:53:58 +0100
Committed: 2024-02-25 15:35:30 +0100

[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)

In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered.
So this patch removes the use of selectstart and rely only on selectionchange.
In order to simplify the selection management, the selection code is moved in the AnnotationUIManager:

  • it simplifies the code;
  • it allows to have only one listener for selectionchange instead of having one by visible page
    for selectstart.
    I had to add a delay in the integration tests for highlighting (there's a comment with an explanation),
    it isn't really nice, but it's the only way I found and in real life there always is a delay between
    press and release.

Files Modified:

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

fe41e789de3e10c0405735debbb85c01ff361edf by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/fe41e789de3e10c0405735debbb85c01ff361edf
Authored: 2024-02-23 21:39:06 +0100
Committed: 2024-02-23 21:39:06 +0100

Fix the string GlobalConstants.IDS_INVALID_DATE

Files Modified:

  • src/scripting_api/constants.js

bb19cf9b64c246068a1b8107ce3294a7cc0960d9 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/bb19cf9b64c246068a1b8107ce3294a7cc0960d9
Authored: 2024-02-23 14:55:54 +0100
Committed: 2024-02-23 16:50:19 +0100

[Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)

The function caretPositionFromPoint return the position within the last visible element
and sometimes there are some elements on top of the ones in the text layer.
So the idea is to hide the visible elements which aren't in the text layer in order
to get the right caret position.

Files Modified:

  • test/integration/highlight_editor_spec.mjs
  • web/app.js
  • web/caret_browsing.js

e1f6f5179f1920ad7496e6f4e69220a09cf17146 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/e1f6f5179f1920ad7496e6f4e69220a09cf17146
Authored: 2024-02-21 18:36:07 +0100
Committed: 2024-02-23 16:18:03 +0100

[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/tools.js
  • test/integration/caret_browsing_spec.mjs
  • test/integration/freetext_editor_spec.mjs
  • test/integration/highlight_editor_spec.mjs
  • web/pdf_presentation_mode.js
  • web/toolbar.js

49a2aff53230df3f09665933cc0bbd0c3cf224d6 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/49a2aff53230df3f09665933cc0bbd0c3cf224d6
Authored: 2024-02-23 14:20:53 +0100
Committed: 2024-02-23 14:20:53 +0100

Tweak how the hexNumbers Array, used by Util.makeHexColor, is built

Please note: This is a micro optimization, hence I fully understand if the patch is rejected.

Currently we create two temporary Arrays and have to iterate twice in total when building the final hexNumbers Array.
With this patch there's only one temporary Array and a single iteration required to build the final hexNumbers Array.

Files Modified:

  • src/shared/util.js

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

Known Issues (From Push Health):

  • toolkit/components/pdfjs/test/browser_pdfjs_stamp_telemetry.js
    • 3 of 3 failed on different tasks
      - test-linux1804-64-qr/opt-mochitest-browser-chrome-spi-nw-1 (bmSNcaPdRyGG7ZaLYKupCw)
      - test-linux1804-64-qr/opt-mochitest-browser-chrome-swr-a11y-checks-1 (eLRHYLgBRpG8ABjFP4c_yg)
      - test-linux1804-64-qr/opt-mochitest-browser-chrome-swr-1 (ZvvePg3lRB2yX0LepHP7sQ)

Known Issues (From Taskcluster):

  • test-windows11-32-2009-qr/debug-mochitest-browser-chrome-1 (JVDRuOxPTgmGRFyFlYCLRg) - new failure not classified
  • test-linux1804-64-qr/opt-mochitest-browser-chrome-spi-nw-1 (bmSNcaPdRyGG7ZaLYKupCw) - new failure not classified
  • test-windows11-64-2009-qr/opt-mochitest-browser-chrome-msix-1 (Khw7nHAtT6KDyRLsTWWB5A) - new failure not classified
  • test-linux1804-64-qr/opt-mochitest-browser-chrome-swr-1 (ZvvePg3lRB2yX0LepHP7sQ) - new failure not classified
  • test-windows11-64-2009-qr/opt-mochitest-browser-chrome-1 (cd32qMWcQrOOG615UaJrWw) - new failure not classified
  • test-windows11-64-2009-qr/debug-mochitest-browser-chrome-spi-nw-1 (PU-e3Md9TjajeA8ksZ_UFw) - new failure not classified
  • test-windows11-64-2009-qr/debug-mochitest-browser-chrome-1 (LmpfwNYbSAOpDXgcWjSwHg) - new failure not classified
  • test-windows11-32-2009-qr/opt-mochitest-browser-chrome-1 (T8N_-oWrQD-Fx4STExvmmQ) - new failure not classified
  • test-linux1804-64-qr/debug-mochitest-browser-chrome-swr-1 (JZqle93MQV6tVq-l9qDneA) - new failure not classified
  • test-linux1804-64-qr/debug-mochitest-browser-chrome-spi-nw-1 (XnmhzSz4RAySjETGWvDjAg) - new failure not classified
  • test-windows11-64-2009-qr/debug-mochitest-browser-chrome-swr-1 (M0IMP1IqRO6r8sWuYmJ-kw) - new failure not classified
  • test-macosx1015-64-qr/debug-mochitest-browser-chrome-1 (WYyswd8bRpGLTYBQXRBQzw) - new failure not classified
  • test-macosx1015-64-qr/opt-mochitest-browser-chrome-1 (SMyHXfImQiiFv6gAVhhLAw) - new failure not classified
  • test-linux1804-64-qr/opt-mochitest-browser-chrome-swr-a11y-checks-1 (eLRHYLgBRpG8ABjFP4c_yg) - new failure not classified
  • test-macosx1015-64-qr/debug-mochitest-browser-chrome-spi-nw-1 (d4EVWUHARjqeFKfrS3AI-Q) - new failure not classified
  • test-windows11-64-2009-qr/debug-mochitest-browser-chrome-msix-1 (YB6LGUOFRiCJ-_LROYCLfw) - new failure not classified
  • test-windows11-64-2009-qr/opt-mochitest-browser-chrome-spi-nw-1 (RxBaqg6uT9-_3aA-7XlB2Q) - new failure not classified
  • test-macosx1015-64-qr/opt-mochitest-browser-chrome-spi-nw-1 (Y9xz2L-lRsGQU78taq-u5Q) - new failure not classified

Needs Investigation (From Push Health):

  • toolkit/components/pdfjs/test/browser_pdfjs_stamp_telemetry.js
    • 15 of 15 failed on different tasks
      - test-macosx1015-64-qr/debug-mochitest-browser-chrome-spi-nw-1 (d4EVWUHARjqeFKfrS3AI-Q)
      - test-macosx1015-64-qr/debug-mochitest-browser-chrome-1 (WYyswd8bRpGLTYBQXRBQzw)
      - test-windows11-32-2009-qr/debug-mochitest-browser-chrome-1 (JVDRuOxPTgmGRFyFlYCLRg)
      - test-windows11-64-2009-qr/debug-mochitest-browser-chrome-1 (LmpfwNYbSAOpDXgcWjSwHg)
      - test-windows11-64-2009-qr/debug-mochitest-browser-chrome-swr-1 (M0IMP1IqRO6r8sWuYmJ-kw)
      - test-windows11-64-2009-qr/debug-mochitest-browser-chrome-spi-nw-1 (PU-e3Md9TjajeA8ksZ_UFw)
      - test-windows11-32-2009-qr/opt-mochitest-browser-chrome-1 (T8N_-oWrQD-Fx4STExvmmQ)
      - test-macosx1015-64-qr/opt-mochitest-browser-chrome-1 (SMyHXfImQiiFv6gAVhhLAw)
      - test-macosx1015-64-qr/opt-mochitest-browser-chrome-spi-nw-1 (Y9xz2L-lRsGQU78taq-u5Q)
      - test-windows11-64-2009-qr/debug-mochitest-browser-chrome-msix-1 (YB6LGUOFRiCJ-_LROYCLfw)
      - test-windows11-64-2009-qr/opt-mochitest-browser-chrome-1 (cd32qMWcQrOOG615UaJrWw)
      - test-windows11-64-2009-qr/opt-mochitest-browser-chrome-spi-nw-1 (RxBaqg6uT9-_3aA-7XlB2Q)
      - test-linux1804-64-qr/debug-mochitest-browser-chrome-swr-1 (JZqle93MQV6tVq-l9qDneA)
      - test-linux1804-64-qr/debug-mochitest-browser-chrome-spi-nw-1 (XnmhzSz4RAySjETGWvDjAg)
      - test-windows11-64-2009-qr/opt-mochitest-browser-chrome-msix-1 (Khw7nHAtT6KDyRLsTWWB5A)

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)
Status: NEW → RESOLVED
Closed: 7 months ago
Duplicate of bug: 1882583
Resolution: --- → DUPLICATE
Flags: needinfo?(cdenizet)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: