22064 Commits

Author SHA1 Message Date
Calixte Denizet
75cb69eef2
Fix various bug around copy/paste/delete/undo (bug 2022586, bug 2022824, bug 2022884, bug 2023171, bug 2023176)
Those bugs are more or less related so it's why they're all fixed together in the same patch.
2026-03-18 13:57:20 +01:00
calixteman
979d9c3091
Merge pull request #20895 from calixteman/issue20893
Fix the position of 'Attachments' in the sidebar
2026-03-18 11:24:22 +01:00
calixteman
d224bec9e2
Merge pull request #20852 from calixteman/bug2019550
Allow to collapse/expand all the outlines in double clicking somewhere on the header bar (bug 2019550)
2026-03-18 11:20:42 +01:00
Jonas Jenwald
bdc16f8999
Merge pull request #20868 from Snuffleupagus/exportData-compileFontInfo
Move the `compileFontInfo` call into the `Font.prototype.exportData` method (PR 20197 follow-up)
2026-03-18 11:14:46 +01:00
Calixte Denizet
96d1465aab Allow to collapse/expand all the outlines in double clicking somewhere on the header bar (bug 2019550) 2026-03-18 10:26:04 +01:00
Calixte Denizet
44f4627600 Fix the position of 'Attachments' in the sidebar
It fixes #20893.
2026-03-18 10:09:23 +01:00
calixteman
0ee557cd60
Merge pull request #20905 from calixteman/reorganize_outlines
Add support for saving outlines after reorganize/merge (bug 2009574)
2026-03-17 22:33:49 +01:00
Calixte Denizet
e67892d035
Add support for saving outlines after reorganize/merge (bug 2009574) 2026-03-17 22:22:13 +01:00
Tim van der Meij
76bd6dc0dd
Merge pull request #20903 from calixteman/fix_intermittent_setCaret
Wait to have all the spans in the text layer before trying to set the caret in integration tests
2026-03-17 21:58:10 +01:00
Tim van der Meij
83f06b4cf3
Merge pull request #20897 from calixteman/empty_shading
Don't throw when a mesh shading is degenerated
2026-03-17 21:18:24 +01:00
Tim van der Meij
feea0e2f00
Merge pull request #20904 from calixteman/rm_useless_op_gettextcontent
Remove some useless operations when getting the text content
2026-03-17 20:34:51 +01:00
Tim van der Meij
18a2f60469
Merge pull request #20864 from calixteman/fix_intermittent_reorg
Try to fix few intermittents bug in reorganize_pages_spec integration tests
2026-03-17 20:16:56 +01:00
Calixte Denizet
fd1fea5f6a
Remove some useless operations when getting the text content
The removed code has been added in #20624 and it's useless since these
operations (i.e. save/restore) are already handled in preprocessor.read.
2026-03-17 16:00:29 +01:00
Calixte Denizet
32dc2a5894 Wait to have all the spans in the text layer before trying to set the caret in integration tests 2026-03-17 15:30:57 +01:00
calixteman
1f94023d42
Merge pull request #20898 from calixteman/issue20847
Don't throw when printing with pdfBug enabled
2026-03-17 12:39:48 +01:00
calixteman
b7d71eb7f8 Don't throw when printing with pdfBug enabled
It fixes #20847.
2026-03-17 10:54:32 +01:00
calixteman
085ab36680
Don't throw when a mesh shading is degenerated
The problem of throwing an error is that it removes an operation
from drawing list which can cause a rendering issue.
2026-03-16 23:23:14 +01:00
Calixte Denizet
5493585b54
Try to fix few intermittents bug in reorganize_pages_spec integration tests 2026-03-16 22:00:42 +01:00
Tim van der Meij
394727a28c
Merge pull request #20887 from calixteman/fix_intermittent_comment_sidebar
Wait a little between each key press in the test 'must check that the comment sidebar is resizable with the keyboard'
2026-03-16 21:12:25 +01:00
Tim van der Meij
0a2c030c8b
Merge pull request #20888 from calixteman/debugger_skip_ops
Add the possibility to skip some ops in the debug view
2026-03-16 20:36:48 +01:00
Tim van der Meij
481a0cbe62
Merge pull request #20889 from calixteman/debugger_search_btns
(Debugger) Replace checkboxes in the search bar by toggle buttons
2026-03-16 20:35:17 +01:00
Tim van der Meij
109f6a9b49
Merge pull request #20890 from calixteman/debugger_mv_checkerboard
(Debugger) Don't draw the checkerboard on the canvas but add it behind
2026-03-16 20:34:15 +01:00
Tim van der Meij
0e964c248a
Merge pull request #20894 from Snuffleupagus/compileFontPathInfo-slice
Simplify compilation of font paths (PR 20346 follow-up)
2026-03-16 20:32:05 +01:00
Tim van der Meij
87c1231669
Merge pull request #20896 from Snuffleupagus/CachedCanvases-Map
Re-factor the `CachedCanvases` class to use a `Map` internally
2026-03-16 20:30:36 +01:00
Jonas Jenwald
2cc53270f3 Re-factor the CachedCanvases class to use a Map internally 2026-03-16 18:59:46 +01:00
Jonas Jenwald
fa7ddbb9bc Simplify compilation of font paths (PR 20346 follow-up)
Given that `CompiledFont.prototype.getPathJs` already returns data in the desired TypedArray format, we should be able to directly copy the font-path data which helps shorten the code a little bit (rather than the "manual" handling in PR 20346).

To ensure that this keeps working as expected, a non-production `assert` is added to prevent any future surprises.
2026-03-16 14:51:36 +01:00
Jonas Jenwald
7d963ddc7c Move the compileFontInfo call into the Font.prototype.exportData method (PR 20197 follow-up)
After the changes in PR 20197 the code in the `TranslatedFont.prototype.send` method is not all that readable[1] given how it handles e.g. the `charProcOperatorList` data used with Type3 fonts.
Since this is the only spot where `Font.prototype.exportData` is used, it seems much simpler to move the `compileFontInfo` call there and *directly* return the intended data rather than messing with it after the fact.

Finally, while it doesn't really matter, the patch flips the order of the `charProcOperatorList` and `extra` properties throughout the code-base since the former is used with Type3 fonts while the latter (effectively) requires that debugging is enabled.

---

[1] I had to re-read it twice, also looking at all the involved methods, in order to convince myself that it's actually correct.
2026-03-16 09:29:17 +01:00
calixteman
fc286aac4e
(Debugger) Don't draw the checkerboard on the canvas but add it behind 2026-03-15 23:20:18 +01:00
calixteman
c7837580b9
(Debugger) Replace checkboxes in the search bar by toggle buttons 2026-03-15 22:46:13 +01:00
Jonas Jenwald
d38cddf2b6
Merge pull request #20869 from Snuffleupagus/FontFaceObject-rm-bbox-setter
Remove the unused `bbox` setter in the `FontFaceObject` class (PR 20427 follow-up)
2026-03-15 22:46:12 +01:00
calixteman
e85c30e08a
Add the possibility to skip some ops in the debug view
The user has to click in the space before an op to add a breakpoint
and click again in order to skip it.
2026-03-15 22:25:45 +01:00
calixteman
3ff52e415f
Merge pull request #20862 from calixteman/bug2023106
Check for having Ref before adding them in a RefSet (bug 2023106)
2026-03-15 22:15:58 +01:00
Calixte Denizet
0fca64f01e
Check for having Ref before adding them in a RefSet (bug 2023106) 2026-03-15 22:03:39 +01:00
Calixte Denizet
2ac42392f0 Wait a little between each key press in the test 'must check that the comment sidebar is resizable with the keyboard' 2026-03-15 21:55:38 +01:00
Jonas Jenwald
f1e1973e6f Remove the unused bbox setter in the FontFaceObject class (PR 20427 follow-up)
The commit message for the patch in PR 20427 is pretty non-descriptive, being only a single line, however there's a bit more context in https://github.com/mozilla/pdf.js/pull/20427#issue-3597370951 but unfortunately the details there don't really make sense.
Note that the PR only changed main-thread code, but all the links are to worker-thread code!?

The `FontFaceObject` class is only used on the main-thread, and when encountering a broken font we fallback to the built-in font renderer; see 820b70eb25/src/display/font_loader.js (L135-L143)
Hence the `FontFaceObject` class *only* needs a way to set the `disableFontFace` property, however nowhere on the main-thread do we ever update the `bbox` of a font.
2026-03-15 21:16:18 +01:00
Tim van der Meij
1192e5e921
Merge pull request #20884 from calixteman/fix_extract_text
Fix the issue in the ref test tracemonkey-extract_0_2_12
2026-03-15 20:41:00 +01:00
Tim van der Meij
c2acab55d9
Merge pull request #20765 from calixteman/update_eslint
Update eslint to version 10
2026-03-15 20:26:09 +01:00
Tim van der Meij
1b88960ead
Merge pull request #20883 from Snuffleupagus/PatternInfo-pointBoundingBox
Use the `Util.pointBoundingBox` helper in the `PatternInfo` class (PR 20340 follow-up)
2026-03-15 19:46:58 +01:00
Tim van der Meij
665a631bdc
Merge pull request #20879 from Snuffleupagus/increase-MAX_SCALE
Increase the maximum viewer scale to 2500 percent
2026-03-15 19:46:36 +01:00
Tim van der Meij
6ca9389d25
Merge pull request #20878 from timvandermeij/exit-code
Use a non-zero exit code if the tests failed
2026-03-15 19:44:18 +01:00
calixteman
d5ac981d62
Update eslint to version 10
Unfortunately, eslint-plugin-import depends on eslint 9. This plugin doesn't seem to be
actively maintained (lot of open issues and PRs).
Fortunately there's a fork of the plugin that doesn't support eslint 10 yet but is actively maintained.
So this PR changes the eslint version to 10 and replaces eslint-plugin-import with eslint-plugin-import-x.
2026-03-15 19:36:54 +01:00
Calixte Denizet
dde0beafc6
Fix the issue in the ref test tracemonkey-extract_0_2_12
When getting the extracted document, the url for the wasms wasn't passed
and consequently the icc-based color wasn't rendered as expected because of the wasm for qcms.
2026-03-15 19:26:24 +01:00
Tim van der Meij
f49877ae95
Merge pull request #20877 from timvandermeij/updates
Update dependencies to the most recent versions
2026-03-15 19:07:04 +01:00
Jonas Jenwald
d0ee35470b Use the Util.pointBoundingBox helper in the PatternInfo class (PR 20340 follow-up)
Rather than computing the `bounds` manually, as done in PR 20340, we can shorten/simplify the code by using an existing helper instead.
2026-03-15 18:26:15 +01:00
Jonas Jenwald
e05df11e98 Increase the maximum viewer scale to 2500 percent
After PR 19128 huge zoom levels should no longer be an issue, so let's increase the maximum viewer scale a bit.
2026-03-15 15:45:34 +01:00
Tim van der Meij
c798f88bdb
Use a non-zero exit code if the tests failed
The bots currently detect if the tests failed or not by checking the
output text, but this is error-prone as it would break if the text gets
changed (which is rather unexpected) and it's non-standard as usually
processes report success/failure via their exit code.

This commit makes sure that the test process fails with a non-zero exit
code if the tests failed, and a zero exit code otherwise. Note that we
keep the same output text as before, so this change should not impact
the bots, but it does form another step to unlock usage in GitHub
Actions (which uses the exit code of commands to determine the status of
the workflow run).
2026-03-15 15:13:56 +01:00
Tim van der Meij
534a199d18
Fix vulnerability in the flatted dependency
This patch is generated with `npm audit fix` and fixes CVE-2026-32141.
2026-03-15 14:54:11 +01:00
Tim van der Meij
b7ebd80db8
Update dependencies to the most recent versions 2026-03-15 14:53:11 +01:00
Tim van der Meij
3127492a38
Merge pull request #20875 from Snuffleupagus/version-5.6
Bump library version to `5.6`
2026-03-15 14:36:01 +01:00
calixteman
a3a205d69b
Merge pull request #20871 from calixteman/refactor_debugger
Split the new debugger into multiple files
2026-03-15 14:29:13 +01:00