1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00
Commit graph

19903 commits

Author SHA1 Message Date
Calixte Denizet
b6e60d033a [Editor] Avoid an exception when undoing the deletion of a pre-existing annotation
It fixes #18849.

When such an annotation is deleted, we make sure that there are some data
to restore.
The version of this patch was making undoing a svg deletion buggy, so it's fixed now and
an integration test has been added for this case.
2024-10-04 18:24:58 +02:00
calixteman
e5b6144bfa
Merge pull request #18846 from flodolo/undo_number
Fluent: remove NUMBER() function from variant selector
2024-10-04 08:03:10 +02:00
calixteman
e9c81a6e54
Merge pull request #18834 from calixteman/edit_stamp1
[Editor] Make stamp annotations editable (bug 1921291)
2024-10-04 07:53:27 +02:00
Francesco Lodolo
58d31479d7
Fluent: remove NUMBER() function from variant selector 2024-10-04 07:14:45 +02:00
Calixte Denizet
8410252eb8 [Editor] Make stamp annotations editable (bug 1921291) 2024-10-03 21:54:08 +02:00
Jonas Jenwald
ebbd019d7d
Merge pull request #18842 from Snuffleupagus/annotationEditorMode-AbortSignal-any
Remove the `PDFViewer.annotationEditorMode` setter event listeners with `AbortSignal.any()`
2024-10-03 19:38:49 +02:00
calixteman
85586c5859
Merge pull request #18843 from calixteman/editor_async_deser
[Editor] Make the editor deserialization async
2024-10-03 19:37:49 +02:00
Calixte Denizet
7bd3e5ccec [Editor] Make the editor deserialization async 2024-10-03 18:34:22 +02:00
Jonas Jenwald
b7ae92c11c Remove the PDFViewer.annotationEditorMode setter event listeners with AbortSignal.any() 2024-10-03 15:57:46 +02:00
calixteman
4fb3adfc0f
Merge pull request #18837 from calixteman/bug1838602
[GV] Increase the height (48px) of the toolbar in order to fit the a11y recommendations (bug 1838602)
2024-10-03 11:29:54 +02:00
Calixte Denizet
0ce6f8b482 [GV] Increase the height (48px) of the toolbar in order to fit the a11y recommendations (bug 1838602)
and reorganize the toolbar css to use nested styles.
2024-10-02 19:17:40 +02:00
calixteman
567df42149
Merge pull request #18805 from calixteman/update_stamp
[Editor] Add the possibility to save an updated stamp annotation (bug 1921291)
2024-10-02 13:16:35 +02:00
Calixte Denizet
c9050be863 [Editor] Add the possibility to save an updated stamp annotation (bug 1921291) 2024-10-02 11:45:16 +02:00
Jonas Jenwald
e25832c43f
Merge pull request #18831 from Snuffleupagus/toolbar-container
Fix `toolbarViewer`/`toolbarContainer` regressions (PR 18385, 18786 follow-up)
2024-10-02 09:37:12 +02:00
calixteman
0308b8075f
Merge pull request #18824 from calixteman/issue18072
Write the display flags in F entry when saving an annotation (issue 18072)
2024-10-02 09:13:06 +02:00
Jonas Jenwald
07e8afb247 Always set AppOptions.eventBus, regardless of build, to make local testing easier 2024-10-01 19:43:19 +02:00
Jonas Jenwald
7c9d177826 Update the CaretBrowsingMode toolbar-height if the toolbarDensity preference changes (PR 18786 follow-up)
Otherwise the isVisible-calculations may not work correctly.
2024-10-01 19:43:16 +02:00
calixteman
3cdc3258d9
Merge pull request #18830 from calixteman/menu_nvda
Make the secondary menu button usable with the keyboard when NVDA is enabled
2024-10-01 17:27:56 +02:00
Calixte Denizet
2481a4bab9 Write the display flags in F entry when saving an annotation (issue 18072) 2024-10-01 17:26:39 +02:00
Jonas Jenwald
f2a132f826 Use the "correct" toolbar container element in getViewerConfiguration (PR 18385 follow-up)
With the changes made in PR 18385 the `toolbarViewer` element is now shorter than before, since the padding is applied on its `toolbarContainer` parent-element instead.
This causes two separate regressions:
 - Clicking at the very top/bottom of the toolbar no longer closes the secondaryToolbar like previously.
 - The `CaretBrowsingMode`-constructor no longer computes the toolbar-height correctly.

Given how/where the `container`-property is being used these changes *should* thus be safe.
2024-10-01 17:17:40 +02:00
Calixte Denizet
392c17efa0 Make the secondary menu button usable with the keyboard when NVDA is enabled
It's a temporary workaround until bug 1921984 is fixed.
2024-10-01 16:57:39 +02:00
Jonas Jenwald
35a9a6a7b3
Merge pull request #18829 from Snuffleupagus/PDFLayerViewer-update-UI
Re-factor how `PDFLayerViewer` decides if the UI needs to updated on "optionalcontentconfigchanged" events
2024-10-01 15:17:00 +02:00
Jonas Jenwald
655ef12b14 Re-factor how PDFLayerViewer decides if the UI needs to updated on "optionalcontentconfigchanged" events
The current implementation won't work correctly in some cases, e.g. if RBGroups are present, which means that it's possible for the UI to get out-of-sync with the actual optionalContent-state.

To avoid querying the DOM unnecessarily we cache the last known UI-state and compare with the actual optionalContent-state, which thus replaces the previously used hash-comparison.
2024-10-01 13:25:22 +02:00
Jonas Jenwald
783facb312
Merge pull request #18822 from Snuffleupagus/Chrome-103
[api-minor] Update the minimum supported Google Chrome version to 103
2024-10-01 10:12:57 +02:00
Jonas Jenwald
1267e28255 [api-minor] Update the minimum supported Google Chrome version to 103
This patch updates the minimum supported browsers as follows:
 - Google Chrome 103[1], which was released on 2022-06-21; see https://chromereleases.googleblog.com/2022/06/stable-channel-update-for-desktop_21.html

Note that nowadays we usually try, where feasible and possible, to support browsers that are about two years old. By limiting support to only "recent" browsers we reduce the risk of holding back improvements of the *built-in* Firefox PDF Viewer, and also (significantly) reduce the maintenance/support burden for the PDF.js contributors.

*Please note:* As always, the minimum supported browser version assumes that a `legacy`-build of the PDF.js library is being used; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support

---

[1] This is consistent with the minimum supported version in the recently updated Google Chrome addon.
2024-09-29 13:11:02 +02:00
Jonas Jenwald
a7e1bf64c4
Merge pull request #18812 from Snuffleupagus/pr-15522-followup
Ensure that the CursorTools-buttons are disabled e.g. during editing (PR 15522 follow-up)
2024-09-28 19:20:56 +02:00
Jonas Jenwald
b1df164a26 Ensure that the CursorTools-buttons are disabled e.g. during editing (PR 15522 follow-up)
We disable any non-default CursorTool in PresentationMode and during Editing, since they don't make sense there and to prevent problems such as e.g. [bug 1792422](https://bugzilla.mozilla.org/show_bug.cgi?id=1792422).
Hence it seems like a good idea to *also* disable the relevant SecondaryToolbar-buttons, to avoid the user being surprised that the CursorTools-buttons do nothing if clicked.
2024-09-28 12:29:51 +02:00
calixteman
642b9a5ae6
Merge pull request #18793 from calixteman/bug1911980
[Editor] Avoid to have a selected stamp annotation on top of the secondary toolbar (bug 1911980)
2024-09-26 20:16:13 +02:00
calixteman
c46ac3f73f
Merge pull request #18800 from calixteman/popup_deletion
[Editor] When deleting an annotation with popup, then delete the popup too
2024-09-26 18:04:24 +02:00
Calixte Denizet
0382dd0e25 [Editor] When deleting an annotation with popup, then delete the popup too 2024-09-26 17:52:25 +02:00
Calixte Denizet
ec01af6b38 [Editor] Avoid to have a selected stamp annotation on top of the secondary toolbar (bug 1911980) 2024-09-26 17:48:02 +02:00
Jonas Jenwald
7063be9860
Merge pull request #18802 from Snuffleupagus/issue-18801
Add basic support for non-embedded GillSansMT fonts (issue 18801)
2024-09-26 17:42:57 +02:00
Jonas Jenwald
7db9941e0f Add basic support for non-embedded GillSansMT fonts (issue 18801)
Given the following excerpt from the [Wikipedia article](https://en.wikipedia.org/wiki/Gill_Sans), mapping this to Helvetica should hopefully be fine:

> It has been described as "the British Helvetica" because of its lasting popularity in British design.
2024-09-26 16:42:54 +02:00
Jonas Jenwald
6daaa2fef7
Merge pull request #18799 from Snuffleupagus/rm-more-getCanvas-trackTransform
Remove `trackTransform` arguments from `CachedCanvases.getCanvas`-calls (PR 15281 follow-up)
2024-09-26 16:28:27 +02:00
Jonas Jenwald
fa2d7fc178 Remove trackTransform arguments from CachedCanvases.getCanvas-calls (PR 15281 follow-up)
This became unused in PR 15281, however that patch clearly missed some occurrences; sorry about that!
2024-09-26 15:21:44 +02:00
Jonas Jenwald
3902a148e2
Merge pull request #18785 from Snuffleupagus/transportFactory-init
Slightly re-factor the `transportFactory` initialization in `getDocument`
2024-09-26 15:03:22 +02:00
calixteman
2ff8035981
Merge pull request #18798 from calixteman/pattern_negative_bbox
Fix the rendering of tiling pattern when the steps are lower than the tile dimensions (bug 1837738)
2024-09-26 14:25:14 +02:00
Calixte Denizet
6d88f9f154 Fix the rendering of tiling pattern when the steps are lower than the tile dimensions (bug 1837738)
It fixes #16038.

The idea is to create a pattern having the steps for dimensions and then draw
the base tile and the different overlapping parts on it.
2024-09-26 14:20:48 +02:00
Jonas Jenwald
a989244570 Slightly re-factor the transportFactory initialization in getDocument
Given that the `WorkerTransport`-constructor will access all possible factory-instances, let's ensure that the `transportFactory`-object always has a consistent shape regardless of other options.

Also, since `useWorkerFetch` is always true in MOZCENTRAL builds we never need to create `CMapReaderFactory`/`StandardFontDataFactory`-instances there.
2024-09-26 12:16:05 +02:00
Jonas Jenwald
a1283785e5
Merge pull request #18796 from Snuffleupagus/unify-toolbarContainer
Unify separate `#toolbarContainer`-blocks in the CSS (PR 18385 follow-up)
2024-09-26 12:09:37 +02:00
Jonas Jenwald
17008ddf21
Merge pull request #18795 from Snuffleupagus/rm-splitToolbarButton
Remove the unused `splitToolbarButton` CSS class (PR 18385 follow-up)
2024-09-26 12:09:03 +02:00
Jonas Jenwald
f765b5ab35 Unify separate #toolbarContainer-blocks in the CSS (PR 18385 follow-up) 2024-09-26 11:08:55 +02:00
Jonas Jenwald
135ee03847 Remove the unused splitToolbarButton CSS class (PR 18385 follow-up) 2024-09-26 11:01:18 +02:00
Marco Castelluccio
9735a840ad
Merge pull request #18791 from sylvestre/patch-1
Add Calixte to the list of authors
2024-09-25 18:18:31 +02:00
calixteman
4ab381f52e
Merge pull request #18786 from calixteman/update_toolbar_height
Increase the size of the toolbar depending on the uidensity (bug 1171799)
2024-09-25 15:48:54 +02:00
calixteman
45758104a4
Merge pull request #18790 from calixteman/bug1917734
Correctly compute the font size when printing a text field with an auto font size (bug 1917734)
2024-09-25 14:58:33 +02:00
Sylvestre Ledru
5c407a2d23
Add Calixte to the list of authors 2024-09-25 14:48:01 +02:00
Calixte Denizet
e23159c41b Increase the size of the toolbar depending on the uidensity (bug 1171799) 2024-09-25 14:27:17 +02:00
Calixte Denizet
fc1564f476 Correctly compute the font size when printing a text field with an auto font size (bug 1917734) 2024-09-25 14:05:54 +02:00
calixteman
529906c74f
Merge pull request #18784 from calixteman/rm_useless_css
Remove duplicated --toolbar-height definition in the css
2024-09-24 12:44:34 +02:00