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

19681 commits

Author SHA1 Message Date
Rob Wu
bc4890d4d4 [CRX] Remove restoretab.js logic
restoretab.js was added in https://github.com/mozilla/pdf.js/pull/6233
with the purpose of restoring lost tabs when Chrome closes all extension
tabs when it reloads the extension. This forced reload can happen when
the user toggles the "Allow access to file URLs" option.

This logic does not work any more, and since the use of localStorage is
a blocker in migrating to MV3, this patch just drops the logic.
2024-09-08 16:35:13 +02:00
Rob Wu
23bc46d51a [CRX] Replace deprecated extension.getURL with runtime.getURL 2024-09-08 16:35:13 +02:00
Rob Wu
b23829fc60 [CRX] Drop chrome_style from manifest.json
MV3 does not support chrome_style in options_ui. Remove it and replace
it with the minimal amount of styles that still has some spacing around
the individual settings for readability.
2024-09-08 16:35:13 +02:00
Rob Wu
bd3d993180 [CRX] Use DNR instead of webRequest in preserve-referer
webRequestBlocking is unavailable in MV3. Non-blocking webRequest can
still be used to detect the Referer, but we have to use
declarativeNetRequest to change the Referer header as needed.
2024-09-08 16:35:13 +02:00
Tim van der Meij
578549487f
Merge pull request #18707 from Snuffleupagus/pr-18596-followup
Prevent `.visibleMediumView` from overriding already hidden elements (issue 18704, PR 18596 follow-up)
2024-09-08 12:00:44 +02:00
Tim van der Meij
c159cb1335
Merge pull request #18682 from Snuffleupagus/responseHeaders
Use response-`Headers` in the different `IPDFStream` implementations
2024-09-08 11:49:50 +02:00
Jonas Jenwald
b681ea6fd9 Prevent .visibleMediumView from overriding already hidden elements (issue 18704, PR 18596 follow-up)
*Please note:* As a general rule we probably don't need to fix things affecting *custom* implementations of the default viewer, but in this case a "targeted" fix seem possible that shouldn't (famous last words) break anything else.

Ensure that the `.visibleMediumView` class, which is used when the viewer becomes narrow, cannot override the `display`-value for DOM elements that are being *explicitly* hidden either through the associated attribute or class.
2024-09-08 10:47:18 +02:00
Jonas Jenwald
5d0c82cf05
Merge pull request #18706 from Snuffleupagus/AltText-full-l10n-ids
Use "full" localization ids in the `AltText` class (PR 18674 follow-up)
2024-09-07 23:20:09 +02:00
Jonas Jenwald
727454600b
Merge pull request #18705 from Snuffleupagus/ColorPicker-full-l10n-ids
Use "full" localization ids in the `ColorPicker` class (PR 18674 follow-up)
2024-09-07 23:19:28 +02:00
calixteman
5369a24c9c
Merge pull request #18698 from calixteman/issue18694
Avoid to have a white line around the canvas
2024-09-07 22:22:21 +02:00
Calixte Denizet
68332ec236 Avoid to have a white line around the canvas
The canvas must have the same dims as the page in order to avoid to see the page
background.
2024-09-07 20:12:29 +02:00
Jonas Jenwald
0ffd99acc5 Use "full" localization ids in the AltText class (PR 18674 follow-up)
Apparently I missed these in PR 18674.
2024-09-07 16:38:21 +02:00
Jonas Jenwald
931090328d Use "full" localization ids in the ColorPicker class (PR 18674 follow-up)
Apparently I missed these in PR 18674.
2024-09-07 15:53:01 +02:00
Jonas Jenwald
2a01931e4a Use the _headersCapability name in PDFNetworkStreamFullRequestReader
This improves consistency in the code-base since the implementations with the Fetch API respectively Node.js uses that name.
2024-09-07 12:36:34 +02:00
Jonas Jenwald
840cc5e0d4 Use response-Headers in the different IPDFStream implementations
Given that the `Headers` functionality is now available in all browsers/environments that we support, [see MDN](https://developer.mozilla.org/en-US/docs/Web/API/Headers#browser_compatibility), we can utilize "proper" `Headers` in the helper functions that are used to parse the response.
2024-09-07 12:34:53 +02:00
calixteman
77c7ec6927
Merge pull request #18692 from calixteman/bug1708040
Make tagged images visible for screen readers (bug 1708040)
2024-09-05 18:50:22 +02:00
Calixte Denizet
ddba096191 Make tagged images visible for screen readers (bug 1708040)
The idea is to insert a span in the text layer with an aria-role set to img
and use the bounding box provided by the attribute field in the tag dict in
order to have non-null dimensions for the image to make it "visible".
2024-09-05 17:59:42 +02:00
calixteman
4b906ad0a8
Merge pull request #18697 from calixteman/issue18696
[Editor] Avoid to throw when an highlight annotation is resetted
2024-09-05 16:15:23 +02:00
Calixte Denizet
350e3e7b1c [Editor] Avoid to throw when an highlight annotation is resetted 2024-09-05 15:31:49 +02:00
calixteman
e3fd62d726
Merge pull request #18690 from calixteman/print_test_afterprint
In the autoprint integration test, resolve the promise on 'afterprint' event
2024-09-04 15:44:05 +02:00
calixteman
4fb045b9eb
Merge pull request #18689 from Snuffleupagus/StructTreeLayerBuilder-render-caching
Improve the `StructTreeLayerBuilder.render` method
2024-09-04 14:07:18 +02:00
Calixte Denizet
5d622ada04 In the autoprint integration test, resolve the promise on 'afterprint' event 2024-09-04 13:49:02 +02:00
calixteman
1cdaaadf2d
Merge pull request #18670 from calixteman/bug1911764
[Editor] Remove the disclaimer when the user is editing the alt-text in the new alt-text modal (bug 1911764)
2024-09-04 13:41:18 +02:00
Jonas Jenwald
4b8628637a Improve the StructTreeLayerBuilder.render method
In hindsight it occurred to me that there's a couple of smaller issues with this method after it's made asynchronous (in PR 18658).

 - If the `render`-method is invoked back-to-back the existing caching doesn't guarantee that re-parsing won't occur, which we can address by introducing a new (private) promise.

 - If there's any errors fetching and/or parsing the structTree-data, we'd attempt to parse it again on re-rendering despite that being pointless.
2024-09-04 11:53:51 +02:00
Calixte Denizet
4aea51b5bf [Editor] Remove the disclaimer when the user is editing the alt-text in the new alt-text modal (bug 1911764) 2024-09-04 10:00:35 +02:00
calixteman
d3698223a8
Merge pull request #18658 from calixteman/bug1912001
[Editor] Make the stamp annotations alt text readable by either VO or NVDA (bug 1912001)
2024-09-03 21:47:21 +02:00
Tim van der Meij
082ad955f0
Merge pull request #18673 from Snuffleupagus/use-Headers
Use `Headers` consistently in the different `IPDFStream` implementations
2024-09-03 20:26:35 +02:00
Tim van der Meij
da99f5d6cd
Merge pull request #18679 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2024-09-03 20:14:37 +02:00
calixteman
a61f4b0303
Merge pull request #18427 from calixteman/edit_highlight
[Editor] Make highlight annotations editable (bug 1883884)
2024-09-03 17:56:37 +02:00
calixteman
5d8d9ef6f9
Merge pull request #18664 from calixteman/bug1911994
[Editor] Make the focused stamp annotation more clear from a screen reader point of view (bug 1911994)
2024-09-03 17:04:21 +02:00
Calixte Denizet
deedbd1c4f [Editor] Make the stamp annotations alt text readable by either VO or NVDA (bug 1912001) 2024-09-03 16:57:41 +02:00
Calixte Denizet
843fde3b13 [Editor] Make the focused stamp annotation more clear from a screen reader point of view (bug 1911994)
It has been tested with Voice Over (mac) and with NVDA (windows).

When an added stamp annotation is focused, the screen reader will announce
that it's a figure containing a graphic with the added alt-text.
2024-09-03 16:38:21 +02:00
Calixte Denizet
a62ceedb69 [Editor] Make highlight annotations editable (bug 1883884)
The goal of this patch is to be able to edit existing highlight annotations.
2024-09-03 15:27:55 +02:00
Jonas Jenwald
d3a94f17cb Use Headers consistently in the different IPDFStream implementations
The `Headers` functionality is now available in all browsers/environments that we support, which allows us to consolidate and simplify how the `httpHeaders` API-option is handled; see https://developer.mozilla.org/en-US/docs/Web/API/Headers#browser_compatibility

Also, simplifies the old `NetworkManager`-constructor a little bit.
2024-09-02 11:56:24 +02:00
Tim van der Meij
8084ae2054
Update translations to the most recent versions 2024-09-01 19:59:22 +02:00
Tim van der Meij
ec7d0f6860
Update dependencies to the most recent versions 2024-09-01 19:58:26 +02:00
Tim van der Meij
0676ea19cf
Merge pull request #18678 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2024-09-01 19:40:17 +02:00
Tim van der Meij
4220116c1a
Bump the stable version in pdfjs.config 2024-09-01 19:36:48 +02:00
Tim van der Meij
9b541910ff
Merge pull request #18675 from calixteman/nofirefox
Add an option (i.e. --noFirefox) to only use Chrome when running tests
2024-09-01 15:44:00 +02:00
Tim van der Meij
bde7a84e09
Merge pull request #18672 from Snuffleupagus/PDFPageView-AnnotationEditorLayerBuilder-shorter-init
Shorten the code that inits `AnnotationEditorLayerBuilder` in the `web/pdf_page_view.js` file
2024-09-01 15:30:20 +02:00
Tim van der Meij
4a132229c6
Merge pull request #18665 from Snuffleupagus/PDFNodeStream-createRequest
Add a helper function for http/https requests in `src/display/node_stream.js`
2024-09-01 15:27:48 +02:00
Jonas Jenwald
2a68aa62f2
Merge pull request #18674 from Snuffleupagus/full-l10n-ids
Use "full" localization ids throughout the code-base
2024-09-01 10:11:21 +02:00
Calixte Denizet
1b0bfcae3e Add an option (i.e. --noFirefox) to only use Chrome when running tests 2024-08-31 22:29:24 +02:00
Jonas Jenwald
ff762179a6
Merge pull request #18671 from Snuffleupagus/update-l10n
Update l10n files
2024-08-31 21:36:51 +02:00
Jonas Jenwald
b01df28810 Use "full" localization ids throughout the code-base
It was recently brought to my attention that using partial or generated localization ids is bad for maintainability, hence this patch goes through the code-base and replaces any such occurrences.
2024-08-31 18:31:31 +02:00
Jonas Jenwald
044f1c9e07 Shorten the code that inits AnnotationEditorLayerBuilder in the web/pdf_page_view.js file
This code can now utilize logical OR assignment, which is ever so slightly shorter.
2024-08-31 11:58:43 +02:00
Jonas Jenwald
bcc511119e Update l10n files
Given the recent l10n-id changes, let's do one more update before the next release to avoid "broken" translations.
2024-08-31 11:17:38 +02:00
calixteman
7494dbccf4
Merge pull request #18666 from calixteman/update_loading_icon_alt_text
[Editor] Update the loading icon when wait for ML to take into account prefered-reduced-motion setting
2024-08-30 18:38:21 +02:00
Calixte Denizet
36c5d192c7 [Editor] Update the loading icon when wait for ML to take into account prefered-reduced-motion setting
* The icon has been updated in https://bugzilla.mozilla.org/show_bug.cgi?id=1908920;
 * Add a linter to check that a svg element doesn't have fill="context-fill" attribute.
2024-08-30 15:48:51 +02:00
Jonas Jenwald
a94e8ba9e8 Add a helper function for http/https requests in src/display/node_stream.js
Currently we repeat virtually the same http/https request code in two different classes in this file, which seems unnecessary and it leads to more code.
2024-08-29 22:52:26 +02:00