Commit Graph

18088 Commits

Author SHA1 Message Date
calixteman
b002d16f04
Merge pull request #16996 from Snuffleupagus/issue-16995
Enable the Stylelint `declaration-block-no-duplicate-properties` rule (issue 16995)
2023-09-21 13:52:54 +02:00
Jonas Jenwald
80e691d2ad Enable the Stylelint declaration-block-no-duplicate-properties rule (issue 16995)
Please refer to https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties
2023-09-21 13:42:05 +02:00
Jonas Jenwald
e2b7896826 [GeckoView] Avoid bundling the AltTextManager class, since it's unused 2023-09-21 12:51:34 +02:00
calixteman
561aea530b
Merge pull request #16991 from Snuffleupagus/alt_text_edit-boolean
Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
2023-09-21 11:04:06 +02:00
calixteman
237b8ce4a8
Merge pull request #16988 from calixteman/alt_text_dialog_others
[Editor] Tweak few values after review from UX
2023-09-21 11:03:19 +02:00
calixteman
67ddabcbc2
Merge pull request #16990 from calixteman/alt_text_aria_label
[Editor] Add an aria-label to the alt-text button depending on its state
2023-09-21 10:56:25 +02:00
Calixte Denizet
b5d18006a7 [Editor] Tweak few values after review from UX 2023-09-21 10:52:58 +02:00
Jonas Jenwald
5660cdfe68 Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
Looking at the save-telemetry values they're all boolean *except* for "alt_text_edit" in one instance, since `this.#previousAltText` may be an empty string (looking at the `editAltText` method) and this value may thus become an empty string as well.
2023-09-21 08:36:41 +02:00
Jonas Jenwald
34506f8874
Merge pull request #16989 from Snuffleupagus/more-reporttelemetry-event
Use the new "reporttelemetry" event in more viewer components
2023-09-20 22:06:14 +02:00
Calixte Denizet
c90ea2314e [Editor] Add an aria-label to the alt-text button depending on its state 2023-09-20 21:56:16 +02:00
Jonas Jenwald
fe60db27b1 Use the new "reporttelemetry" event in more viewer components
By utilizing the recently added "reporttelemetry" event, we can avoid having to manually pass in `externalServices` to a number of viewer components.
2023-09-20 20:18:10 +02:00
calixteman
f2d75d9221
Merge pull request #16985 from calixteman/btn_bg
[Editor] Change the colors for the disabled Save button in alt text dialoag in HCM
2023-09-20 19:03:01 +02:00
Calixte Denizet
7d0bf376d0 [Editor] Change the colors for the disabled Save button in alt text dialoag in HCM 2023-09-20 18:58:31 +02:00
calixteman
67646387c8
Merge pull request #16986 from calixteman/alt_text_contents
[Editor] Change some strings in the alt-text dialog
2023-09-20 18:52:37 +02:00
Calixte Denizet
9a677d0d4d [Editor] Change some strings in the alt-text dialog 2023-09-20 18:44:56 +02:00
calixteman
0317d3e168
Merge pull request #16987 from calixteman/alt_text_telemetry
[Editor] Add more telemetry for the 'add image' feature (bug 1853960)
2023-09-20 17:34:59 +02:00
Calixte Denizet
0a278ef0bc [Editor] Add more telemetry for the 'add image' feature (bug 1853960) 2023-09-20 17:23:23 +02:00
calixteman
b80e0d881d
Merge pull request #16984 from Snuffleupagus/altText-close
Don't try to close the `altText` dialog if it's not open (PR 16977 follow-up)
2023-09-20 11:14:28 +02:00
calixteman
b7fa4fb0f7
Merge pull request #16983 from calixteman/alt_text_tooltip
[Editor] Add a tooltip showing the alt text when hovering the alt-text button (bug 1844952)
2023-09-20 11:00:31 +02:00
Calixte Denizet
7952a36384 [Editor] Add a tooltip showing the alt text when hovering the alt-text button (bug 1844952) 2023-09-20 10:50:28 +02:00
Jonas Jenwald
21c55b56bf Don't try to close the altText dialog if it's not open (PR 16977 follow-up)
When closing a document in the viewer, e.g. by running `PDFViewerApplication.close()` in the console, the `AltTextManager.#finish` method currently throws *unless* the `altText` dialog is actually open.
Similar to e.g. the PasswordPrompt, we should thus only attempt to close the `altText` dialog when it's open.
2023-09-20 07:59:46 +02:00
calixteman
8d326e5e30
Merge pull request #16982 from calixteman/alt_text_rm_copy_listeners
[Editor] Remove copy/paste listener when alt text dialog is displayed
2023-09-19 22:52:49 +02:00
Calixte Denizet
c162b004ce [Editor] Remove copy/paste listener when alt text dialog is displayed 2023-09-19 22:41:47 +02:00
calixteman
54f6264d5b
Merge pull request #16977 from calixteman/add_alt_text
[Editor] Allow the user to add and save an alt-text for images (bug 1844952)
2023-09-19 21:59:59 +02:00
Calixte Denizet
c12049db07 [Editor] Allow the user to add and save an alt-text for images (bug 1844952) 2023-09-19 21:46:48 +02:00
Jonas Jenwald
29a48f9479
Merge pull request #16981 from Snuffleupagus/optionalContent-type-missing
Ignore optional content with missing /Type-entries
2023-09-19 15:15:00 +02:00
Jonas Jenwald
0ac8f33e13 Ignore optional content with missing /Type-entries
In the rare situation that an optional content dictionary lacks a /Type-entry we currently throw, which may prevent e.g. Form XObjects from rendering completely.

Fixes https://bugs.ghostscript.com/show_bug.cgi?id=707147
2023-09-19 14:11:03 +02:00
calixteman
daae6589b6
Merge pull request #16979 from calixteman/alt_text_change_str1
[Editor] Update alt text dialog description
2023-09-19 10:36:50 +02:00
calixteman
b9469c2059
Merge pull request #16980 from calixteman/rounded_resizers
[Editor] Make the border of the resizers slightly rounded
2023-09-19 10:12:11 +02:00
Calixte Denizet
f7870c04ae [Editor] Make the border of the resizers slightly rounded
It's a part of the UX specifications. There's a drawing issue in Firefox
(see bug https://bugzilla.mozilla.org/1853288) but setting the
background-clip property to content-box seems to be a good workaround.
2023-09-19 09:57:00 +02:00
Calixte Denizet
0df9d1d934 [Editor] Update alt text dialog description 2023-09-19 09:27:43 +02:00
calixteman
5ac40b71c0
Merge pull request #16952 from calixteman/alt_text_window
[Editor] Add a dialog box in order to get alt-text data (bug 1844952)
2023-09-18 21:49:33 +02:00
Calixte Denizet
df0da86b64 [Editor] Add a dialog box in order to get alt-text data (bug 1844952)
Implement the specifications provided by UX for light, dark and HCM modes.
2023-09-18 21:42:52 +02:00
calixteman
c0ed7fff2c
Merge pull request #16975 from calixteman/alt_text_fix_icon_dims
[Editor] Use the same height as in the svg for icons for the alt-text button
2023-09-18 19:53:48 +02:00
Calixte Denizet
60ccce5cb1 [Editor] Use the same height as in the svg for icons for the alt-text button 2023-09-18 19:07:36 +02:00
calixteman
c8727d9c70
Merge pull request #16974 from calixteman/fix_css_linter_issue
Fix a CSS linter issue in removing a useless comma
2023-09-18 19:01:33 +02:00
calixteman
2bd7bb3847
Merge pull request #16972 from calixteman/alt_text_icon_alpha
[Editor] Avoid to have some transparency in the icon used in the 'Alt text' button
2023-09-18 18:46:46 +02:00
Calixte Denizet
9b6e37c2cd Fix a CSS linter issue in removing a useless comma 2023-09-18 18:45:14 +02:00
Calixte Denizet
9dbe95c63c [Editor] Avoid to have some transparency in the icon used in the 'Alt text' button 2023-09-18 18:25:03 +02:00
calixteman
b85281914f
Merge pull request #16955 from calixteman/alt_text_button
[Editor] Add a button to trigger a dialog for adding an alt text (bug 1844952)
2023-09-18 15:50:10 +02:00
Calixte Denizet
a216836fd5 [Editor] Add a button to trigger a dialog for adding an alt text (bug 1844952) 2023-09-18 15:07:09 +02:00
calixteman
3afb717eed
Merge pull request #16938 from calixteman/update_struct_tree
[Editor] Add the ability to create/update the structure tree when saving a pdf containing newly added annotations (bug 1845087)
2023-09-18 13:04:52 +02:00
Tim van der Meij
01428f1e23
Wait for visibility change in the issue15053 integration test
Especially on slower bots there is some time between clicking the
element and the actual visibility change, but we didn't await this and
checked the visibility state immediately after clicking. This can be
reproduced 100% of the time by introducing a delay in the `display` and
`hidden` handlers of the `_commonActions` shadow call.

This commit fixes the problem by waiting until the first visibility
change actually happened before continuing with the assertions.
2023-09-17 19:48:14 +02:00
Tim van der Meij
1b3ccf1321
Wait for selector instead of timeout in the freetext double click move integration test
This integration test currently fails intermittently on the bots because
of the fixed timeout in the test, which is sometimes too low on slower
systems. The issue can be reproduced 100% of the time by introducing a
delay just before dispatching the `switchannotationeditormode` event.

Puppeteer also discourages this and instead recommends waiting for a
selector instead, which we now do here. This ensures that the test only
continues if the element under test is available and therefore prevents
any timing problems.
2023-09-17 18:49:11 +02:00
Tim van der Meij
97819891b6
Merge pull request #16964 from timvandermeij/fix-intermittent-annotations-move
Fix off-by-one errors in the "FreeText must move several annotations" integration test
2023-09-17 17:46:19 +02:00
Tim van der Meij
306cca930f
Fix off-by-one errors in the "FreeText must move several annotations" integration test
The x/y-coordinates are floats instead of integers like one might
expect. The current approach rounds both the old and the new
coordinates in order to do integer comparison. However, rounding each
coordinate individually causes too much loss of precision because,
depending on the decimal value, they are either rounded up or down
which causes intermittent off-by-one errors.

This commit fixes the problem by comparing coordinate differences
instead of the coordinates themselves. The precision loss is avoided
by subtracting the old from the new coordinate as-is and only rounding
the final result.
2023-09-17 15:56:51 +02:00
Tim van der Meij
e37e7b6f39
Merge pull request #16962 from timvandermeij/fix-intermittent-bug1844576
Fix integration test "Interaction in bug1844576.pdf must check that a field has the correct formatted value"
2023-09-17 14:12:55 +02:00
Tim van der Meij
0d3fbc1818
Wait for selector instead of timeout in the bug1844576 integration test
This integration test currently fails intermittently on the bots because
of the fixed timeout in the test, which is sometimes too low on slower
systems. The issue can be reproduced 100% of the time by introducing a
delay in the `WidgetAnnotationElement.showElementAndHideCanvas` method.

Puppeteer also discourages this and instead recommends waiting for a
selector instead, which we now do here. This ensures that the test only
continues if the element under test is available and therefore prevents
any timing problems.
2023-09-17 13:15:53 +02:00
Tim van der Meij
dd46110f6b
Use the page.$eval method in the bug1844576 integration test
We already use `page.$eval` in most other integration tests and it's
simpler because it already takes the selector as argument, so we don't
have to do a separate `querySelector` call ourselves.
2023-09-17 13:09:39 +02:00
Tim van der Meij
518590ac7d
Merge pull request #16961 from Snuffleupagus/debugger-rm-closure
Remove (some) closures from `web/debugger.js`
2023-09-17 11:45:14 +02:00