Closed Bug 1770916 Opened 2 years ago Closed 2 years ago

Update PDF.js to new version 5b02c685d69cca319a1d35d0cf63bb1c733d6a5c from 2022-05-24 11:45:34

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1772598
Tracking Status
firefox102 --- affected

People

(Reporter: update-bot, Unassigned)

References

Details

(Whiteboard: [3pl-filed][task_id: L6-lciKoQnCbPcHazIdv6g])

Attachments

(1 obsolete file)

This update covers 21 commits:


5a2899c57ecca83454b9aa1c7a4a7ba375a990bb by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5a2899c57ecca83454b9aa1c7a4a7ba375a990bb
Authored: 2022-05-24 12:12:53 +0200
Committed: 2022-05-24 12:20:31 +0200

Skip bogus d1 operators in Type3-glyphs (issue 14953)

In the src/display/canvas.js code the d1 operator will be used to set the clipping region, and it obviously cannot be empty since that prevents the Type3-glyph from rendering.

Also, the patch removes an outdated comment; refer to PR 12718.

Files Added:

  • test/pdfs/issue14953.pdf
  • test/pdfs/issue14953.pdf

Files Added:

  • src/core/evaluator.js
  • src/display/canvas.js
  • test/pdfs/.gitignore
  • test/test_manifest.json
  • src/core/evaluator.js
  • src/display/canvas.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

9407adc41667a79cd9f463d2493b8db8f44d2eb6 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/9407adc41667a79cd9f463d2493b8db8f44d2eb6
Authored: 2022-05-22 14:37:17 +0200
Committed: 2022-05-22 15:50:42 +0200

[JS] Format all the fields if any when the document is open (bug 1766987) - it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1766987.

Files Added:

Files Added:

  • src/scripting_api/event.js
  • test/integration/scripting_spec.js
  • test/test_manifest.json
  • src/scripting_api/event.js
  • test/integration/scripting_spec.js
  • test/test_manifest.json

55da67e9aa4d8a66f5a68e4b60d2e253b01cc244 by Dmitry_Platonov

https://github.com/mozilla/pdf.js-/commit/55da67e9aa4d8a66f5a68e4b60d2e253b01cc244
Authored: 2022-05-21 07:48:44 +0200
Committed: 2022-05-22 14:57:55 +0200

Set 'dropEffect' based on 'effectAllowed' for drag-and-drop in the viewer (issue 14942). See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed

Files Added:

  • web/app.js
  • web/app.js

e003e82c98334f4f2df94e4a2518e1d6a667a0bd by IsaacLK

https://github.com/mozilla/pdf.js-/commit/e003e82c98334f4f2df94e4a2518e1d6a667a0bd
Authored: 2022-05-20 09:36:10 -0400
Committed: 2022-05-20 09:36:10 -0400

Twitter should be capitalized.

Files Added:

  • README.md
  • README.md

0a66e1f5ea27eb8ba9d3c098f74ab1f971ccc731 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/0a66e1f5ea27eb8ba9d3c098f74ab1f971ccc731
Authored: 2022-05-20 12:57:22 +0200
Committed: 2022-05-20 13:02:22 +0200

Allow to have float numbers when getting image information in reftest-analyzer - outputScale can be e.g. 1.5 in real life.

Files Added:

  • test/resources/reftest-analyzer.js
  • test/resources/reftest-analyzer.js

60498c67e4e218cb74b1b6f66b07bd8f34eab26b by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/60498c67e4e218cb74b1b6f66b07bd8f34eab26b
Authored: 2022-05-17 23:10:02 +0200
Committed: 2022-05-19 16:41:54 +0200

Display background when printing or saving a text widget (issue #14928)

Files Added:

  • test/pdfs/issue14928.pdf.link
  • test/pdfs/issue14928.pdf.link

Files Added:

  • src/core/annotation.js
  • src/core/core_utils.js
  • src/core/default_appearance.js
  • src/core/writer.js
  • test/test_manifest.json
  • test/unit/annotation_spec.js
  • test/unit/default_appearance_spec.js
  • src/core/annotation.js
  • src/core/core_utils.js
  • src/core/default_appearance.js
  • src/core/writer.js
  • test/test_manifest.json
  • test/unit/annotation_spec.js
  • test/unit/default_appearance_spec.js

8a349801dcc2f69d1a16499070f10802e046c06e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/8a349801dcc2f69d1a16499070f10802e046c06e
Authored: 2022-05-10 14:15:57 +0200
Committed: 2022-05-15 18:18:37 +0200

[Firefox viewer] Stop using FirefoxCom.requestAsync in the DownloadManager

After the changes in https://bugzilla.mozilla.org/show_bug.cgi?id=1757771, that simplified the MOZCENTRAL downloading code, the ChromeActions.download-method will no longer invoke the sendResponse-callback.
Hence it should no longer be necessary for the DownloadManager, in the MOZCENTRAL viewer, to use FirefoxCom.requestAsync since no response is ever provided.[1] For the allocated BlobURLs, they should (hopefully) be released when navigating away from the viewer.


[1] Note that that was already the case, for one of the previous code-paths in the ChromeActions.download-method.

Files Added:

  • web/firefoxcom.js
  • web/firefoxcom.js

4f1cd6a9c2ed44f5bc753ba76d83d880714b195d by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/4f1cd6a9c2ed44f5bc753ba76d83d880714b195d
Authored: 2022-02-19 11:47:24 +0100
Committed: 2022-05-15 18:18:37 +0200

Remove the sourceEventType from the viewer (bug 1757771 follow-up)

After the changes in https://bugzilla.mozilla.org/show_bug.cgi?id=1757771, that simplified the MOZCENTRAL downloading code, the sourceEventType is now completely unused and should thus be removed (in my opinion).

Furthermore, with these changes, we also no longer need a separate internal "save"-event and can instead just use the older "download"-event everywhere.

Files Added:

  • web/app.js
  • web/download_manager.js
  • web/firefoxcom.js
  • web/interfaces.js
  • web/pdf_scripting_manager.js
  • web/app.js
  • web/download_manager.js
  • web/firefoxcom.js
  • web/interfaces.js
  • web/pdf_scripting_manager.js

e94b9d1d7fb96f743749531958147677945e1aad by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/e94b9d1d7fb96f743749531958147677945e1aad
Authored: 2022-05-10 17:51:07 +0200
Committed: 2022-05-15 17:30:37 +0200

Use a CSS transform to update the progress bar instead of changing the width (bug 1768481) - it isn't a fix for bug 1768481 but just a tiny improvement to refresh the progress bar on the compositor thread.

Files Added:

  • examples/mobile-viewer/viewer.css
  • web/viewer.css
  • examples/mobile-viewer/viewer.css
  • web/viewer.css

5a774b7ed3addad20bd044890213fe33e469102b by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5a774b7ed3addad20bd044890213fe33e469102b
Authored: 2022-05-15 11:12:00 +0200
Committed: 2022-05-15 11:24:39 +0200

Adjust the heuristics for handling of incomplete path operators (issue 14917)

This limits the heuristics for handling of incomplete path operators, see PR 9838, to only apply to sequences of such operators. In practice a couple of invalid path operators are (hopefully) unlikely to completely break rendering, whereas a sequence of them will easily lead to fairly chaotic rendering artifacts.

Files Added:

  • test/pdfs/issue14917.pdf.link
  • test/pdfs/issue14917.pdf.link

Files Added:

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

54080b68845f7c1668817ebbed65f5c9327f43cd by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/54080b68845f7c1668817ebbed65f5c9327f43cd
Authored: 2022-05-15 09:12:37 +0200
Committed: 2022-05-15 09:12:37 +0200

Update l10n files

Files Added:

  • l10n/fi/viewer.properties
  • l10n/sc/viewer.properties
  • l10n/fi/viewer.properties
  • l10n/sc/viewer.properties

5320316f73eb0f9f6b5bb76193a88a1da9318760 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5320316f73eb0f9f6b5bb76193a88a1da9318760
Authored: 2022-05-15 09:02:57 +0200
Committed: 2022-05-15 09:07:35 +0200

Update npm packages

Files Added:

  • .eslintrc
  • gulpfile.js
  • package-lock.json
  • package.json
  • .eslintrc
  • gulpfile.js
  • package-lock.json
  • package.json

bfb088052362d3594253542ce860f51c5c7c71a4 by Tim van der Meij

https://github.com/mozilla/pdf.js-/commit/bfb088052362d3594253542ce860f51c5c7c71a4
Authored: 2022-05-14 14:45:59 +0200
Committed: 2022-05-14 14:45:59 +0200

Bump versions in pdfjs.config

Files Added:

  • pdfjs.config
  • pdfjs.config

1f3da032b4e61dc766676f1cff6feb2a57148905 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/1f3da032b4e61dc766676f1cff6feb2a57148905
Authored: 2022-05-14 13:10:13 +0200
Committed: 2022-05-14 13:49:10 +0200

[api-minor] Modernize and simplify the ProgressBar class

The original ProgressBar-functionality is very old, and could thus do with some general clean-up.
In particular, while it currently accepts various options those have never really been used in either the default viewer or in any examples. The sort of "styling" that these options provided are much better, not to mention simpler, done directly with CSS rules.

As part of these changes, the "progress" is now updated using CSS variables rather than by directly modifying the style of DOM elements. This should hopefully simplify future changes to this code, see e.g. PR 14898.

Finally, this also fixes a couple of other small things in the "mobile viewer" example.

Files Added:

  • examples/mobile-viewer/viewer.css
  • examples/mobile-viewer/viewer.js
  • web/ui_utils.js
  • web/viewer.css
  • examples/mobile-viewer/viewer.css
  • examples/mobile-viewer/viewer.js
  • web/ui_utils.js
  • web/viewer.css

efe3cb2982855116952628758a6424328c2dd826 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/efe3cb2982855116952628758a6424328c2dd826
Authored: 2022-05-13 17:12:03 +0200
Committed: 2022-05-13 17:20:35 +0200

Remove unnecessary clean-up in Toolbar.#adjustScaleWidth

While zeroing the temporary canvas makes sense, manually clearing the canvas and its context doesn't really accomplish anything since those are tied to the scope of the method.

Files Added:

  • web/toolbar.js
  • web/toolbar.js

3dd8b9cccfc59f597e24c827f861b746dd5ef727 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/3dd8b9cccfc59f597e24c827f861b746dd5ef727
Authored: 2022-05-13 12:07:05 +0200
Committed: 2022-05-13 17:10:42 +0200

Ensure that setting the width of the zoom dropdown works correctly (PR 14028 follow-up)

We need to wait for UI rendering to start before getting the CSS variable values, since otherwise the values will be NaN.
This is only an issue if the viewer is completely hidden during loading, e.g. in a display: none iframe-element.

Files Added:

  • web/toolbar.js
  • web/toolbar.js

d540df0582a5003b18bfbe18edabaf841cec942e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/d540df0582a5003b18bfbe18edabaf841cec942e
Authored: 2022-05-13 12:42:51 +0200
Committed: 2022-05-13 12:42:51 +0200

Use TypedArray.prototype.fill() a bit more in the code-base

Please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill, which is implemented in all browsers that we currently support.

Files Added:

  • src/core/jbig2.js
  • src/core/jbig2.js

6bcc5b615d225a3cf3159007bc0ff4db4d8cb443 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/6bcc5b615d225a3cf3159007bc0ff4db4d8cb443
Authored: 2022-05-10 17:36:29 +0200
Committed: 2022-05-12 11:08:30 +0200

[api-minor] Include line endings in Line/Polyline Annotation-data (issue 14896)

Please refer to:

Note that we still won't attempt to use the /LE-data when creating fallback appearance streams, as mentioned in PR 13448, since custom line endings aren't common enough to warrant the added complexity.
Finally, note that according to the PDF specification we should potentially also take the line endings into account for FreeText Annotations. However, in that case their use is conditional on other parameters that we currently don't support.

Files Added:

  • src/core/annotation.js
  • test/unit/annotation_spec.js
  • src/core/annotation.js
  • test/unit/annotation_spec.js

ec6575db000f4034ca4a556a87e9d496cf963425 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/ec6575db000f4034ca4a556a87e9d496cf963425
Authored: 2022-05-11 14:21:16 +0200
Committed: 2022-05-11 14:21:16 +0200

Avoid the preprocess-function adding consecutive blank lines

When pre-processor blocks are being removed, since they don't apply to the current build target, we may currently end up with consecutive blank lines.
While this is obviously not a big issue, it's nonetheless undesirable and we can adjust the writeLine function to prevent that.

Files Added:

  • external/builder/builder.js
  • external/builder/builder.js

527251d62b1ac99cef12e9eb249a6938ff3ea6f2 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/527251d62b1ac99cef12e9eb249a6938ff3ea6f2
Authored: 2022-05-11 12:32:41 +0200
Committed: 2022-05-11 12:36:00 +0200

Update the preprocess-function to avoid adding trailing new-lines (issue 14902)

This is a follow-up to PR 14886, which "broke" this.

In addition to fixing the issue, using an Array and join-ing it at the end may also be a tiny bit more efficient than using a growing string.

Files Added:

  • external/builder/builder.js
  • external/builder/builder.js

af5789125fb6e6024a9c439b36ac5a464aa49de5 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/af5789125fb6e6024a9c439b36ac5a464aa49de5
Authored: 2022-05-09 12:25:51 +0200
Committed: 2022-05-09 13:03:08 +0200

Try to remove the mozOpaque canvas-property (PR 6551 follow-up)

According to MDN, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque, the mozOpaque canvas-property is not only non-standard (obviously) but it's also been deprecated.
Instead it's recommended to use alpha = false when getting the canvas-context, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#contextattributes, which all of our affected code is already doing.

Files Added:

  • src/display/text_layer.js
  • test/driver.js
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/toolbar.js
  • src/display/text_layer.js
  • test/driver.js
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/toolbar.js

It looks like we experienced one or more build failures when trying to apply this
update. You will need to apply this update manually; you can replicate the patch
locally with ./mach vendor toolkit/components/pdfjs/moz.yaml. I'm going to abandon the Phabricator patch and
let you submit a new one.

If the build failure wasn't caused by a library change, and was instead caused by
something structural in the build system please let my maintainers know in
Slack:#secinf.

I do my best to automatically add new files to the build, but some moz.build files
are complicated and you may need to fix them manually.

Flags: needinfo?(tom)
Attachment #9277927 - Attachment is obsolete: true

This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(tom)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: