600 Commits

Author SHA1 Message Date
Calixte Denizet
ea993bfc1b
Let the toggle button in the alt-text dialog downloading (resp. delete) the model and enabling (resp. disabling) alt-text guessing (bug 2014167) 2026-02-03 20:27:06 +01:00
Jonas Jenwald
1370950843 Remove unnecessary IIFEs when setting the compatParams
This really isn't necessary, and it's just a left-over from before the code was moved into the current file.

Also, spotted during rebasing, use the existing "locale" hash-parameter in integration-tests rather than adding a duplicate one for testing.
2026-01-30 13:31:16 +01:00
Calixte Denizet
dd6a0c6cf4
Add a manage button in the thumbnail view in order to save an edited pdf (bug 2010830) 2026-01-26 18:09:07 +01:00
Calixte Denizet
806133379e
Refactor a bit page mapping stuff in order to be able to support delete/copy pages 2026-01-26 16:53:52 +01:00
calixteman
48df8a5ea2
Merge pull request #20586 from marco-c/commentundo
Bug 1999154 - Add the ability to undo comment deletion
2026-01-26 15:52:15 +01:00
Calixte Denizet
f2ac669ee4
Fix the drag marker dimensions in the thumbnails view
STR:
 - open outline view;
 - switch to thumbnails one;
 - start to drag a thumbnail.
2026-01-25 21:49:17 +01:00
Marco Castelluccio
bfdcaadf7c
Use kbUndo when possible 2026-01-22 13:12:38 +01:00
Marco Castelluccio
bdc9323b15
Hide comment popup after redo action 2026-01-22 13:12:13 +01:00
Marco Castelluccio
84d15dc453
Restore date too 2026-01-21 17:06:13 +01:00
Marco Castelluccio
d9f67bd8ee
Bug 1999154 - Add the ability to undo comment deletion 2026-01-21 15:15:40 +01:00
Calixte Denizet
43bd7fa738
Fix links and outline after reorganizing a pdf 2026-01-19 17:38:17 +01:00
calixteman
8abfd9a797
Avoid exception after having moved an annotation
It fixes #20571.
2026-01-18 21:01:40 +01:00
Calixte Denizet
3a20ea75b9
The 'find in page' feature must correctly work after the pages have been reorganized (bug 2010814) 2026-01-18 20:54:15 +01:00
Calixte Denizet
eb014a36cc
Select the dropped thumbnail (bug 2010820) 2026-01-16 19:54:14 +01:00
Calixte Denizet
5e89981282
Add the possibility to drag & drop some thumbnails in the pages view
The goal is to be able to reorganize the pages in a pdf.
2026-01-14 21:04:38 +01:00
Calixte Denizet
cffd54e9c6
Hide the text in the text layer associated with MathML elements (bug 2009627)
The bug was supposed to be fixed by #20471 but here there are some annotations in the pdf.
When those annotations are added to the DOM, the struct tree has to be rendered but without
the text layer (because of asynchronicity).
So this patch is making sure that the modifications in the text layer are done once the
layer is rendered.
2026-01-13 20:37:52 +01:00
Calixte Denizet
da463f2da9
Don't add an aria-label on MathML elements in the struct tree (bug 2004951) 2026-01-06 21:38:42 +01:00
Calixte Denizet
0ef085e23b
Aria-hide artifacts in the text layer (bug 2004951) 2026-01-05 16:57:01 +01:00
Tim van der Meij
71140e7d0f
Introduce a helper function to draw a line in the ink editor integration tests
This commit extracts the logic to draw a line from one coordinate to
another to both remove code duplication (8% of the total number of lines
in the file are removed) and clarify the intent of the individual tests.
2025-12-22 19:41:39 +01:00
calixteman
2367196a00
Change the sidebar for a views manager
Update the styles and HTML to reflect the new views manager concept.
For now, nothing about split/merge functionality is implemented or visible.
The new styles for the outline, attachments, and layers will be added later.

The thumbnail view is now accessible with the keyboard.
2025-12-15 17:43:52 +01:00
Tim van der Meij
8b4fae0a84
Merge pull request #20482 from Uzair-Ahmed-Shah/fix-issue-20420
Fix #20420: Prevent double decoding of file URL parameter
2025-12-13 14:22:47 +01:00
Uzair-Ahmed-Shah
a25448502d Fix #20420: Prevent double decoding of file URL parameter 2025-12-08 22:37:52 +05:30
calixteman
36de2d976d
Merge pull request #20476 from calixteman/thumbnail_scroll
Use HTMLElement.scrollIntoView when showing a thumbnail
2025-12-05 09:59:11 +01:00
calixteman
79c72f2c9a
Inject the text from the text layer in the MathML tags when they're in the struct tree (bug 1998046)
This way, the screen readers can read the math content properly.
The elements in the text layer will also have aria-hidden="true"
to avoid duplication.
2025-12-04 22:13:26 +01:00
Calixte Denizet
f9b857463b
Use HTMLElement.scrollIntoView when showing a thumbnail 2025-12-03 15:51:34 +01:00
calixteman
87b3b5212e
Aria-hide the text content part of a MathML formula (bug 1998046)
It'll avoid to have the text content and the MathML content read by
screen readers.
2025-11-30 22:21:37 +01:00
Calixte Denizet
423379e42f
Slightly reduce the memory used by thumbnails
In using a blob instead of a base64 string it's possible to reduce the memory.
And simplify a bit the thumbnails themselves.
2025-11-28 21:52:40 +01:00
calixteman
925fc3d8f2
Merge pull request #20467 from calixteman/make_sidebar
Create a sidebar object
2025-11-28 16:27:44 +01:00
Calixte Denizet
45578aa8f5
Create a sidebar object
For now its use is limited to the comment sidebar but it'll be used for the new one
containing the thumbnails.
And make the sidebar more accessible with the keyboard or a screen reader.
2025-11-28 16:22:26 +01:00
Calixte Denizet
b6fcb523c5
[Editor] Allow to save an edited comment in using CTRL+Enter shortcut. 2025-11-24 20:20:31 +01:00
Sachin Iyer
464dae11ac fix: deleteAnnotationElement takes a full editor object 2025-11-21 11:32:29 -08:00
Tim van der Meij
b5b821365e
Introduce a helper function to create a freetext editor in the integration tests
Doing so has a number of advantages:

- it removes code duplication, thereby improving readability;
- it removes hardcoded editor IDs, by using the `getNextEditorId` helper
  function that was previously introduced for the highlight editor
  integration tests, thereby improving readability and reusability;
- it removes potential for intermittent failures by not proceeding until
  the freetext editor is fully created and all assertions pass, which
  didn't happen consistently before because the code wasn't centralized.
2025-11-09 14:32:24 +01:00
Calixte Denizet
6db23139be Don't set the MathML namespace for attributes in MathML tags (bug 1997343)
And by default a XML file is UTF-8 encoded so correctly decode the embedded file.
2025-10-30 18:37:19 +01:00
Calixte Denizet
e5a62c8d06 Make MathML elements visible in the struct tree (bug 1937438)
It'll help to make math equations "visible" for screen readers.
MS Office has a specific way to add some MathML code to struc tree leaf
and this patch handles it.
2025-10-23 16:29:01 +02:00
calixteman
9f397a632c
Merge pull request #20378 from timvandermeij/integration-tests-aboutstacks
Don't use the `aboutstacks.pdf` file in the integration tests
2025-10-19 20:40:10 +02:00
calixteman
a40df9a5be
Merge pull request #20380 from timvandermeij/integration-tests-tweak-viewer-scroll
Tweak the "scroll into view" viewer integration test
2025-10-19 20:37:30 +02:00
Calixte Denizet
9205305dbb Add a highlightSpan function in order to simplify a bit the integration tests 2025-10-19 19:37:41 +02:00
Tim van der Meij
4fd3bad67f
Tweak the "scroll into view" viewer integration test
On GitHub Actions this test could fail with `Expected 1.3125 to be less
than 1` due to slight differences in the decimals of the `rect.y` value.
However, for this check we're only really interested in full pixels, so
this commit rounds the value up to the next integer to not be affected
by small decimal differences so the test passes on GitHub Actions too.
2025-10-19 17:33:11 +02:00
Tim van der Meij
9ab4de5c04
Don't use the aboutstacks.pdf file in the integration tests
For the integration tests we prefer non-linked test cases because those
PDF files are directly checked into the Git repository and thus don't
need a separate download step that linked test cases do.

However, for the freetext and ink integration tests we currently use
`aboutstacks.pdf` which is a linked test case. Fortunately we don't need
to use it because for most tests we don't actually use any properties of
it: we only create editors on top of the canvas, but for that any PDF
file works, so we can simply use the non-linked `empty.pdf` file instead.

The only exception is the "aria-owns" test that needs a line of text from
the PDF file, so we move that particular test to a dedicated `describe`
block and adapt it to use the non-linked `attachment.pdf` file that just
contains a single line of text that can be used for this purpose.

The changes combined make 12 more integration tests run out-of-the-box
after a Git clone, which also simplifies running on GitHub Actions.
2025-10-19 13:05:46 +02:00
Tim van der Meij
b2810513c9
Merge pull request #20377 from calixteman/fix_integration_test1
[Editor] Fix integration test after #20372
2025-10-18 13:43:25 +02:00
Tim van der Meij
bd0bf03a68
Merge pull request #20375 from calixteman/fix_color_copy_paste
[Editor] Make sure the color picker has the right color when pasting an editor
2025-10-17 21:05:44 +02:00
Calixte Denizet
c2535b32fe [Editor] Fix integration test after #20372 2025-10-17 20:44:02 +02:00
Calixte Denizet
97fec3ab81 [Editor] Make sure the color picker has the right color when pasting an editor 2025-10-17 19:37:05 +02:00
Calixte Denizet
18a7a82c29 [Editor] FreeText annotations aren't supposed to have an attached popup so disable commenting for them (bug 1995028) 2025-10-17 18:33:15 +02:00
Calixte Denizet
fd3f7528b6 [Editor] Correctly focus the annotation once the comment has been removed in the annotation layer (bug 1994738) 2025-10-16 16:12:36 +02:00
Calixte Denizet
f5a6dd4164 [Annotation] Use the annotations rect in order to fix the order in the DOM (bug 1987914)
It's just a partial fix for bug 1987914 but the time spent to add the annotations in the DOM
is divided by 5.
2025-10-09 17:43:49 +02:00
Calixte Denizet
41dea1e38b [Editor] Make sure that annotation positions in the DOM respect the visual order (bug 1992770) 2025-10-08 15:11:09 +02:00
calixteman
d83cbb28a9
Merge pull request #20341 from calixteman/bug1992868
[Editor] Make sure all editors are focusable with the keyboard (bug 1992868)
2025-10-07 22:34:10 +02:00
Calixte Denizet
76e0de6c08 [Editor] Make sure the editor is focused after the comment has been deleted (bug 1992832) 2025-10-07 21:31:09 +02:00
Calixte Denizet
5c28346abc [Editor] Make sure all editors are focusable with the keyboard (bug 1992868) 2025-10-07 21:15:26 +02:00