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

19839 commits

Author SHA1 Message Date
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
Calixte Denizet
50517b8fba Remove duplicated --toolbar-height definition in the css 2024-09-24 12:31:43 +02:00
calixteman
cc63941b64
Merge pull request #18783 from calixteman/rm_useless_css
Remove useless css variable --editor-toolbar-base-offset
2024-09-24 10:08:02 +02:00
Calixte Denizet
e9b10ae8b2 Remove useless css variable --editor-toolbar-base-offset 2024-09-24 09:58:17 +02:00
Jonas Jenwald
45fef4c6d7
Merge pull request #18781 from timvandermeij/typescript
Update `typescript` to version 5.6.2
2024-09-24 09:38:47 +02:00
calixteman
313ab9a464
Merge pull request #18385 from calixteman/remove_tabindex
Refactor the toolbar html & css to improve its overall accessibility (bug 1171799, bug 1855695)
2024-09-24 09:04:36 +02:00
Calixte Denizet
6f40ed729b Refactor the toolbar html & css to improve its overall accessibility (bug 1171799, bug 1855695)
The first goal of this patch was to remove the tabindex because it helps
to improve overall a11y. That led to move some html elements associated
with the buttons which helped to position these elements relatively to their
buttons.
Consequently it was easy to change the toolbar height (configurable in Firefox
with the pref browser.uidensity): it's the second goal of this patch.
For a11y reasons we want to be able to change the height of the toolbar to make
the buttons larger.
2024-09-23 22:43:44 +02:00
calixteman
c90ce5da20
Merge pull request #18779 from calixteman/bug1920515
[Editor] Don't show the ml toggle button when the ml is disabled (bug 1920515)
2024-09-23 22:12:25 +02:00
Tim van der Meij
c8af3f14d3
Update typescript to version 5.6.2
This is unblocked because in commit bb302dd the default value for the
constructor got removed, which apparently confused TypeScript before.

Fixes #18770.
2024-09-23 20:34:35 +02:00
Calixte Denizet
d35a20a8c1 [Editor] Don't show the ml toggle button when the ml is disabled (bug 1920515) 2024-09-23 19:46:32 +02:00
Jonas Jenwald
b65b7747b6
Merge pull request #18777 from Snuffleupagus/version-4.7
Bump library version to `4.7`
2024-09-23 14:46:12 +02:00
Jonas Jenwald
be60ca66e1 Bump library version to 4.7 2024-09-23 14:40:09 +02:00
Jonas Jenwald
bbef99fe82
Merge pull request #18776 from Snuffleupagus/api-CanvasFactory-FilterFactory
[api-minor] Pass `CanvasFactory`/`FilterFactory`, rather than instances, to `getDocument`
2024-09-23 14:36:32 +02:00
Jonas Jenwald
6aa02ed7f6
Merge pull request #18771 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2024-09-23 11:53:54 +02:00
Jonas Jenwald
bb302dd993 [api-minor] Pass CanvasFactory/FilterFactory, rather than instances, to getDocument
This unifies the various factory-options, since it's consistent with `CMapReaderFactory`/`StandardFontDataFactory`, and ensures that any needed parameters will always be consistently provided when creating `CanvasFactory`/`FilterFactory`-instances.

As shown in the modified example this may simplify some custom implementations, since we now provide the ability to access the `CanvasFactory`-instance used with a particular `getDocument`-invocation.
2024-09-23 11:26:30 +02:00