21401 Commits

Author SHA1 Message Date
Tim van der Meij
eec1bea1b4
[Editor] Don't use a null signal for the comment button
This removes the following error from the integration test logs:

```
JavaScript error: http://127.0.0.1:59283/build/generic/build/pdf.mjs, line 3879:
TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
```

Fixes 636ff50.
Extends 63651885.
2025-08-24 20:01:10 +02:00
Tim van der Meij
535a042b01
Merge pull request #20188 from timvandermeij/chrome-webdriverbidi
Use WebDriver BiDi for Chrome
2025-08-24 19:59:31 +02:00
Tim van der Meij
18d3dc18e0
Use WebDriver BiDi for Chrome 2025-08-24 15:58:52 +02:00
calixteman
592d6c070a
Merge pull request #20179 from calixteman/add_rect_popup
[Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf
2025-08-24 12:01:31 +02:00
calixteman
78f63dd6db
Merge pull request #20180 from calixteman/mv_comment_button
[Editor] Move the comment button just before the delete one
2025-08-24 12:00:29 +02:00
calixteman
cfe08bd035
Merge pull request #20184 from calixteman/use_cached_annotations
Use the cached annotations when collecting them by types
2025-08-24 11:57:17 +02:00
Tim van der Meij
8be21711a4
Merge pull request #20183 from calixteman/resizer_top_editor
[Editor] Make sure the resizers are on top of the editor content
2025-08-23 21:27:35 +02:00
calixteman
4e089f210a
Merge pull request #20186 from calixteman/puppeteer_switch_nightly
Use Firefox nightly with puppeteer
2025-08-23 15:36:21 +02:00
Calixte Denizet
22c0e25eb5 Use Firefox nightly with puppeteer 2025-08-22 22:02:34 +02:00
calixteman
673f19bc2b
Merge pull request #19043 from nicolo-ribaudo/compute-bounding-boxes
Add logic to track rendering area of various PDF ops
2025-08-22 20:34:03 +02:00
Nicolò Ribaudo
6a22da9c2e
Add logic to track rendering area of various PDF ops
This commit is a first step towards #6419, and it can also help with
first compute which ops can affect what is visible in that part of
the page.

This commit adds logic to track operations with their respective
bounding boxes. Only operations that actually cause something to
be rendered have a bounding box and dependencies.

Consider the following example:
```
0. setFillRGBColor
1. beginText
2. showText "Hello"
3. endText
4. constructPath [...] -> eoFill
```
here we have three rendering operations: the showText op (2) and the
path (4). (2) depends on (0), (1) and (3), while (4) only depends on
(0). Both (2) and (4) have a bounding box.

This tracking happens when first rendering a PDF: we then use the
recorded information to optimize future partial renderings of a PDF, so
that we can skip operations that do not affected the PDF area on the
canvas.

All this logic only runs when the new `enableOptimizedPartialRendering`
preference, disabled by default, is enabled.

The bounding boxes and dependencies are also shown in the pdfBug
stepper. When hovering over a step now:
- it highlights the steps that they depend on
- it highlights on the PDF itself the bounding box
2025-08-22 18:26:59 +02:00
Calixte Denizet
ebc3411727 Use the cached annotations when collecting them by types 2025-08-21 18:04:00 +02:00
Calixte Denizet
0c6cf84274 [Editor] Make sure the resizers are on top of the editor content 2025-08-21 09:10:57 +02:00
Calixte Denizet
f8466c9ff8 [Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf 2025-08-20 17:56:50 +02:00
Calixte Denizet
f8ea63606c [Editor] Move the comment button just before the delete one 2025-08-20 17:18:38 +02:00
calixteman
e20ee99580
Merge pull request #20178 from calixteman/pinpoint_firefox
Use Firefox stable for the tests because bug 1983414
2025-08-20 17:04:08 +02:00
Calixte Denizet
2beb26ad14 Use Firefox stable for the tests because bug 1983414 2025-08-20 16:11:59 +02:00
calixteman
212547e865
Merge pull request #20169 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2025-08-19 10:41:27 +02:00
calixteman
65dd6b05a9
Merge pull request #20167 from calixteman/get_all_editable_annotations
[Editor] Add the ability to get all the editable annotations in a pdf document
2025-08-19 10:39:48 +02:00
Calixte Denizet
9e5ee1e5a7 [Editor] Add the ability to get all the editable annotations in a pdf document
We want to be able to show all the comments in a pdf even if the pages where they are
haven't been rendered.
And it'll help to fix the issue #18915.
2025-08-18 21:31:11 +02:00
Tim van der Meij
13de21841d
Update translations to the most recent versions 2025-08-17 16:32:29 +02:00
Tim van der Meij
d49fc494cd
Update dependencies to the most recent versions 2025-08-17 16:32:29 +02:00
Tim van der Meij
dd560ee453
Merge pull request #20171 from timvandermeij/firefox-test-prefs
Update Firefox preferences for testing
2025-08-17 16:31:16 +02:00
Tim van der Meij
844681a2fa
Disable AI/ML features using Firefox preferences for testing
We don't need AI/ML features in the tests, so this should reduce CPU
usage by not having the inference process running. Moreover, it prevents
the following lines from being logged in the test output:

```
JavaScript error: resource://gre/actors/MLEngineParent.sys.mjs, line 509: Error: Unable to get the ML engine from Remote Settings.
JavaScript error: resource://gre/actors/MLEngineParent.sys.mjs, line 1279: TypeError: can't access property "postMessage", this[#port] is null
```
2025-08-17 16:05:04 +02:00
Tim van der Meij
a05dc9c1c5
Remove obsolete Firefox preferences for testing
The following preferences don't have to be set manually anymore:

- `print.show_print_progress`
  - Why: removed
  - Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1770536
  - Commit: b522664310

- `gfx.offscreencanvas.enabled`
  - Why: removed
  - Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1914083
  - Commit: 7d2c688920

- `layout.css.round.enabled`
  - Why: removed
  - Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1874633
  - Commit: 97909653e7

- `dom.events.asyncClipboard.clipboardItem`
  - Why: enabled by default
  - Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1887845
  - Commit: de56ae88bf
2025-08-17 14:53:35 +02:00
Tim van der Meij
5adff6a2e2
Merge pull request #20126 from timvandermeij/fix-intermittents-chrome
Implement a delay for Chrome protocol calls in the integration tests, and skip the "must check that an existing highlight is ignored on hovering" integration test on Windows
2025-08-15 19:34:13 +02:00
Tim van der Meij
17dc9e9917
Skip the "must check that an existing highlight is ignored on hovering" integration test on Windows
This is a temporary measure to reduce noise until #20136 is fixed. Note
that this shouldn't be an issue in terms of coverage because we still
run the test on Linux.
2025-08-14 20:54:41 +02:00
Tim van der Meij
7294377cd9
Implement a delay for Chrome protocol calls in the integration tests
In Chrome protocol calls are faster than in Firefox and thus trigger in
quicker succession. This can cause intermittent failures because new
protocol calls can run before events triggered by the previous protocol
calls had a chance to be processed (essentially causing events to get
lost).

This commit fixes the issue by configuring Chrome with a protocol call
delay value that gives it a more similar execution speed as Firefox
(which also gives us more consistency between the two browser runs).

Note that this doesn't negatively impact the overall runtime of the
integration tests because Puppeteer already waits for a test to complete
in both browsers before continuing to the next one and Chrome
consistently was, and with this patch still slightly is, faster in
completing the tests.
2025-08-14 20:54:37 +02:00
Tim van der Meij
c6bd044438
Merge pull request #20164 from calixteman/editor_hide_deleted_annotation
[Editor] Correctly hide deleted annotations
2025-08-14 20:39:39 +02:00
Tim van der Meij
5951485b98
Merge pull request #20166 from calixteman/fix_signal_integration_test
[Editor] Avoid to use a null signal when setting listeners in the editor toolbar
2025-08-14 20:32:49 +02:00
Calixte Denizet
6365188535 [Editor] Avoid to use a null signal when setting listeners in the editor toolbar
It should fix the error:
```
JavaScript error: http://127.0.0.1:43303/build/generic/build/pdf.mjs, line 1445:
TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
```

we've when running integration tests on the Linux bot.
2025-08-14 15:07:22 +02:00
Calixte Denizet
6a00174688 [Editor] Correctly hide deleted annotations 2025-08-13 22:41:19 +02:00
Tim van der Meij
7ea7a94ed5
Merge pull request #20160 from calixteman/issue20155
Check the setDash arguments
2025-08-12 20:48:44 +02:00
Tim van der Meij
32ea986c9b
Merge pull request #20161 from mozilla/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-12 20:02:18 +02:00
dependabot[bot]
e38fb68724
Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 17:13:51 +00:00
Tim van der Meij
1bada43a22
Merge pull request #20159 from calixteman/update_l10n_1
Update l10n files
2025-08-10 11:15:19 +02:00
Calixte Denizet
1d4ae786f4 Check the setDash arguments
It fixes #20155.
2025-08-09 22:34:44 +02:00
Calixte Denizet
02635814a2 Update l10n files 2025-08-08 14:46:17 +02:00
calixteman
41ca92b2ea
Merge pull request #20149 from k-nut/patch-1
Mark `canvasContext` as optional
2025-08-07 22:38:32 +02:00
Knut Hühne
760c8d632c
Mark canvasContext as optional
In #20016, the `canvasContext` property of `RenderParameters` was deprecated in favor of the new `canvas` property.

The JSDoc was updated to include the new parameter along with the old one.

I think the old one should be enclosed in `[]` to mark it as optional (and to allow usage from TypeScript with just the `canvas` parameter provided).

I also reordered the properties so that all required properties come first, follow by optional ones.
2025-08-06 12:38:30 +02:00
calixteman
fcf69d8536
Merge pull request #20093 from Aditi-1400/fix-horizontal-scroll
Make horizontal padding relative to device width
2025-08-06 11:44:55 +02:00
calixteman
d41f144716
Merge pull request #20148 from fnlctrl/icc-lazy-finalization-registry
Lazy initialize FinalizationRegistry used by IccColorSpace.#finalizer
2025-08-06 11:24:40 +02:00
宋铄运 (Alan Song)
3d9374e02e lazy initialize IccColorSpace.#finalizer 2025-08-05 22:29:32 +00:00
Aditi
9babc144a7 Make horizontal padding relative to device width
The fixed -400px horizontal offset used by
scrollIntoView led to horizontal scroll only moving
part-way right on narrow screens. The highlights near
the right-edge remained party or completely off
screen.

This centres the highlighted match on any viewport width while
clamping the left margin to 20-400px. On very narrow screens
the scrollbar now moves all the way to the right instead of
stopping midway.
2025-08-04 15:29:52 +05:30
Tim van der Meij
e9a483014d
Merge pull request #20142 from calixteman/bug1957680
Trigger a fake scrollend event in case it hasn't been triggered by the browser (bug 1957680)
2025-08-03 16:03:39 +02:00
Tim van der Meij
17527d84f8
Merge pull request #20138 from calixteman/bug1976597
[Editor] Highlight text on a selectionchange event which hasn't been triggered by the pointer or the keyboard (bug 1976597)
2025-08-03 15:29:07 +02:00
Calixte Denizet
287776483f Trigger a fake scrollend event in case it hasn't been triggered by the browser (bug 1957680)
This way, it should unblock zooming with ctrl+wheel after scrolling.
2025-08-01 19:06:26 +02:00
Calixte Denizet
a81e99168a [Editor] Highlight text on a selectionchange event which hasn't been triggered by the pointer or the keyboard (bug 1976597)
It's useful for users highlighting with NVDA.
They've to enable native selection and then selection some text.
In this case only a selectionchange is triggered once the selection is done.
2025-07-31 21:03:32 +02:00
calixteman
e5922f2e72
Merge pull request #20129 from calixteman/bug1978985
Disable printing when enablePermission is true and the pdf isn't allowed to be printed (bug 1978985)
2025-07-30 20:03:44 +02:00
Calixte Denizet
806f9c1cee Disable printing when enablePermission is true and the pdf isn't allowed to be printed (bug 1978985) 2025-07-30 19:29:01 +02:00