21878 Commits

Author SHA1 Message Date
Jonas Jenwald
229e3642be Change the Dict.prototype.getRawValues method to return an iterator
This method is usually used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through ` Map`-values to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getRawValues` method is old code, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 16:07:49 +01:00
Jonas Jenwald
58996f21b2 Change the Dict.prototype.getKeys method to return an iterator
This method is usually used with loops, and it should be a tiny bit more efficient to use an iterator directly rather than first iterating through ` Map`-keys to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getKeys` method is old code, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 16:07:49 +01:00
Jonas Jenwald
40bd73551c
Merge pull request #20793 from Snuffleupagus/more-getRawEntries
Use the `Dict.prototype.getRawEntries` method more
2026-03-04 16:05:57 +01:00
Jonas Jenwald
2c78b745af
Merge pull request #20791 from Snuffleupagus/l10n-README
Update l10n related information in various READMEs
2026-03-04 16:04:33 +01:00
calixteman
ce5f34ba13
Merge pull request #20780 from wooorm/wooorm/dismiss-popups
Add support for dismissing comment popups with click outside
2026-03-04 15:24:29 +01:00
calixteman
72f98d4e00
Merge pull request #20788 from calixteman/organize_context_menu
Add the pages organization actions in the Firefox context menu (bug 2018138)
2026-03-04 15:20:00 +01:00
Jonas Jenwald
ece03f9960
Merge pull request #20782 from nicolo-ribaudo/license-header-lint
Add script to check license headers
2026-03-04 13:01:24 +01:00
Jonas Jenwald
50d66d7d34 Use the Dict.prototype.getRawEntries method more
This changes a number of loops currently using `Dict.prototype.{getKeys, getRaw}`, since it should be a tiny bit more efficient to use an iterator directly rather than first iterating through `Map`-keys to create a temporary `Array` that we finally iterate through at the call-site.

Note that the `getKeys` method is much older than `getRawEntries`, and originally the `Dict` class stored its data in a regular `Object`, hence why the old code was written that way.
2026-03-04 12:46:25 +01:00
Nicolò Ribaudo
2f2d5c9e27
Add script to check license headers 2026-03-04 10:40:39 +01:00
Jonas Jenwald
4ea89f49e7 Update l10n related information in various READMEs
In practice we've not accepted PRs with "manual" changes of any non `en-US` locales for many years, however some (older) README/FAQ entries can perhaps be seen as actually inviting such PRs.

Now that l10n updates are running automatically via GitHub Actions, see PR 20749, we're definitely not going to accept any "manual" translation patches so it cannot hurt to de-emphasize localization in various README files.

(Also, since all relevant Fluent files have license headers it doesn't seem meaningful to mention that in the l10n README.)
2026-03-04 09:55:09 +01:00
Calixte Denizet
d90530b86c
Add the pages organization actions in the Firefox context menu (bug 2018138) 2026-03-04 09:02:39 +01:00
calixteman
68cca32e20
Merge pull request #20785 from calixteman/extract_pages
Add a way to extract some pages from a pdf (bug 2019682)
2026-03-04 08:44:13 +01:00
calixteman
286b0cc536
Merge pull request #20789 from calixteman/fix_paste_button_layout
Fix the paste button position and add a button before the first thumbnail
2026-03-04 08:43:00 +01:00
Calixte Denizet
27aea732a2
Fix the paste button position and add a button before the first thumbnail 2026-03-03 21:46:51 +01:00
Calixte Denizet
a474e81b8a
Add a way to extract some pages from a pdf (bug 2019682)
The user has to select some pages and then click on the "Save As" menu item in the Manage menu.
If they modify the structure of the pdf (deleted, moved, copied pages), they have to use the usual
save button.
2026-03-03 21:39:13 +01:00
calixteman
ecb0f578ae
Merge pull request #20773 from calixteman/try_to_fix_intermittent
Fix intermittent issue with a unit test
2026-03-03 19:39:37 +01:00
calixteman
973add845f
Merge pull request #20779 from calixteman/fix_sidebar_css
Fix layout of thumbnails when split/merge is disabled
2026-03-03 16:19:03 +01:00
Jonas Jenwald
ae507c49b3
Merge pull request #20784 from Snuffleupagus/PdfTextExtractor-fix-intermittent
Prevent `PdfTextExtractor.prototype.extractTextContent` from failing intermittently
2026-03-03 15:10:26 +01:00
Jonas Jenwald
54a8c049fd Prevent PdfTextExtractor.prototype.extractTextContent from failing intermittently
Given that extracting all text can take a while to complete, especially in long PDF documents[1], it's technically possible for the user to "select all", copy, and finally abort copying (with the `Esc` key) while `PdfTextExtractor.prototype.extractTextContent` is still running.
If that happens the `PDFViewer.prototype.getAllText` code would be interrupted, and text-extraction would thus fail in an intermittent and (likely) hard to debug way. To avoid this we replace the current "global" interrupt handling with an optional `AbortSignal` instead.

---

[1] See e.g. `pdf.pdf` in the test-suite.
2026-03-03 11:55:33 +01:00
Titus Wormer
8b4f9048cf
Add support for dismissing comment popups with click outside
This solves [bug 1989406](https://bugzilla.mozilla.org/show_bug.cgi?id=1989406).
(“The user should be able to dismiss the in-content message displayed by clicking somewhere else in the PDF”)
There’s a good gif there that shows the problematic behavior.

In the thread, there are also mentions of 2 similar but slightly separate problems:

* clicking on another highlight should also dismiss
* the mention that hitting the escape key does not dismiss

I found the last point, the escape key, to work already (first test case here).
But this PR solves the main bug (second test case) and the adjacent one
(third test case).
It works by using the existing `unselectAll` handling.
2026-03-03 11:14:22 +01:00
Calixte Denizet
cdc1c8af40
Fix layout of thumbnails when split/merge is disabled 2026-03-02 15:16:16 +01:00
calixteman
d859d78bb5
Merge pull request #20775 from Snuffleupagus/hide-select-pages
Hide the "Select pages" label, in the thumbnails sidebar, when split-merge is disabled
2026-03-02 14:53:15 +01:00
calixteman
0c29cc5887
Merge pull request #20776 from Snuffleupagus/commentManager-l10n-getDirection
Use `L10n.prototype.getDirection` rather than querying the DOM, when initializing the `CommentManager` instance
2026-03-02 14:45:36 +01:00
calixteman
3cb32b6ab2
Merge pull request #20772 from calixteman/babel_plugin_strip_src_path
Use a babel plugin in order to strip /src/ from the import paths
2026-03-02 14:44:49 +01:00
Jonas Jenwald
0d131f0957 Use L10n.prototype.getDirection rather than querying the DOM, when initializing the CommentManager instance
Hopefully I'm not misunderstanding why it was written like that, however using an existing method should be a tiny bit more efficient than querying the DOM.
2026-03-02 11:33:34 +01:00
Jonas Jenwald
a0e70eb6aa Hide the "Select pages" label, in the thumbnails sidebar, when split-merge is disabled
Currently there's a "pointless" label displayed, thus taking up vertical space, when `enableSplitMerge = false` is set.
2026-03-02 11:19:02 +01:00
calixteman
afa8a07a2b
Merge pull request #20760 from calixteman/avoid_noise
Just output in the console the results for the integrations which ran
2026-03-02 10:15:12 +01:00
calixteman
ed390c06a1
Fix intermittent issue with a unit test
Avoid to rely on timing in the test, which can cause intermittent failures.
Instead, we check that the image is cached at the document/page level.
2026-03-01 22:59:04 +01:00
calixteman
2eb145f3f1
Use a babel plugin in order to strip /src/ from the import paths 2026-03-01 22:17:30 +01:00
Calixte Denizet
6b3331f47b
Just output in the console the results for the integrations which ran 2026-03-01 21:55:23 +01:00
Tim van der Meij
55c371d97c
Merge pull request #20771 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2026-03-01 21:28:56 +01:00
Tim van der Meij
4230ba19df
Bump the stable version in pdfjs.config 2026-03-01 21:25:24 +01:00
Tim van der Meij
5279646985
Merge pull request #20751 from calixteman/bug2016693
Avoid to scroll too much when the thumbnail is at the bottom of the sidebar (bug 2016693)
v5.5.207
2026-03-01 21:14:44 +01:00
calixteman
98d0332a9f
Merge pull request #20767 from calixteman/followup_20742
Add an integration test for the issue fixed in #20742
2026-03-01 21:11:50 +01:00
calixteman
c1fe547a05
Add an integration test for the issue fixed in #20742 2026-03-01 20:55:59 +01:00
Tim van der Meij
62ceac6e97
Merge pull request #20769 from timvandermeij/updates
Update dependencies to the most recent versions
2026-03-01 20:55:40 +01:00
Tim van der Meij
3d2d145329
Fix vulnerabilities in dependency versions
This patch is generated automatically using `npm audit fix`.
2026-03-01 20:44:42 +01:00
Tim van der Meij
ced9b4717f
Upgrade c8 to version 11.0.0
This is a major version bump, but the changelog at
https://github.com/bcoe/c8/releases/v11.0.0 doesn't indicate any
breaking changes that should impact us.
2026-03-01 20:43:20 +01:00
Tim van der Meij
4cb0d504b0
Update dependencies to the most recent versions 2026-03-01 20:42:19 +01:00
Tim van der Meij
5cbb8413cb
Merge pull request #20768 from calixteman/rm_yargs
Remove dependency to yargs and use node:utils parseArgs
2026-03-01 20:19:11 +01:00
Tim van der Meij
1861a4c4ad
Merge pull request #20756 from Snuffleupagus/PDFDataRangeTransport-tests
Improve the `PDFDataRangeTransport` unit-tests
2026-03-01 20:10:34 +01:00
Tim van der Meij
f32b9d2677
Merge pull request #20738 from Snuffleupagus/function-shorten
Slightly shorten some code in the `src/core/function.js` file
2026-03-01 20:06:29 +01:00
Tim van der Meij
e0ea84fdac
Merge pull request #20761 from calixteman/tweak_dims
Tweak few elements: dimensions and the checkbox color in the new sidebar
2026-03-01 20:01:07 +01:00
Tim van der Meij
9dfcc62bb9
Merge pull request #20758 from calixteman/fix_sidebar_height
Fix the page sidebar height
2026-03-01 19:58:18 +01:00
Tim van der Meij
6299bf7fd6
Merge pull request #20762 from mozilla/dependabot/npm_and_yarn/multi-f5f34deeac
Bump minimatch
2026-03-01 19:56:30 +01:00
Tim van der Meij
2bc9a59acc
Merge pull request #20766 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.4.1
Bump fast-xml-parser from 5.3.5 to 5.4.1
2026-03-01 19:56:03 +01:00
calixteman
f57b73d881
Remove dependency to yargs and use node:utils parseArgs 2026-03-01 15:01:31 +01:00
calixteman
00d9d3a6ea
Merge pull request #20742 from Snuffleupagus/tree-viewer-scrollIntoView
Fix scrolling of outline item into view (PR 20495 follow-up)
2026-03-01 13:01:21 +01:00
dependabot[bot]
73bd5c35da
Bump fast-xml-parser from 5.3.5 to 5.4.1
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.5 to 5.4.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.3.5...v5.4.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.4.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 00:12:36 +00:00
dependabot[bot]
7a8571459a
Bump minimatch
Bumps  and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together.

Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 10.1.1 to 10.2.4
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 10.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 03:47:33 +00:00