Calixte Denizet
2dbd7acc41
[Editor] Correctly handle lines when pasting some text in a freetext
2024-03-27 17:48:43 +01:00
Calixte Denizet
d5a0e557c2
[Editor] Fix undoing an editor deletion (bug 1886959)
...
The original bug was because the parent was null when trying to show
an highlight annotation which led to an exception.
That led me to think about having some null/non-null parent when removing
an editor: it's a mess especially if a destroyed parent is still attached
to an editor. Consequently, this patch always sets the parent to null when
deleting the editor.
2024-03-25 14:17:40 +01:00
Calixte Denizet
a3873e4c68
Don't hide the editor layer when rotating (follow-up of #17802 )
...
Before the patch in #17802 , the layer was made visible when calling updateMode
after the rotation angle was set.
2024-03-19 18:36:55 +01:00
Calixte Denizet
1b00511301
[Editor] Make the text layer focusable before the editors (bug 1881746)
...
Keep the different layers in a constant order to avoid the use of a z-index
and a tab-index.
2024-03-19 16:14:55 +01:00
Calixte Denizet
5437199c95
[Editor] Fix the rect used to click in some freetext integration tests
...
And avoid to uselessly set the pointer listeners in the annotation editor layer.
2024-03-18 10:29:32 +01:00
Calixte Denizet
e1f6f5179f
[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)
2024-02-23 16:18:03 +01:00
Tim van der Meij
28418598e5
Update puppeteer
to version 22.0.0
...
This is a major version bump that requires two changes on our side:
- The new headless mode is now the default, so we can remove our
transformation code (see https://github.com/puppeteer/puppeteer/pull/11815 ).
- The `page.waitForTimeout` API is removed. Sadly we still used it in
the integration tests (but fortunately much less than before we worked
on fixing intermittent failures), so until we remove the final
occurrences we provide an implementation ourselves (see
https://github.com/puppeteer/puppeteer/pull/11780 ).
The full changelog can be found here:
https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.0.0
2024-02-10 19:05:36 +01:00
Calixte Denizet
d713df28c3
[Editor] Update the parameters in the UI of the last selected editor when undoing/redoing
2024-01-24 18:16:51 +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
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
7839e7b495
Preserve the whitespaces when getting text from FreeText annotations (bug 1871353)
...
When the text of an annotation is extracted in using getTextContent, consecutive white spaces
are just replaced by one space and. So this patch add an option to make sure that white
spaces are preserved when appearance is parsed.
For the case where there's no appearance, we can have a fast path to get the correct string
from the Content entry.
When an existing FreeText is edited, space (0x20) are replaced by non-breakable (0xa0) ones
to make to see all of them on screen.
2024-01-05 10:20:32 +01:00
Calixte Denizet
c63af10191
Use page.evaluateHandle when we want to await on document promises in integration tests
...
For reference: https://github.com/mozilla/pdf.js/pull/17378#issuecomment-1842864939
2023-12-07 17:00:12 +01:00
Henrik Skupin
9052327e07
Use "count" and not "clickCount" when calling page.mouse.click()
2023-11-30 09:40:57 +01:00
Calixte Denizet
2d42c04543
[Editor] Avoid to click on the delete button in the freetext integration tests
2023-11-11 20:47:05 +01:00
Calixte Denizet
334f0eb060
[Editor] Add a toolbar to selected editors with a button to delete it (bug 1863763)
2023-11-10 15:19:43 +01:00
Calixte Denizet
77475ac610
[Editor] Don't steal the keyboard events when editing mode is enabled
2023-10-30 10:03:44 +01:00
Calixte Denizet
d72fd9ce4f
Fix intermittents failure on mac
2023-10-27 16:10:06 +02:00
Calixte Denizet
517a262fb1
Fix keyboard shortcuts on mac and for some tests make sure that all
...
the page is displayed in using page-fit in order to make all tested
elements visible.
2023-10-27 16:09:35 +02:00
Jonas Jenwald
9878d058fe
Convert the integration
test-files to JavaScript modules
2023-10-12 13:18:20 +02:00
Jonas Jenwald
33456d3704
Rename the integration
test-files, in preparation for converting them to modules
...
This is done separately to ensure that Git is able to track the history correctly.
2023-10-12 13:17:56 +02:00