21890 Commits

Author SHA1 Message Date
Tim van der Meij
2463f4dc73
Merge pull request #20794 from calixteman/bug2020737
Move the heading role on the sidebar label (bug 2020737)
2026-03-05 20:29:07 +01:00
Tim van der Meij
cbc0362357
Merge pull request #20787 from Snuffleupagus/improve-PdfTextExtractor
Improve and simplify the `PdfTextExtractor` implementation
2026-03-05 20:23:23 +01:00
calixteman
9f8f303b1f
Merge pull request #20803 from calixteman/fix_saving
Fix downloading the current pdf
2026-03-05 15:01:08 +01:00
Calixte Denizet
dd52343d58
Fix downloading the current pdf 2026-03-05 13:05:03 +01:00
Jonas Jenwald
4d0709c174
Merge pull request #20795 from Snuffleupagus/Dict-more-iterators
Change the `Dict.prototype.{getKeys, getRawValues}` methods to return iterators
2026-03-04 18:26:42 +01:00
calixteman
7384359a41
Merge pull request #20781 from pengkunbin/fix/chinese-font-names-gbk
Fix missing Chinese font name variants (SimFang and XiaoBiaoSong) in GBK encoding detection
2026-03-04 16:49:44 +01:00
calixteman
c41be4fd88
Merge pull request #20796 from nicolo-ribaudo/fix-license-lint
Ignore directories in lint-licenses task
2026-03-04 16:29:10 +01:00
Nicolò Ribaudo
ad91f3abc8
Ignore directories in lint-licenses task
The glob pattern will include directories that have a name ending,
for example, with `.js`.
2026-03-04 16:24:28 +01:00
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
Calixte Denizet
f6401e4344
Move the heading role on the sidebar label (bug 2020737) 2026-03-04 15:25:11 +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
c70ff5a7c0 Improve and simplify the PdfTextExtractor implementation
Working on PR 20784, I couldn't help noticing that this code can be improved a little bit.

 - Only initialize `PdfTextExtractor` in development mode and MOZCENTRAL builds, since it's unused elsewhere.

 - Re-factor how `PdfTextExtractor` waits for the viewer to be available/ready, by using existing (internal) events.
   This simplifies the `PdfTextExtractor` class and removes its `setViewer` method, which improves general consistency since normally the viewer-components don't use such a method in that way (here it was effectively used as a stand-in for a `setDocument` method).

 - Finally, while slightly unrelated, rename the `#getAllTextInProgress` field in the `PDFViewer` class to `#copyAllInProgress` to clearly indicate what it's for since the `getAllText` method is used more generally now.
2026-03-03 15:51:08 +01:00
pengkunbin
ead2a6e675 Add reference tests for SimFang variant and XiaoBiaoSong fonts
Add eq tests for the two newly supported Chinese font name variants
(仿宋体 and 小标宋) to verify correct GBK encoding detection.
2026-03-03 22:46:11 +08: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
jizou
0e1b5cd7bb Fix missing Chinese font name variants (SimFang and XiaoBiaoSong) in GBK encoding detection 2026-03-03 17:04:59 +08: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