Closed Bug 1852370 Opened 1 year ago Closed 1 year ago

Update PDF.js to new version cf7efdb0404155606b32a421e4ba64544dbb8968 from 2023-09-08 19:25:44

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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


toolkit/components/pdfjs/content/build/pdf.js | 216 +-
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 4369 ++++++------
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 15 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 24 +-
toolkit/components/pdfjs/content/web/viewer.css | 17 +-
toolkit/components/pdfjs/content/web/viewer.js | 24 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 2340 insertions(+), 2333 deletions(-)


52cc1220e46ead4d74ba127ae263a4a191f7598a by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/52cc1220e46ead4d74ba127ae263a4a191f7598a
Authored: 2023-09-08 19:29:29 +0200
Committed: 2023-09-08 19:59:59 +0200

Simplify writeObject function

It'll avoid to have the duplication of the code to get the encrypt transform,
and last but not least, it'll avoid to forget about encryption.

Files Modified:

  • src/core/annotation.js
  • src/core/document.js
  • src/core/writer.js

c6f7e722c95615bd0871a47cb6dd9e844f183421 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/c6f7e722c95615bd0871a47cb6dd9e844f183421
Authored: 2023-09-07 18:02:55 +0200
Committed: 2023-09-07 18:22:33 +0200

[Editor] Add the parent tag id (if any) to the serialized editors (bug 1845087)

The tag id will be useful in order to update the StructTree when saving
the pdf.

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/editor.js
  • src/display/editor/freetext.js
  • src/display/editor/ink.js
  • src/display/editor/stamp.js
  • test/integration/freetext_editor_spec.js
  • web/text_accessibility.js

a8a50c567a4784440f23a7bfce373a6f0a4824b1 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/a8a50c567a4784440f23a7bfce373a6f0a4824b1
Authored: 2023-09-07 15:52:58 +0200
Committed: 2023-09-07 15:56:47 +0200

Construct the correct field name and strip out classes when searching

The classes were stripped out during when creating the field name but
it led to a wrong name.
Since class components in a path are irrelevant, they're just ignored
when searching for a node in the datasets.

Files Modified:

  • src/core/annotation.js
  • src/core/xml_parser.js
  • test/unit/api_spec.js

8ab4e2e6e7aa39288d502b16016de2208be10d67 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/8ab4e2e6e7aa39288d502b16016de2208be10d67
Authored: 2023-09-07 12:30:29 +0200
Committed: 2023-09-07 12:30:29 +0200

[Editor] Avoid to use parent of editors in destroyed pages

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/editor.js
  • src/display/editor/tools.js
  • test/integration/freetext_editor_spec.js
  • test/integration/test_utils.js

d03494eeff496547bfd9001c3ccacd7a89ecae6f by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/d03494eeff496547bfd9001c3ccacd7a89ecae6f
Authored: 2023-09-05 14:15:01 +0200
Committed: 2023-09-05 14:18:51 +0200

Only call the focus/blur callbacks when it's necessary (bug 1851517)

Focus callback must be called only when the element has been blurred.
For example, blur callback (which implies some potential validation) is not called
because the newly focused element is an other tab, an alert dialog, ... so consequently
the focus callback mustn't be called when the element gets its focus back.

Files Modified:

  • src/display/annotation_layer.js
  • test/integration/scripting_spec.js

e7800c22ddff9be4462900b1f6581676fc1ecb3f by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/e7800c22ddff9be4462900b1f6581676fc1ecb3f
Authored: 2023-09-04 23:11:30 +0200
Committed: 2023-09-05 11:31:30 +0200

Support downloading FileAttachment annotations with the keyboard

While reviewing PR 16898 it occurred to me that it's currently impossible to trigger downloading of FileAttachment annotations using the keyboard.
Hence this patch adds Ctrl + Enter as the keyboard shortcut to download those, thus supplementing the existing double-clicking when using a mouse.

Files Modified:

  • src/display/annotation_layer.js

a00b542f2f58cde6117fa0985a5a2416051b0225 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/a00b542f2f58cde6117fa0985a5a2416051b0225
Authored: 2023-09-04 17:29:50 +0200
Committed: 2023-09-05 10:41:01 +0200

Unconditionally render non-form annotations in the annotation layer (bug 1851498)

The goal is to always have something which is focusable to let the user select
it with the keyboard.
It fixes the mentioned bug because, the annotation layer will now have a container
to attach the canvas for annotations having their own canvas.

Files Added:

Files Modified:

  • src/display/annotation_layer.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • web/annotation_layer_builder.css

7f44f353b3eccd135e7b090260b8ecd6374bed5b by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/7f44f353b3eccd135e7b090260b8ecd6374bed5b
Authored: 2023-09-04 16:19:06 +0200
Committed: 2023-09-04 17:12:23 +0200

Make annotations focusable (bug 1851489)

When the annotation has a popup then the popup can be toggled in using
the Enter key and hidden in using the Escape key.

Files Modified:

  • src/display/annotation_layer.js
  • test/integration/annotation_spec.js

48a2c29f98d322a23596bc389b87c805f82c72f5 by dependabot[bot]

https://github.com/mozilla/pdf.js/commit/48a2c29f98d322a23596bc389b87c805f82c72f5
Authored: 2023-09-04 12:51:59 +0000
Committed: 2023-09-04 12:51:59 +0000

Bump actions/checkout from 3 to 4

Bumps actions/checkout from 3 to 4.


updated-dependencies:

  • dependency-name: actions/checkout
    dependency-type: direct:production
    update-type: version-update:semver-major
    ...

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

Files Modified:

  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/publish_website.yml

28bda9f68b57925ddd281c3c3c3f64aef6f1495d by Rob Wu

https://github.com/mozilla/pdf.js/commit/28bda9f68b57925ddd281c3c3c3f64aef6f1495d
Authored: 2023-09-03 19:45:18 +0200
Committed: 2023-09-03 19:45:18 +0200

Drop redundant styles from .grab-to-pan-grab:active

.grab-to-pan-grab:active is #viewerContainer when the mouse is
pressed down. It is supposed to have a cursor: grabbing appearance
immediately on mousedown,

.grab-to-pan-grabbing is the overlay that is supposed to cover
everything, and also has the cursor: grabbing appearance. The "cover
everything" result is achieved through position:fixed, inset:0, etc.

The block with these CSS properties for "cover everything" is currently
shared by .grab-to-pan-grab:active and .grab-to-pan-grabbing, but
only "cursor" need to be shared. The original JS and CSS code at
https://github.com/Rob--W/grab-to-pan.js shows that these were supposed
to be associated with the overlay only.

The PR that added this to PDF.js also shows that the "cover everything"
CSS properties were supposed to be limited to the overlay only:
https://github.com/mozilla/pdf.js/pull/4209#discussion-diff-9285917

But the final version of the PR mistakenly merged them together.
This patch rectifies that mistake.

Files Modified:

  • web/viewer.css

07cca3ddd9bb1208a39d2d28ade01c07bff59d8b by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/07cca3ddd9bb1208a39d2d28ade01c07bff59d8b
Authored: 2023-09-03 10:01:37 +0200
Committed: 2023-09-03 10:01:37 +0200

Update l10n files

Files Modified:

  • l10n/el/viewer.properties
  • l10n/eu/viewer.properties
  • l10n/fi/viewer.properties
  • l10n/fur/viewer.properties
  • l10n/gn/viewer.properties
  • l10n/ja/viewer.properties
  • l10n/kab/viewer.properties
  • l10n/nb-NO/viewer.properties
  • l10n/nn-NO/viewer.properties
  • l10n/rm/viewer.properties
  • l10n/sat/viewer.properties
  • l10n/tg/viewer.properties
  • l10n/tr/viewer.properties

92831455bfd1fca461ff6b760fb964bf17a052bb by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/92831455bfd1fca461ff6b760fb964bf17a052bb
Authored: 2023-09-03 09:59:08 +0200
Committed: 2023-09-03 09:59:08 +0200

Update npm packages

Files Modified:

  • package-lock.json
  • package.json

1b8441dacc055e0c4469e49f7a1c71f4b5d76559 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/1b8441dacc055e0c4469e49f7a1c71f4b5d76559
Authored: 2023-08-28 16:14:22 +0200
Committed: 2023-08-28 16:14:22 +0200

Don't pass in unused pageColors to CanvasGraphics.endDrawing (PR 16380 follow-up)

This became unnecessary in PR 16380, however we forgot to update one of the API call-sites.

Files Modified:

  • src/display/api.js

9b4efe2c2fa6c69965e9482790230a3d798522db by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/9b4efe2c2fa6c69965e9482790230a3d798522db
Authored: 2023-08-28 16:05:11 +0200
Committed: 2023-08-28 16:10:33 +0200

Use WeakSet.prototype.delete() unconditionally in the InternalRenderTask class

It's not necessary to check if an object exists before trying remove it from a WeakSet; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete#return_value

Files Modified:

  • src/display/api.js

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://hg.mozilla.org/integration/autoland/rev/52b4a28cd9d7 Update PDF.js to cf7efdb0404155606b32a421e4ba64544dbb8968 r=pdfjs-reviewers,calixte
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Regressions: 1863910
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: