Commit Graph

17357 Commits

Author SHA1 Message Date
calixteman
f8a84a6f03
Merge pull request #16539 from calixteman/issue16538
Concat data when push fails in the CFF compiler
2023-06-09 17:09:49 +02:00
Calixte Denizet
3d0ce1cff2 Concat data when push fails in the CFF compiler 2023-06-09 15:48:01 +02:00
calixteman
f2a29e858f
Merge pull request #16533 from calixteman/fix_freetext_undo
[Editor] Fix test failures in m-c because of the new FreeText undo/redo stuff
2023-06-08 14:30:39 +02:00
Calixte Denizet
baebf7b26d [Editor] Fix test failures in m-c because of the new FreeText undo/redo stuff 2023-06-08 13:38:52 +02:00
calixteman
22d350cae6
Merge pull request #16528 from calixteman/bug1831574
[Editor] Commit the text when the user hits ctrl+s (bug 1831574)
2023-06-06 12:13:14 +02:00
Calixte Denizet
3d98fb3c0b [Editor] Commit the text when the user hits ctrl+s (bug 1831574) 2023-06-06 11:40:54 +02:00
calixteman
a2b9e23f83
Merge pull request #16525 from calixteman/editor_undo_text_change
[Editor] Allow to undo/redo committed text modifications for FreeText
2023-06-06 10:53:35 +02:00
Calixte Denizet
2f0bb9dc2f [Editor] Allow to undo/redo committed text modifications for FreeText 2023-06-05 21:31:19 +02:00
calixteman
9cd84aa0b2
Merge pull request #16522 from calixteman/restore_get_freetext_info_from_as
[Editor] Guess font size and color from the AS of FreeText annotations
2023-06-05 18:08:58 +02:00
Calixte Denizet
ba8c996623 [Editor] Guess font size and color from the AS of FreeText annotations 2023-06-05 17:15:17 +02:00
calixteman
77fb6834d6
Merge pull request #16521 from calixteman/restore_connect_layers
[Editor] Connect then annotation layer and the editor one
2023-06-05 14:20:24 +02:00
Calixte Denizet
9f861c39f4 [Editor] Connect then annotation layer and the editor one 2023-06-05 14:05:52 +02:00
Tim van der Meij
184cad3daf
Merge pull request #16520 from Snuffleupagus/issue-16518
Remove unused variables in `InkAnnotation.createNewAppearanceStream` (issue 16518, PR 16494 follow-up)
2023-06-04 17:43:18 +02:00
Tim van der Meij
8a5af64749
Merge pull request #16519 from timvandermeij/puppeteer
Improve Puppeteer's `trimCache` API usage
2023-06-04 14:35:30 +02:00
Jonas Jenwald
046b9050dd Remove unused variables in InkAnnotation.createNewAppearanceStream (issue 16518, PR 16494 follow-up) 2023-06-04 13:51:24 +02:00
Jonas Jenwald
a5d0af38f7
Merge pull request #16515 from Snuffleupagus/eslint-import-no-cycle
Enable the `import/no-cycle` ESLint plugin rule
2023-06-04 13:50:17 +02:00
Tim van der Meij
a9093a7f4d
Improve Puppeteer's trimCache API usage
The original `trimCache` functionality was intended to be exposed on the
top-level `puppeteer` module, but due to a bug in Puppeteer this didn't
work correctly and we had to call `trimCache` on the default Puppeteer
node instance instead, which was fortunately exposed. However, since
this didn't feel like intended API usage, this bug was reported and is
now fixed in Puppeteer 20.5.0, so this commits updates Puppeteer to that
version so we can use the intended API.

The full history of this issue can be found at
https://github.com/puppeteer/puppeteer/issues/10174.
2023-06-04 13:49:44 +02:00
Jonas Jenwald
cf3a35e9da Enable the import/no-cycle ESLint plugin rule
Having cyclical imports is obviously not a good idea, and this ESLint plugin rule can help detect those; please see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
2023-06-04 13:44:15 +02:00
Tim van der Meij
605d9f492f
Merge pull request #16517 from Snuffleupagus/eslint-import-more
Enable more `import` ESLint plugin rules
2023-06-04 12:22:21 +02:00
Jonas Jenwald
5fad931a3f Enable more import ESLint plugin rules
This patch enables more `import` rules to help prevent bugs/inconsistencies, and most of these rules didn't require code changes; please find additional details here:
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/export.md
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-empty-named-blocks.md
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
 - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
2023-06-04 09:58:25 +02:00
Tim van der Meij
bb5d38acc1
Merge pull request #16495 from Snuffleupagus/PDFRenderingQueue-components
Limit some `PDFRenderingQueue`-related code to the GENERIC viewer
2023-06-03 12:33:18 +02:00
calixteman
63b61ca082
Merge pull request #16508 from calixteman/restore_mk_annotation_layer_an_object
[api-minor] Make the AnnotationLayer an object in order to use it in the AnnotationEditorLayer
2023-06-02 23:12:50 +02:00
Calixte Denizet
4351708ae6 [api-minor] Make the AnnotationLayer an object in order to use it in the AnnotationEditorLayer
It'll be useful to make the Freetext and Ink annotations editable.
2023-06-02 22:44:14 +02:00
Jonas Jenwald
cccdc8dba4
Merge pull request #16513 from Snuffleupagus/issue-7454
Improve handling of mismatching /BaseFont and /FontName entries for non-embedded fonts (issue 7454)
2023-06-02 18:11:05 +02:00
Jonas Jenwald
666e35301b
Merge pull request #16499 from Snuffleupagus/Chrome-92
[api-minor] Update the minimum supported Google Chrome version to 92
2023-06-02 17:16:22 +02:00
Jonas Jenwald
459d26edec Improve handling of mismatching /BaseFont and /FontName entries for non-embedded fonts (issue 7454)
This patch is the result of me going through some old issues regarding non-embedded Wingdings support.

There's a few different things wrong in the referenced PDF document:
 - The /BaseFont and /FontName entries don't agree on the name of the fonts, with one font using `/BaseFont /Wingdings-Regular` and `/FontName /wg09np` which obviously makes no sense.
   To address this we'll compare the font-names against our lists of known ones and ignore /FontName entries that don't make sense iff the /BaseFont entry is a known font-name.
 - The non-embedded Wingdings font also set an incorrect /Encoding, in this case /MacRomanEncoding, which should have been fixed by PR 16465. However this doesn't work since the font has *bogus* font-flags, that fail to categorize the font as Symbolic.
   To address this we'll also compare the font-name against the list of known symbol fonts.
2023-06-02 17:10:25 +02:00
Jonas Jenwald
ba67bd717a
Merge pull request #16516 from Snuffleupagus/lazy-KeyboardManager-init
[editor] Initialize `KeyboardManager`-instances lazily
2023-06-02 16:17:31 +02:00
Jonas Jenwald
ea93c507f5 [editor] Initialize KeyboardManager-instances lazily
As far as I can tell there's no particular reason for initializing `KeyboardManager`-instances eagerly, since the user may never use editing, and we can easily do this lazily instead by utilizing shadowed getters.
2023-06-02 16:03:22 +02:00
Jonas Jenwald
0023c4a511
Merge pull request #16514 from Snuffleupagus/eslint-import-named
Enable the `import/named` ESLint plugin rule
2023-06-02 15:59:16 +02:00
Jonas Jenwald
9fe0423a4c
Merge pull request #16497 from Snuffleupagus/more-Util-getAxialAlignedBoundingBox
Use the `Util.getAxialAlignedBoundingBox` helper function more
2023-06-02 13:34:10 +02:00
Jonas Jenwald
89a17abadf Enable the import/named ESLint plugin rule
This would've prevented issue 16512, please see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md
2023-06-02 13:22:26 +02:00
Jonas Jenwald
a43b1246c8
Merge pull request #16511 from Snuffleupagus/pr-15618-followup
Fix incorrect `USERACTIVATION_CALLBACKID` import (15618 follow-up)
2023-06-02 13:10:08 +02:00
Jonas Jenwald
2db0eff70f Fix incorrect USERACTIVATION_CALLBACKID import (15618 follow-up)
This constant is currently imported from the wrong file, where it doesn't exist; see PR 15618.
2023-06-02 10:02:23 +02:00
Jonas Jenwald
665ff78051
Merge pull request #16505 from maxired/fix/export-image-kind
export ImageKind
2023-06-02 09:48:23 +02:00
Jonas Jenwald
6b16d903b1
Merge pull request #16507 from Snuffleupagus/zooming-regressions-2
Fix more regressions from PR 15812
2023-06-02 09:26:09 +02:00
Maxence Dalmais
e4ecf59727 export ImageKind type externally 2023-06-02 08:51:18 +02:00
Jonas Jenwald
a60bb5f936 Don't use partially rendered pages to generate thumbnails when drawingDelay is used (PR 15812 follow-up)
While it's slightly difficult to trigger in practice, unless the `defaultZoomDelay`-value is increased, it's currently possible to generate thumbnails from *partially* rendered pages when doing *temporary* CSS-only zooming.
2023-06-01 19:01:57 +02:00
Jonas Jenwald
af8df207bb Don't dispatch "pagerendered"-events on the *temporary* CSS-only zooming done when drawingDelay is used (PR 15812 follow-up)
We shouldn't dispatch a "pagerendered"-event when doing *temporary* CSS-only zooming, but simply wait until the actual rendering is done.
While I don't believe that this regression has caused any actual bugs, dispatching *duplicate* events is nonetheless inconsistent and should be fixed.
2023-06-01 19:01:50 +02:00
Jonas Jenwald
32964db6ef
Merge pull request #16504 from wojtekmaj/fix-canvasMaxAreaInBytes
Fix canvasMaxAreaInBytes type
2023-06-01 17:28:24 +02:00
Wojciech Maj
1add9bc131
Fix canvasMaxAreaInBytes type
Fixes #16503
2023-06-01 15:41:43 +02:00
calixteman
1ef918239c
Merge pull request #16501 from calixteman/issue16500
Try to not omit some values when printing a choice list with several selected items
2023-06-01 12:05:58 +02:00
Calixte Denizet
0e610cab04 Try to not omit some values when printing a choice list with several selected items 2023-05-31 21:17:22 +02:00
calixteman
a2118f52b0
Merge pull request #16494 from calixteman/save_more_info_for_ink
[Editor] Add few more info when saving ink data (thickness, opacity, …)
2023-05-31 15:56:45 +02:00
Calixte Denizet
133d103186 [Editor] Add few more info when saving ink data (thickness, opacity, ...)
Fix the InkList entry: the coordinates were relative to the page and not
to the bounding box of the annotation.
2023-05-31 15:43:07 +02:00
Jonas Jenwald
c60a3ce96a [api-minor] Update the minimum supported Google Chrome version to 92
This patch updates the minimum supported browsers as follows:
 - Google Chrome 92, which was released on 2021-07-20; see https://support.google.com/chrome/a/answer/10314655

Note that nowadays we usually try, where feasible and possible, to support browsers that are about two years old. By limiting support to only "recent" browsers we reduce the risk of holding back improvements of the *built-in* Firefox PDF Viewer, and also (significantly) reduce the maintenance/support burden for the PDF.js contributors.

*Please note:* As always, the minimum supported browser version assumes that a `legacy`-build of the PDF.js library is being used; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
2023-05-31 11:03:39 +02:00
Jonas Jenwald
d3c0928121 Use the Util.getAxialAlignedBoundingBox helper function more
There's a couple of spots in the code-base that effectively re-implement this helper function, which seems like unnecessary repetition.
2023-05-31 09:32:19 +02:00
Jonas Jenwald
e8c727742c Limit some PDFRenderingQueue-related code to the GENERIC viewer
Given that this functionality is only relevant in third-party use-cases, for example the viewer-components, we can avoid needlessly including it in e.g. the MOZCENTRAL build.
2023-05-30 21:24:19 +02:00
Tim van der Meij
071e6bc7e7
Merge pull request #16489 from timvandermeij/puppeteer
Update Puppeteer to version 20
2023-05-29 18:56:10 +02:00
Tim van der Meij
ca620e4cc9
Update Puppeteer to version 20
This commit makes the following required changes:

- Replace custom cache trimming logic in favor of the (per our request)
  newly added `trimCache` method in Puppeteer. Not only does this greatly
  simplify our code and prevents having to import Puppeteer internals,
  it's also necessary because Puppeteer 20 removed the `BrowserFetcher`
  API in favor of the new separate `@puppeteer/browsers` package.
- Start browsers in series instead of in parallel. Parallel browser
  starts broke since Puppetter 19.1.0 and it turns out that it has never
  been supported officially, so it worked more-or-less by accident.
  Starting browsers in series is the supported way, is almost equally
  fast and ensures that we avoid any race conditions during startup.
  Finally, it also allows us to remove the `browserPromise` state on our
  session objects.

Fixes #15865.
2023-05-29 15:45:24 +02:00
Tim van der Meij
7f6f33da3c
Merge pull request #16487 from timvandermeij/bump
Bump versions in `pdfjs.config`
2023-05-29 14:23:44 +02:00