4214 Commits

Author SHA1 Message Date
Edoardo Cavazza
a932a063ea Revert unwanted change 2025-10-29 17:34:34 +01:00
Edoardo Cavazza
17cdd9b1e7 Move tables test to specific struct tree spec file 2025-10-29 17:33:36 +01:00
Edoardo Cavazza
d04832a82f Add test case for empty cells 2025-10-29 17:31:49 +01:00
Coelacanthus
6590063614
Add the font PT Astra Serif as a possible substitution for Times New Roman
Metric-compatible font with Times New Roman created by ParaType, based on
their serif font PT Serif, released under OFL-1.1 license.

https://www.paratype.com/fonts/pt/pt-astra-serif

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>
2025-10-29 17:15:31 +08:00
calixteman
520363b350
Merge pull request #20384 from calixteman/bug1937438
Make MathML elements visible in the struct tree (bug 1937438)
2025-10-23 17:55:42 +02: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
1a8689b9be
Merge pull request #20340 from Aditi-1400/serialize-pattern-ab
Serialize pattern data into ArrayBuffer
2025-10-22 11:05:22 +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
Aditi
fa631806bf Serialize pattern data into ArrayBuffer
Follow up on https://github.com/mozilla/pdf.js/pull/20197,
This serializes pattern data into an ArrayBuffer which is
then transferred from the worker to the main thread.

It sets up the stage for us to eventually switch to a
SharedArrayBuffer in the future.
2025-10-11 01:58:07 +05:30
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
Calixte Denizet
be987f2fbf [Editor] Make sure that comment stuff is removed when an editor is deleted (bug 1992987) 2025-10-07 19:09:48 +02:00
Tim van der Meij
f4104326f3
Merge pull request #20338 from calixteman/test_date_tz
Add a test for PR #20320
2025-10-05 20:24:02 +02:00
Calixte Denizet
25ce14042f Add a test for PR #20320 2025-10-05 19:38:37 +02:00
Calixte Denizet
19ff148163 Fix incremental saving with hybrid references
This patch removes some previous fixes which are now likely fixed by #17636.

Fixes #20302.
2025-10-04 18:31:55 +02:00
Calixte Denizet
4d15bfec0d Only apply word spacing when there is a 0x20 in the text chunk
Fixes #20319.
2025-10-03 22:18:02 +02:00
Calixte Denizet
17993a0c5d Fix the creation of the annotation layer in the ref tests 2025-10-02 20:27:29 +02:00
calixteman
9d917b2896
Merge pull request #20323 from calixteman/bug1991482
Increase the rendering quality of the detail view (bug 1991482)
2025-10-01 19:29:17 +02:00
Calixte Denizet
91e2f6c400 Increase the rendering quality of the detail view (bug 1991482)
But keep a lower quality when enableOptimizedPartialRendering is true because we need to compensate the time
used to compute the bboxes and since subsequent rendering are faster it's more acceptable to see
a lower quality image for few tenths of seconds.
2025-10-01 16:40:41 +02:00
Calixte Denizet
bb556dcb5c [Editor] Add the possibility to unselect a comment from the sidebar 2025-10-01 14:36:12 +02:00
Calixte Denizet
12066af578 [Editor] Add a fake annotation (in the annotation layer) associated with an editor in order to be able to show the comment button (bug 1989420) 2025-10-01 09:08:57 +02:00
Calixte Denizet
7fc7b79cd0 [Annotation] In reading mode with new commment stuff enabled, use the comment popup for annotations without a popup but with some contents (bug 1991029) 2025-09-26 18:24:55 +02:00
Calixte Denizet
f547e834e1 [Editor] Give the focus to the comment button after editing in reading mode 2025-09-26 17:18:37 +02:00
calixteman
28fb4f0f47
Merge pull request #20310 from calixteman/bug1990762
[Editor] Show the comments in the sidebar in the chronological order,newest to oldest (bug 1990762)
2025-09-26 11:09:27 +02:00
Calixte Denizet
f854770806 [Editor] Show the comments in the sidebar in the chronological order, newest to oldest (bug 1990762) 2025-09-26 10:10:43 +02:00
calixteman
7051fd0215
Merge pull request #20307 from calixteman/bug1990872
[Editor] Make sure the selected editor is correctly focused after switching editing mode (bug 1990872)
2025-09-26 09:17:48 +02:00
Calixte Denizet
888df7c319 [Editor] Make sure the selected editor is correctly focused after switching editing mode (bug 1990872) 2025-09-25 22:42:32 +02:00
Calixte Denizet
442932f0b3 [Editor] Move the focus to the comment button once editing is done (bug 1990820) 2025-09-25 20:17:52 +02:00
Calixte Denizet
90e56b706e [Editor] Add a title to the comment buttons (bug 1990813) 2025-09-25 18:47:49 +02:00
Calixte Denizet
a372294ea3 [Editor] Make the comment sidebar resizable (bug 1990544) 2025-09-25 15:29:41 +02:00
Calixte Denizet
0b40bf1743 [Editor] Update the color and the position of the comment button in reading mode they've been modified 2025-09-24 09:45:37 +02:00
calixteman
225b07aa29
Merge pull request #20283 from calixteman/bug1989304
[Editor] Make sure the comment dialog is visible on the screen (bug 1989304)
2025-09-23 19:30:28 +02:00
calixteman
44affa76b9
Merge pull request #20197 from ryzokuken/sab-font-data
Serialize font data into an ArrayBuffer
2025-09-22 09:40:14 +02:00
Ujjwal Sharma
4bed7370f4 [WIP] Serialize font data into an ArrayBuffer
This PR serializes font data into an ArrayBuffer
that is then transfered from the worker to the
main thread. It's more efficient than the current
solution which clones the "export data" object
which includes the font data as a Uint8Array.

It prepares us to switch to a SharedArrayBuffer
in the future, which would allow us to share
the font data with multiple agents, which would be
crucial for the upcoming "renderer" worker.
2025-09-19 12:02:40 +05:30
Calixte Denizet
623d422ddb [Editor] Make sure the comment dialog is visible on the screen (bug 1989304) 2025-09-18 21:23:42 +02:00
Calixte Denizet
cbc5241b53 [Editor] Make sure to not add extra editors when showing again a destroyed page 2025-09-18 15:18:50 +02:00
calixteman
adf9233f46
Merge pull request #20270 from calixteman/issue20232
Consider a ttf font with both Symbolic and Nonsymbolic flags set with a Differences array in the encoding dict as non-symbolic
2025-09-14 21:37:58 +02:00