Jonas Jenwald
998184a00e
Remove the no-confusing-arrow
ESLint rule since it's deprecated
...
Please see https://eslint.org/docs/latest/rules/no-confusing-arrow
2024-01-21 15:45:28 +01:00
Jonas Jenwald
9dfe9c552c
Use shorter arrow functions where possible
...
For arrow functions that are both simple and short, we can avoid using explicit `return` to shorten them even further without hurting readability.
For the `gulp mozcentral` build-target this reduces the overall size of the output by just under 1 kilo-byte (which isn't a lot but still can't hurt).
2024-01-21 10:13:12 +01:00
calixteman
6e46304357
Merge pull request #17539 from calixteman/color_picker_kb
...
[Editor] Don't add the keyboard listener on the color-picker each time the dropdown menu is shown
2024-01-20 22:24:37 +01:00
Calixte Denizet
0cca9a0240
[Editor] Don't add the keyboard listener on the color-picker each time the dropdown menu is shown
...
and display/hide the dropdown menu when pressing arrow keys.
2024-01-20 21:57:54 +01:00
calixteman
f24246150e
Merge pull request #17541 from calixteman/issue17540
...
Use the original value of a field when propagating event (fixes #17540 )
2024-01-20 21:51:37 +01:00
calixteman
03aa8a12d2
Merge pull request #17543 from calixteman/bug1869767
...
[Editor] Unselect highlights when the user click on the text layer (bug 1869767)
2024-01-20 21:50:19 +01:00
Tim van der Meij
626674553d
Merge pull request #17547 from timvandermeij/remove-dns-resolver-workaround
...
Remove DNS resolver workaround from the test framework
2024-01-20 20:23:37 +01:00
Tim van der Meij
c70edbced7
Remove DNS resolver workaround from the test framework
...
The `if` statement is no longer necessary because the Node.js versions
that didn't provide `dns.setDefaultResultOrder` are no longer supported,
but looking into this a bit more it turns out that the entire workaround
is no longer necessary because the issue got fixed in Firefox 105 in bug
1769994. Indeed, Firefox now starts nicely with the workaround removed.
Reverts 60ed3cd297
.
2024-01-20 20:05:08 +01:00
Tim van der Meij
c9b1a8f761
Merge pull request #17546 from Snuffleupagus/git-blame-ignore
...
Ignore auto-formatting patches in `git blame`
2024-01-20 14:04:55 +01:00
Tim van der Meij
9b0b099713
Merge pull request #17544 from Snuffleupagus/update-packages
...
Update packages and translations
2024-01-20 14:03:52 +01:00
Jonas Jenwald
c9755bdbc8
Ignore auto-formatting patches in git blame
...
When using Prettier to auto-format (parts of) the code-base you usually end up with *huge* patches that touch lots of lines without making any actual changes.
This often adds unnecessary steps when using `git blame`, however it's easy enough to avoid this; please refer to https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
2024-01-20 12:01:23 +01:00
Jonas Jenwald
2dd6910aa4
Update l10n files
2024-01-20 09:54:21 +01:00
Jonas Jenwald
a5a9357e15
Update npm packages
2024-01-20 09:52:57 +01:00
Calixte Denizet
5732c0c54a
Use the original value of a field when propagating event ( fixes #17540 )
...
And avoid to not format a field when the value is 0.
2024-01-19 22:13:51 +01:00
Calixte Denizet
f3b76f5ae2
[Editor] Unselect highlights when the user click on the text layer (bug 1869767)
2024-01-19 20:16:55 +01:00
Jonas Jenwald
f8e3c79cb5
Merge pull request #17537 from Snuffleupagus/rm-isArrayBuffer
...
Remove the `isArrayBuffer` helper function
2024-01-19 15:37:02 +01:00
calixteman
f6c4b29aa2
Merge pull request #17531 from calixteman/editor_free_highlight_print_save
...
[Editor] Add support for printing/saving free highlight annotations
2024-01-19 15:23:29 +01:00
calixteman
5d2e7cf3fc
Merge pull request #17533 from calixteman/caret_mode
...
Make the caret visible in the text layer in caret browsing mode
2024-01-19 15:22:08 +01:00
Jonas Jenwald
b37536c38c
Remove the isArrayBuffer
helper function
...
This old helper function can now be replaced with `ArrayBuffer.isView()` and/or `instanceof ArrayBuffer` checks, as needed depending on the situation.
2024-01-19 14:10:52 +01:00
calixteman
a0e2b62245
Merge pull request #17534 from calixteman/bug1875357
...
[Editor] Change the arrow direction when the dropdown is visible in the color picker (bug 1875357)
2024-01-19 13:08:12 +01:00
Calixte Denizet
a1bf12537c
[Editor] Change the arrow direction when the dropdown is visible in the color picker (bug 1875357)
...
and hide the dropdown when the user click outside of the color picker.
2024-01-19 13:02:11 +01:00
Calixte Denizet
d64f334f98
[Editor] Add support for printing/saving free highlight annotations
2024-01-19 12:58:46 +01:00
Calixte Denizet
83c78dbfa8
Make the caret visible in the text layer in caret browsing mode
...
In order to do that we must change the text layer opacity to 1 but
it has several implications:
- the selection color must have an alpha component,
- the background color of the span used for highlighted words
must have an alpha component either, but now the opacity is 1
we can use some backdrop-filters in HCM making the highlighted
words more visible.
- fix a regression caused by #17196 : the css variable --hcm-highlight-filter
has to live under the #viewer element because in HCM it's overwritten
by js at this level, hence links annotations for example didn't
have the right colors when hovered.
2024-01-18 19:44:21 +01:00
calixteman
1cdbcfef82
Merge pull request #17506 from calixteman/editor_free_highlight
...
[Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218)
2024-01-18 17:47:27 +01:00
Calixte Denizet
8fbfef0c07
[Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218)
...
The free highlighting is enabled when the mouse pointer isn't on some text.
Then we draw a shape with smoothed borders corresponding to the movement of
the mouse.
Printing/saving and changing the thickness will come later.
2024-01-18 16:26:04 +01:00
calixteman
a22b5a4f02
Merge pull request #17528 from calixteman/highlight_not_draggable
...
[Editor] Avoid to move a non-draggable editor with the keyboard
2024-01-16 22:27:14 +01:00
Jonas Jenwald
cb38882d74
Merge pull request #17529 from Snuffleupagus/skip-web-locale
...
Exclude the `web/locale/` folder from linting (PR 17525 follow-up)
2024-01-16 22:22:49 +01:00
Calixte Denizet
70a9d8f3bc
[Editor] Avoid to move a non-draggable editor with the keyboard
2024-01-16 21:41:52 +01:00
calixteman
9c377922ef
Merge pull request #17527 from calixteman/color_pick_exception
...
[Editor] Avoid an exception when pressing space key to change the color of an highlight
2024-01-16 21:13:56 +01:00
Jonas Jenwald
79594ff876
Exclude the web/locale/
folder from linting (PR 17525 follow-up)
...
Given that the contents of this folder is generated by `gulp locale` it's essentially build-output and thus shouldn't be included in linting.
2024-01-16 20:25:01 +01:00
calixteman
bf6cc83e7a
Merge pull request #17525 from calixteman/prettier_json
...
Format json files in using prettier
2024-01-16 20:16:56 +01:00
Calixte Denizet
a76cc40ab8
[Editor] Avoid an exception when pressing space key to change the color of an highlight
2024-01-16 20:00:23 +01:00
Calixte Denizet
29de9bdce6
Format json files in using prettier
2024-01-16 19:40:25 +01:00
calixteman
e7d782e887
Merge pull request #17405 from calixteman/libertine
...
Add the font Linux Libertine as a possible substitution for Times New Roman
2024-01-16 14:32:30 +01:00
Calixte Denizet
10389c5017
Add the font Linux Libertine as a possible substitution for Times New Roman
...
and try to load the font family (guessed from the font name) before trying
the local substitution.
The local(...) command expects to have a real font name and not a predefined
substitution it's why we try the font family.
2024-01-16 12:31:23 +01:00
calixteman
51413be5b6
Merge pull request #17519 from calixteman/editor_movable_touchscreen
...
[Editor] Make editors draggable with touchscreens
2024-01-16 10:47:38 +01:00
Calixte Denizet
b8aab5d14e
[Editor] Make editors draggable with touchscreens
2024-01-15 23:20:55 +01:00
calixteman
3110865484
Merge pull request #17517 from calixteman/editor_highlight_simplify_ser
...
[Editor] Slightly simplify the serialization of an highlight annotation
2024-01-15 18:50:37 +01:00
Calixte Denizet
ee72b32dc2
[Editor] Slightly simplify the serialization of an highlight annotation
...
We were computing width and height of the annotation before serializing
which is useless because the rect already contains this information.
2024-01-15 18:22:01 +01:00
calixteman
7769018316
Merge pull request #17514 from calixteman/issue17418
...
[Editor] Draw a line instead of a Bezier curve when an Ink has only one point
2024-01-15 14:23:04 +01:00
Calixte Denizet
e9946fa22a
[Editor] Draw a line instead of a Bezier curve when an Ink has only one point
...
Fixes #17418 .
2024-01-15 13:32:36 +01:00
calixteman
2ca20dea43
Merge pull request #17512 from calixteman/issue17492
...
Take into account empty lines when extracting text content from the appearance
2024-01-15 12:44:14 +01:00
calixteman
e98a813e09
Merge pull request #17511 from calixteman/issue17079
...
[Editor] Extract all the lines when adding a FreeText annotation
2024-01-15 10:40:49 +01:00
calixteman
d3b5f60995
Merge pull request #17513 from calixteman/update_l10n
...
Update l10n files
2024-01-15 10:18:46 +01:00
Calixte Denizet
7580770aac
Update l10n files
2024-01-14 21:18:58 +01:00
Calixte Denizet
9765d57a26
[Editor] Extract all the lines when adding a FreeText annotation
...
Fixes #17079 .
2024-01-14 21:11:51 +01:00
Calixte Denizet
405f573d70
Take into account empty lines when extracting text content from the appearance
...
Fixes #17492 .
2024-01-14 20:23:29 +01:00
Tim van der Meij
dc92ab850a
Merge pull request #17508 from Snuffleupagus/pr-14388-followup
...
Consistently remove the "visibilitychange" listener in `PDFViewer` (PR 14388 follow-up)
2024-01-14 16:21:29 +01:00
Tim van der Meij
704747b143
Merge pull request #17489 from nicolo-ribaudo/gulp-cli-dep
...
Update `gulp-cli` to 2.3.0 and explicitly add it as a dependency
2024-01-14 16:18:26 +01:00
Tim van der Meij
07cb42243c
Merge pull request #17507 from Snuffleupagus/version-4.1
...
Bump library version to `4.1`
2024-01-14 16:09:18 +01:00