21414 Commits

Author SHA1 Message Date
Tim van der Meij
3f0d39b024
Merge pull request #20244 from calixteman/fix_deleting_popup
[Editor] Fix saving a deleted popup
2025-09-08 21:23:47 +02:00
Tim van der Meij
512c30b1f6
Unskip the must check that date entered by the user is consistent scripting integration test for Firefox
Bug 1978027 has been fixed upstream 10 days ago, so this integration
test can be enabled for Firefox too now that it passed with recent
Nightly versions.
2025-09-08 20:48:24 +02:00
Tim van der Meij
8bd13f7f25
Merge pull request #20172 from timvandermeij/misc-test-improvements
Improve the integration test code
2025-09-08 20:44:29 +02:00
Tim van der Meij
5382c54803
Merge pull request #20243 from mozilla/dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-09-08 20:43:01 +02:00
Tim van der Meij
7e3417f862
Merge pull request #20242 from mozilla/dependabot/github_actions/actions/setup-python-6
Bump actions/setup-python from 5 to 6
2025-09-08 20:42:35 +02:00
Calixte Denizet
f5c913bc9e [Editor] Make sure the comment button is at the right place when adding it in the toolbar 2025-09-08 17:59:28 +02:00
Calixte Denizet
94d72e903f [Editor] Add the dates and rich text if any to the editors in order to use them when displaying the popup 2025-09-08 17:40:47 +02:00
Calixte Denizet
54351ee437 [Editor] When clicking on a comment in the sidebar, wait for the annotation editor layer to be rendered
and add a getter for the layer bounding rect.
2025-09-08 17:13:37 +02:00
Calixte Denizet
2d5794f79d [Editor] Fix saving a deleted popup 2025-09-08 15:36:41 +02:00
dependabot[bot]
f9be06a8c1
Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 12:31:52 +00:00
dependabot[bot]
a5ef8ca828
Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 12:26:36 +00:00
calixteman
d946de904c
Merge pull request #20238 from timvandermeij/fix-freetext-permafail
Fix the rendering of XFA rich text in popup annotations
2025-09-07 20:59:36 +02:00
Tim van der Meij
f1f8ee47ff
Fix the rendering of XFA rich text in popup annotations
Before the introduction of the `renderRichText` helper function we
exclusively used `this.#html` for XFA rich text and exclusively used
`this.#contentsObj` for plain text. However, after the refactoring we
tried to access `this.#contentsObj.dir` in both cases, which fails for
XFA rich text because `this.#contentsObj` is `null` in that case.

This commit fixes the issue by using optional chaining to make sure we
don't try to access non-existent `this.#contentsObj` properties, which
makes the `must update an existing annotation and show the right popup`
freetext integration pass again.

Fixes #20237.
Fixes 35c90984.
2025-09-07 18:35:17 +02:00
Tim van der Meij
7f74fbf8fd
Fix block spacing inconsistencies in the integration test code
Most places have a newline before/after `before{Each,All}`,
`after{Each,All}` and `it` to visually separate the blocks for clarity,
but in a handful of places this wasn't done. This commit removes the
inconsistencies so that the test code is formatted consistently.
2025-09-07 14:39:52 +02:00
Tim van der Meij
cf5bffef2e
Use the getAnnotationSelector helper function more in the integration test code
The helper function was used in a number of places, but also a lot of
places contained the annotation selector string inline. This commit
makes sure that all places use `getAnnotationSelector` consistently to
make sure the annotation selector string is only defined in a single
place and to improve readability of the test code.
2025-09-07 14:39:52 +02:00
Tim van der Meij
c09ad5a2ce
Use the closePages helper function more in the integration test code
This test called `closeSinglePage` manually at the end of the test,
which is inconsistent with all other tests that call `closePages` in an
`afterEach` block. This commit fixes the difference for consistency.
2025-09-07 14:39:48 +02:00
calixteman
2a93ade197
Merge pull request #20231 from calixteman/xfa_render_richtext
Add a new function renderRichText to be used in the annotation layer
2025-09-05 08:36:28 +02:00
Calixte Denizet
35c909843b Add a new function renderRichText to be used in the annotation layer
and which will be used in order to make the contents of the new popup used for comments.
2025-09-04 22:27:31 +02:00
calixteman
7b87c220a5
Merge pull request #20233 from calixteman/dont_add_image_stamp_update
[Editor] Don't save the image when updating a stamp annotation
2025-09-04 22:19:36 +02:00
Tim van der Meij
84e32964ed
Merge pull request #20221 from calixteman/button_color_comment
[Editor] Use the color of the annotation for the background of the comment button
2025-09-04 21:27:07 +02:00
Calixte Denizet
2354ae4233 [Editor] Don't save the image when updating a stamp annotation
It adds some useless bytes in the file.
2025-09-04 18:54:13 +02:00
maettuu
2d8dfb0b62 Add regression test for Unicode mapping
Verifies that ToUnicodeMap correctly maps Extension B characters to their full Unicode code points using codePointAt

See PR https://github.com/mozilla/pdf.js/pull/19184
2025-09-04 17:17:34 +02:00
Calixte Denizet
ca280399c2 [Editor] Use the color of the annotation for the background of the comment button 2025-09-02 21:17:08 +02:00
Tim van der Meij
c386d9b87d
Merge pull request #20222 from calixteman/sidebar_scroll
[Editor] Make scrollable the area containing the comments in the sidebar
2025-09-01 20:28:35 +02:00
Calixte Denizet
dd4b475109 [Editor] Make scrollable the area containing the comments in the sidebar 2025-08-31 23:21:19 +02:00
calixteman
c8d49db624
Merge pull request #20217 from calixteman/comment_editor_sidebar
[Editor] Add editors with a comment in the sidebar
2025-08-31 21:48:52 +02:00
Calixte Denizet
2a459857ce [Editor] Add editors with a comment in the sidebar
and add a button close to the editor.
Clicking on the button will display a popup with the comment but it's for a next patch.
2025-08-31 19:59:16 +02:00
Tim van der Meij
9855d85fb5
Merge pull request #20220 from timvandermeij/editor-hint-bugfix
[Editor] Hide the comment sidebar on document change
2025-08-31 18:56:27 +02:00
Tim van der Meij
5a7c872618
[Editor] Hide the comment sidebar on document change
If the document changes the comment state from the old document should
be replaced with that of the new document. To do this the comment
manager is destroyed, but the corresponding comment sidebar wasn't
destroyed yet, which resulted in the comment state from the old document
still being visible for the new document.

This commit fixes the issue by hiding the comment sidebar if the comment
manager is destroyed. Note that hiding the comment sidebar effectively
destroys all its state, and we already set the annotation mode to "none"
on document change so we don't want to keep showing the comment sidebar
anyway.
2025-08-31 16:26:03 +02:00
calixteman
c96fa68c9d
Merge pull request #20204 from calixteman/add_changelightness
Add a function changeLightness in order to change the lightness of a RGB color
2025-08-30 21:40:31 +02:00
Calixte Denizet
0ec503e5ef Add a function changeLightness in order to change the lightness of a RGB color 2025-08-30 21:18:12 +02:00
Tim van der Meij
c2699a941e
Merge pull request #20216 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2025-08-30 20:01:51 +02:00
Tim van der Meij
cac052c0be
Update translations to the most recent versions 2025-08-30 18:39:19 +02:00
Tim van der Meij
4dcfc96703
Update dependencies to the most recent versions 2025-08-30 18:38:25 +02:00
Tim van der Meij
f110e57512
Merge pull request #20215 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2025-08-30 17:52:18 +02:00
Tim van der Meij
a5456033ce
Bump the stable version in pdfjs.config 2025-08-30 17:49:19 +02:00
calixteman
9e2e9e2096
Merge pull request #20210 from calixteman/comment_sidebar
[Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567)
v5.4.149
2025-08-30 14:19:04 +02:00
Tim van der Meij
a2d4b259c5
Merge pull request #20212 from calixteman/reset_mode
Reset editing mode when changing the pdf document
2025-08-29 20:45:21 +02:00
Calixte Denizet
25990e4287 [Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567)
This implements what has been specified but it's still not done: we have to handle editing a comment
or an annotation containing one.
2025-08-29 16:00:06 +02:00
Calixte Denizet
3e01ee9bb7 Reset editing mode when changing the pdf document 2025-08-28 22:38:05 +02:00
Tim van der Meij
13ba311e5a
Merge pull request #20211 from calixteman/fix_css_unit
[Editor] Fix unit (for consistency) and remove few useless px
2025-08-28 20:37:18 +02:00
Tim van der Meij
53c37547f0
Merge pull request #20209 from calixteman/fix_comment_icon
[Editor] Fix the dimensions of the comment icon
2025-08-28 20:33:31 +02:00
Calixte Denizet
0a4817fb71 [Editor] Fix unit (for consistency) and remove few useless px 2025-08-28 16:09:58 +02:00
Calixte Denizet
1876013e4e [Editor] Fix the dimensions of the comment icon 2025-08-27 16:01:29 +02:00
calixteman
e37a58f978
Merge pull request #20200 from calixteman/remove_useless_css2
[Editor] Remove useless CSS and fix styling for the comment button
2025-08-26 22:10:11 +02:00
Calixte Denizet
e44e470eb2 [Editor] Remove useless CSS and fix styling for the comment button 2025-08-26 22:06:49 +02:00
Tim van der Meij
d8c01bf70d
Merge pull request #20196 from calixteman/xy_getter
[Editor] Add a method to get an editor rect in the pdf page coordinates
2025-08-26 20:27:06 +02:00
Calixte Denizet
1fc039e14f [Editor] Add a method to get an editor rect in the pdf page coordinates 2025-08-26 19:40:41 +02:00
Tim van der Meij
bde01f0998
Merge pull request #20195 from timvandermeij/fix-chrome-windows
Skip the curvature ink editor integration test for Chrome on Windows
2025-08-25 21:35:13 +02:00
Tim van der Meij
11d5d6d0ce
Skip the curvature ink editor integration test for Chrome on Windows
This test permafails for that particular OS/browser combination.

Fixes 18d3dc18.
2025-08-25 20:09:32 +02:00