Commit Graph

17324 Commits

Author SHA1 Message Date
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
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
Tim van der Meij
1096e69879
Bump versions in pdfjs.config 2023-05-29 14:16:43 +02:00
Tim van der Meij
036f855dca
Merge pull request #16484 from Snuffleupagus/PDFSidebar-onUpdateThumbnails
Re-factor updating of thumbnails in the `PDFSidebar`-class
2023-05-29 12:56:24 +02:00
calixteman
f06d0b2a9e
Merge pull request #16483 from calixteman/bug1529502
[OTS] Remove cntrmask instruction with no stem in charstring (bug 1529502)
2023-05-28 20:42:59 +02:00
Calixte Denizet
78e6020a6e [OTS] Remove cntrmask instruction with no stem in charstring (bug 1529502) 2023-05-28 19:03:37 +02:00
Jonas Jenwald
c4c8227d20 Re-factor updating of thumbnails in the PDFSidebar-class
This patch does two things:
 - Moves the updating of thumbnails into `web/app.js`, via a new `PDFSidebar` callback-function, to avoid having to include otherwise unnecessary parameters when initializing a `PDFSidebar`-instance.
 - Only attempt to generate thumbnail-images from pages that are *cached* in the viewer. Note that only pages that exist in the `PDFPageViewBuffer`-instance can be rendered, hence it's not actually meaningful to check every single page when updating the thumbnails.
   For large documents, with thousands of pages, this should be a tiny bit more efficient when e.g. opening the sidebar since we no longer need to check pages that we know have not been rendered.
2023-05-28 17:54:34 +02:00
Jonas Jenwald
0e604f8f42 Use local variables more in PDFViewerApplication._initializeViewerComponents 2023-05-28 15:33:23 +02:00
Tim van der Meij
60feb2d5b6
Merge pull request #16470 from Snuffleupagus/thumbnailrendered-event
Introduce a "thumbnailrendered" event to simplify cleanup after thumbnail rendering (PR 12613 follow-up)
2023-05-28 14:15:24 +02:00
Tim van der Meij
9b3e1d41ae
Merge pull request #16481 from Snuffleupagus/update-packages
Update packages and translations
2023-05-28 14:12:32 +02:00
Jonas Jenwald
b51bbdf055 Update l10n files 2023-05-28 09:44:15 +02:00
Jonas Jenwald
0e129c9e5e Update npm packages 2023-05-28 09:39:34 +02:00
Jonas Jenwald
bc8523ac29 Introduce a "thumbnailrendered" event to simplify cleanup after thumbnail rendering (PR 12613 follow-up)
The way that the cleanup was implemented in PR 12613 has always bothered me slightly, since the `isPageCached`-method that I introduced there always felt quite out-of-place in the `IPDFLinkService`-implementations.
By introducing a new "thumbnailrendered" event, similar to the existing "pagerendered" one, we're able to move the cleanup handling into the `PDFViewer`-class instead.
2023-05-26 15:30:22 +02:00
Jonas Jenwald
6d8810b55c
Merge pull request #16479 from Snuffleupagus/PDFFindController-onIsPageVisible
Re-factor the `isPageVisible`-handling in the find-controller (PR 10217 follow-up)
2023-05-26 15:25:55 +02:00
Jonas Jenwald
d0bf505312 Re-factor the isPageVisible-handling in the find-controller (PR 10217 follow-up)
The way that this was implemented in PR 10217 has always bothered me slightly, since the `isPageVisible`-method that I introduced there always felt quite out-of-place in the `IPDFLinkService`-implementations.
Hence this is instead replaced by a callback-function in `PDFFindController`, to handle the page-visibility checks. Note that since the `PDFViewer`-constructor always sets this callback-function, e.g. the viewer-component examples still work as-is.
2023-05-26 13:59:39 +02:00
calixteman
cbc4b20b12
Merge pull request #16474 from calixteman/issue16473
Reset the formatted value when after a text field has been modified
2023-05-26 10:43:40 +02:00
Calixte Denizet
be5db13005 Reset the formatted value when after a text field has been modified 2023-05-26 10:17:14 +02:00
Jonas Jenwald
2bf68f3c7f
Merge pull request #16472 from calixteman/issue16471
Extract all the text of text annotations
2023-05-26 09:33:48 +02:00
Calixte Denizet
35a58ed987 Extract all the text of text annotations 2023-05-25 23:11:42 +02:00
Jonas Jenwald
2890c464da
Merge pull request #16466 from Snuffleupagus/gv-rm-Toolbar-stub
[GeckoView] Remove the `Toolbar`-stub since the viewer has an actual toolbar now
2023-05-25 22:23:10 +02:00
calixteman
8d5da54cd5
Merge pull request #16467 from calixteman/non_null_ultimate
Avoid to have a null fallback if none has been provided
2023-05-24 17:00:14 +02:00
Jonas Jenwald
ba654343e1
Merge pull request #16451 from Snuffleupagus/Wingdings
Attempt to improve non-embedded Wingdings font support (bug 1652224)
2023-05-24 16:04:12 +02:00
Jonas Jenwald
5a7beb9f30 Attempt to improve non-embedded Wingdings font support (bug 1652224)
Now that font-substitution has been implemented, we should be able to do much a better job at supporting non-embedded Wingdings fonts.
Given that this is a Windows-specific font, see https://en.wikipedia.org/wiki/Wingdings, this is however not guaranteed to work (well) on other platforms.
2023-05-24 14:59:13 +02:00
Calixte Denizet
7dce0a27f6 Avoid to have a null fallback if none has been provided 2023-05-24 14:44:36 +02:00
Jonas Jenwald
76ca395c32 [GeckoView] Remove the Toolbar-stub since the viewer has an actual toolbar now 2023-05-24 12:31:27 +02:00
Jonas Jenwald
daa48e5305
Merge pull request #16465 from Snuffleupagus/issue-16464
Ignore named encoding for non-embedded symbol fonts (issue 16464)
2023-05-24 11:56:59 +02:00
Jonas Jenwald
aeed6f2b67 Ignore named encoding for non-embedded symbol fonts (issue 16464)
The affected font is non-embedded ZapfDingbats, however the PDF document for some inexplicable reason specifies the encoding as "WinAnsiEncoding" (which is obviously wrong).
To work-around this bug in the PDF generator, we'll simply ignore any explicitly specified named encoding for non-embedded symbol fonts.
2023-05-24 10:48:47 +02:00
Jonas Jenwald
a6f9505a39
Merge pull request #16461 from Snuffleupagus/issue-16454
Improve "EI" detection in inline images (PR 12028 follow-up, issue 16454)
2023-05-23 22:23:22 +02:00
calixteman
1886012874
Merge pull request #16462 from calixteman/last_elem_TJ
Take into account the final space if any in the TJ command
2023-05-23 21:26:58 +02:00
calixteman
7cfe00a190
Merge pull request #16445 from calixteman/smoothing
[Editor] Improve curve smoothing for Ink tool (bug 1789443)
2023-05-23 19:20:24 +02:00
Calixte Denizet
d2b4ed3cea [Editor] Improve curve smoothing for Ink tool (bug 1789443)
- Remove the dependency on fit-curve;
- Improve the way to draw the current line in using a Path2D and
  in clearing only the last part of the curve instead of clearing
  all the canvas;
- Smooth the curve when drawing to avoid to have some changes after
  the drawing ends;
- Make the smoothing a bit less agressive.
2023-05-23 17:15:21 +02:00
Calixte Denizet
a76a69e1ed Take into account the final space if any in the TJ command
The final space was just ignored and that led to wrongly position
the next chunk of text.
2023-05-23 17:09:32 +02:00
Jonas Jenwald
dfbbb8c0ac Improve "EI" detection in inline images (PR 12028 follow-up, issue 16454)
Given that inline images may contain "EI"-sequences in the image-data itself, actually finding the end-of-image operator isn't always straightforward.
Here we extend the implementation from PR 12028 to potentially check all of the following bytes, rather than stopping immediately. While we have fairly decent test-coverage for this code, whenever you're changing it there's unfortunately a slightly higher than normal risk of regressions. (You'd really wish that PDF generators just stop using inline images.)
2023-05-23 17:04:51 +02:00
calixteman
094fb3c783
Merge pull request #16453 from calixteman/gv_telemetry
[GeckoView] Add some telemetry for the toolbar buttons (bug 1829216)
2023-05-22 17:08:43 +02:00
Calixte Denizet
7f1e8d1920 [GeckoView] Add some telemetry for the toolbar buttons (bug 1829216) 2023-05-22 16:43:09 +02:00