Commit Graph

16528 Commits

Author SHA1 Message Date
Jonas Jenwald
2ae90f9615
Merge pull request #15655 from tamuratak/move_canvas_to_optionaldeps
Move canvas to optionalDependencies
2022-11-02 09:49:04 +01:00
Takashi Tamura
0bb478cb23 Move canvas to optionalDependencies, which enables npm to continue installing pdfjs-dist
even if the installation of canvas fails. Close #15652
2022-11-02 08:33:31 +09:00
Jonas Jenwald
6193537cd3
Merge pull request #15648 from Snuffleupagus/issue-12232
Prevent interaction with form elements in PresentationMode (issue 12232)
2022-10-31 11:14:23 +01:00
calixteman
e42e1cde61
Merge pull request #15615 from calixteman/bug1796741
[Form] Don't use field appearances when /NeedAppearances is set to true (bug 1796741)
2022-10-31 09:58:27 +01:00
Jonas Jenwald
bc4e5e39ff
Merge pull request #15649 from SpartanApple/patch-1
Changed link for "Gulp's getting started guide"
2022-10-31 09:20:18 +01:00
Mitchell Gale
8d147b993f
Changed link for "Gulp's getting started guide"
Gulp's getting started guide changed location to https://github.com/gulpjs/gulp/tree/master/docs/getting-started. Link updated in readme to reflect that.
2022-10-30 15:30:42 -07:00
Jonas Jenwald
547556b5b2 Prevent keyboard interaction with form elements in PresentationMode (issue 12232)
This uses the relatively new `HTMLElement.inert` property, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert for additional information. The only "problem" is that this isn't yet available in all Firefox channels, but until https://bugzilla.mozilla.org/show_bug.cgi?id=1764263 is fixed we're no worse off than before.
2022-10-30 21:57:55 +01:00
Jonas Jenwald
f0811a4a3c Prevent mouse interaction with form elements in PresentationMode (issue 12232) 2022-10-30 21:55:44 +01:00
Tim van der Meij
c059c13785
Merge pull request #15643 from timvandermeij/bump
Bump versions in `pdfjs.config`
2022-10-29 20:11:04 +02:00
Tim van der Meij
ab136c5c39
Bump versions in pdfjs.config 2022-10-29 20:04:37 +02:00
Tim van der Meij
d0823066cc
Merge pull request #15642 from mozilla/dependabot/npm_and_yarn/minimist-and-minimist-1.2.6
Bump minimist
2022-10-29 19:19:40 +02:00
dependabot[bot]
131819a15c
Bump minimist
Bumps [minimist](https://github.com/minimistjs/minimist) and [minimist](https://github.com/minimistjs/minimist). These dependencies needed to be updated together.

Updates `minimist` from 1.2.0 to 1.2.6
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.6)

Updates `minimist` from 1.2.5 to 1.2.6
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-29 17:14:12 +00:00
Tim van der Meij
b74fbdeda7
Merge pull request #15640 from Snuffleupagus/update-packages
Update packages and translations
2022-10-29 19:12:29 +02:00
Tim van der Meij
eeca44d162
Merge pull request #15641 from Snuffleupagus/rm-PdfManager-onLoadedStream
Remove the `PdfManager.onLoadedStream` method (PR 15616 follow-up)
2022-10-29 19:09:35 +02:00
Jonas Jenwald
caef47a0cf Remove the PdfManager.onLoadedStream method (PR 15616 follow-up)
After the clean-up in PR 15616, the `PdfManager.onLoadedStream` method now only has a single call-site.
Hence why this patch suggests that we remove this method and replace it with an *optional* parameter in `PdfManager.requestLoadedStream` instead. By making the new behaviour opt-in, we'll thus not change any existing call-site.
2022-10-29 14:42:17 +02:00
Jonas Jenwald
5b46400240
Merge pull request #15633 from calixteman/cursors
[Editor] Change the cursor icons
2022-10-29 12:24:10 +02:00
Calixte Denizet
67778eac60 [Editor] Change the cursor icons 2022-10-29 12:05:09 +02:00
Jonas Jenwald
571a986496 Update l10n files 2022-10-29 11:34:45 +02:00
Jonas Jenwald
f6746854ac Update npm packages 2022-10-29 11:34:43 +02:00
Jonas Jenwald
8b970109ea
Merge pull request #15632 from Snuffleupagus/issue-15629-2
[api-minor] Move the handling of unbalanced markedContent to the worker-thread (PR 15630 follow-up)
2022-10-29 09:37:07 +02:00
calixteman
8f80efa4ab
Merge pull request #15618 from calixteman/15614
[JS] Some functions (print, alert,...) must be called only after a user activation
2022-10-28 21:04:42 +02:00
Calixte Denizet
0de804a256 [JS] Some functions (print, alert,...) must be called only after a user activation
- Some events, which require a user interaction, will allow those functions to be called.
But after few seconds, if there are no more user interaction, it won't be possible
anymore.
The idea is to give an opportunity to the user to leave the pdf.
- Disable print function when we're printing, the same with saving and disallow to save
on open events.
2022-10-28 18:52:07 +02:00
Jonas Jenwald
a7232339d8
Merge pull request #15637 from Snuffleupagus/Array-from-map
Combine `Array.from` and `Array.prototype.map` calls
2022-10-28 18:29:02 +02:00
Jonas Jenwald
ba05e47b3e Combine Array.from and Array.prototype.map calls
This isn't just a tiny bit more compact, but it also avoids an intermediate allocation; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#description
2022-10-28 13:46:30 +02:00
Jonas Jenwald
1e7274e9c6 [api-minor] Move the handling of unbalanced markedContent to the worker-thread (PR 15630 follow-up) 2022-10-27 11:14:54 +02:00
calixteman
27b251ac99
Merge pull request #15631 from calixteman/15627
[JS] Avoid to trigger a commit event on 'ENTER' when the textfield is multiline
2022-10-27 10:29:25 +02:00
Calixte Denizet
87f53b9cc9 [JS] Avoid to trigger a commit event on 'ENTER' when the textfield is multiline 2022-10-26 19:29:13 +02:00
Jonas Jenwald
05e5927c41
Merge pull request #15630 from Snuffleupagus/issue-15629
Prevent textLayer errors in documents with unbalanced beginMarkedContent/endMarkedContent operators (issue 15629)
2022-10-26 19:27:23 +02:00
Jonas Jenwald
980acddbfa Prevent textLayer errors in documents with unbalanced beginMarkedContent/endMarkedContent operators (issue 15629) 2022-10-26 18:35:48 +02:00
Calixte Denizet
9f95a14e91 [Form] Don't use field appearances when /NeedAppearances is set to true (bug 1796741)
When a form isn't changed, we used the appearances we had in the file, but when
/NeedAppearances is true, all the appearances have to be regenerated whatever they're.
2022-10-26 12:10:51 +02:00
calixteman
9a33a0fba9
Merge pull request #15623 from calixteman/editor_int_test
Fix editor tests on Windows
2022-10-26 11:31:07 +02:00
calixteman
00279d6e64
Merge pull request #15625 from calixteman/bug1797310
Fix font for the 'current view' entry in the secondary toolbar (bug 1797310)
2022-10-26 11:02:55 +02:00
Calixte Denizet
0996398372 Fix font for the 'current view' entry in the secondary toolbar (bug 1797310) 2022-10-26 10:49:23 +02:00
Calixte Denizet
2384fbcb89 Fix editor tests on Windows
- In #15373, we implemented copy/paste actions in using the system
clipboard.
For any reasons, on Windows, the clipboard doesn't contain the expected
data when the tests are ran in parallel, hence the tests which are
using the clipboard need to be ran sequentially.
- Make sure that we can paste after having copied.
2022-10-25 22:48:02 +02:00
Jonas Jenwald
098ca670d0
Merge pull request #15616 from Snuffleupagus/PdfManager-requestLoadedStream-return
Let the `PdfManager.requestLoadedStream` method return the stream
2022-10-25 11:39:01 +02:00
Jonas Jenwald
22225a1eaa
Merge pull request #15617 from Snuffleupagus/bug-1662416
Update the l10n-strings for the download-buttons (bug 1662416)
2022-10-24 19:18:30 +02:00
Jonas Jenwald
03775917db Update the l10n-strings for the download-buttons (bug 1662416)
According to https://bugzilla.mozilla.org/show_bug.cgi?id=1662416#c8
2022-10-24 18:29:44 +02:00
Jonas Jenwald
bcffbf74f3 Let the PdfManager.requestLoadedStream method return the stream
*This is very old code, and it could thus do with some simplification.*

Note how in the `src/core/worker.js` file we're combining both the `PdfManager.requestLoadedStream` and `PdfManager.onLoadedStream` methods in order to access the stream-data. This seems unnecessary, and it's simple enough to always let the `PdfManager.requestLoadedStream` method return the stream-data as well.
2022-10-24 17:00:48 +02:00
Jonas Jenwald
987062c302
Merge pull request #15581 from Snuffleupagus/rm-setTransform-catch
Revert "Avoid all rendering breaking completely when CanvasPattern.setTransform() is unsupported" (PR 13725 follow-up)
2022-10-22 14:09:43 +02:00
Jonas Jenwald
497edbd0ee Revert "Avoid all rendering breaking completely when CanvasPattern.setTransform() is unsupported" (PR 13725 follow-up)
PR 13725 was only intended as a temporary work-around, and it seems that we can now revert that.
 - Firefox 102 is the currently maintained ESR-branch, and the PDF.js project only supports the active one.
 - Node.js now works, thanks to the `node-canvas` package, and I've confirmed locally that following the STR in issue 13724 generates a correct image.
2022-10-22 10:58:51 +02:00
Jonas Jenwald
f5711fc385
Merge pull request #15606 from Snuffleupagus/issue-15604
Let `Lexer.getNumber` treat more invalid "numbers" as zero (issue 15604)
2022-10-21 17:23:55 +02:00
calixteman
5e045b8688
Merge pull request #15608 from calixteman/new_icons
Update icons (last and final update)
2022-10-21 12:46:40 +02:00
Calixte Denizet
80dfd5404f Update icons (last and final update) 2022-10-21 12:31:34 +02:00
Jonas Jenwald
71bd8b4de9 Let Lexer.getNumber treat more invalid "numbers" as zero (issue 15604)
In the referenced PDF document there are "numbers" which consist only of `-.`, and while that's obviously not valid Adobe Reader seems to handle it just fine.
Letting this method ignore more invalid "numbers" was suggested during the review of PR 14543, so let's simply relax our the validation here.
2022-10-20 22:36:15 +02:00
Jonas Jenwald
7dc16c237a
Merge pull request #15603 from Snuffleupagus/pr-15593-followup
Restore a weaker version of the /Pages dictionary /Count check for corrupt documents (PR 15593 follow-up)
2022-10-20 15:13:25 +02:00
Jonas Jenwald
e591378ff1 Restore a weaker version of the /Pages dictionary /Count check for corrupt documents (PR 15593 follow-up)
It appears that PR 15593 broke `issue12402`, and we thus need to partially restore the /Count check.
 I completely missed this when looking at the test-results for PR 15593, both locally and on the bots, since the `Driver._getLastPageNumber` method would "swallow" an unavailable page number.
2022-10-20 14:22:29 +02:00
Jonas Jenwald
36967fcedb
Merge pull request #15586 from Snuffleupagus/rm-matchesForCache
Remove the `Glyph.matchesForCache` method (PR 13494 follow-up)
2022-10-20 10:35:00 +02:00
Jonas Jenwald
f3949ba69d
Merge pull request #15598 from calixteman/15597
[Annotation] Replace use of id by data-element-id to have the correct id
2022-10-20 00:01:24 +02:00
Calixte Denizet
6db9cefaaf [Annotation] Replace use of id by data-element-id to have the correct id 2022-10-19 23:36:28 +02:00
calixteman
ba3a0e104a
Merge pull request #15595 from calixteman/1793419
[Editor] Make FreeText annotations visible for screen readers when in editing mode (bug 1793419)
2022-10-19 19:33:49 +02:00