Update PDF.js to new version 85568bd6ccf391818569190894e4f7ade7f1284d from 2023-09-22 20:45:13
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: Dc3buMyzQIWpFwDtT9PPAA])
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
This update covers 11 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/build/pdf.js | 42 +-
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 19 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 848 +-------------
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 12 +-
toolkit/components/pdfjs/content/web/viewer.css | 3 +-
toolkit/components/pdfjs/content/web/viewer.html | 2 +-
toolkit/components/pdfjs/content/web/viewer.js | 123 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 134 insertions(+), 923 deletions(-)
9e0e67918fb2ec5388b9fe70379416315f7a5896 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/9e0e67918fb2ec5388b9fe70379416315f7a5896
Authored: 2023-09-22 15:19:24 +0200
Committed: 2023-09-22 22:20:49 +0200
[Editor] Report telemetry when closing the altText dialog with Esc
(PR 16987 follow-up)
The dialog element handles closing with <kbd>Esc</kbd> automatically, however we're not reporting telemetry in that case.
In order to fix that the easiest solution, as far as I'm concerned, seem to be moving the telemetry reporting into the dialog-close handler since it's always invoked.
Files Modified:
- web/alt_text_manager.js
8c5da23f67a955251112e67e74035fcef02e0d57 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/8c5da23f67a955251112e67e74035fcef02e0d57
Authored: 2023-09-22 13:04:59 +0200
Committed: 2023-09-22 21:53:26 +0200
Don't reset this.#currentEditor
when destroying the dialog
This patch addresses an edge-case that'll probably never happen, but it nonetheless seems like something that we want to fix.
Note how we're using the #currentEditor
-field to prevent opening the dialog when it's already active, and it being reset once the dialog has been closed.
By also resetting the #currentEditor
-field during destruction, instead of waiting until the dialog has actually closed (assuming it's currently open), there's a tiny window of time[1] during which we could theoretically allow to (incorrectly) re-open the dialog and thus getting out-of-sync state in the viewer-component.
[1] Since the "close" event, on a dialog-element, is dispatched asynchronously by the browser.
Files Modified:
- web/alt_text_manager.js
d5936d9a153039e92f67206b3fe48d582a6f7248 by Calixte Denizet
https://github.com/mozilla/pdf.js/commit/d5936d9a153039e92f67206b3fe48d582a6f7248
Authored: 2023-09-22 19:35:01 +0200
Committed: 2023-09-22 20:46:29 +0200
[Editor] Let the Save button always enabled in the alt-text dialog
Files Modified:
- src/display/editor/editor.js
- web/alt_text_manager.js
- web/viewer.html
43c7e88fa91b6ed4a8f8933b7c52d6eb6dc404db by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/43c7e88fa91b6ed4a8f8933b7c52d6eb6dc404db
Authored: 2023-09-22 15:45:02 +0200
Committed: 2023-09-22 17:24:32 +0200
Don't bother trying to unregister the "reporttelemetry" event listener
Note that both event-unbind methods are unused in MOZCENTRAL builds; see https://searchfox.org/mozilla-central/rev/48b6992e03fa66f77ac9688ba61c95d31a451bc1/toolkit/components/pdfjs/content/web/viewer.js#1864-1869
Files Modified:
- web/app.js
050093c9f519154f26f3d5757ffc7290fd98ba8f by Calixte Denizet
https://github.com/mozilla/pdf.js/commit/050093c9f519154f26f3d5757ffc7290fd98ba8f
Authored: 2023-09-22 09:43:19 +0200
Committed: 2023-09-22 17:10:20 +0200
[Editor] Tweak the save flow in the alt-text dialog
When the user edit an existing alt-text and remove it, we want to be able
to save this state and consequently remove the done state from the
alt-text button.
Remove the button from its parent when the editor is removed: it should
help to save few Kb of memory.
Files Modified:
- src/display/editor/editor.js
- web/alt_text_manager.js
0237e2eb2b2e0f72403ab846fc3741247a9fa1d5 by Calixte Denizet
https://github.com/mozilla/pdf.js/commit/0237e2eb2b2e0f72403ab846fc3741247a9fa1d5
Authored: 2023-09-22 13:11:19 +0200
Committed: 2023-09-22 13:11:37 +0200
[Editor] Darken the toolbar when the alt-text dialog is opened
It aims to fix the issue spotted in:
https://github.com/mozilla/pdf.js/pull/17002#issuecomment-1730962273
Files Modified:
- web/alt_text_manager.js
- web/app.js
ee5b8bcf9ec65b24c3a059bd0437397800e2a11b by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/ee5b8bcf9ec65b24c3a059bd0437397800e2a11b
Authored: 2023-09-22 12:26:03 +0200
Committed: 2023-09-22 12:26:03 +0200
[Editor] Make the altText dialog labels part of telemetry (PR 16987 follow-up)
Radio-buttons can also be toggled by clicking on their associated label
-elements, and not only the input
-elements itself, however it seems that "pointerdown" event listeners don't cover that case.
Hence it's possible that telemetry could miss certain cases of a mouse being used, and the easiest solution seem to be to instead use "click" event listeners and just ignore keyboard-based events.
Files Modified:
- web/alt_text_manager.js
6545551e761330d9cc98036c392182ef3a6bfb9d by Calixte Denizet
https://github.com/mozilla/pdf.js/commit/6545551e761330d9cc98036c392182ef3a6bfb9d
Authored: 2023-09-21 18:40:35 +0200
Committed: 2023-09-21 20:44:53 +0200
[Editor] Avoid to darken the current editor when opening the alt-text dialog
Files Modified:
- src/pdf.js
- test/unit/pdf_spec.js
- web/alt_text_manager.js
- web/annotation_editor_layer_builder.css
9b21f17b032464a839ca59a35c27d1d75888d60b by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/9b21f17b032464a839ca59a35c27d1d75888d60b
Authored: 2023-09-21 20:08:08 +0200
Committed: 2023-09-21 20:08:08 +0200
Prevent wheel/touch zooming in the viewer when a dialog is open
Files Modified:
- web/app.js
4cedc12341caf70407f9e4aee8bf61d4ea8a4754 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/4cedc12341caf70407f9e4aee8bf61d4ea8a4754
Authored: 2023-09-21 19:43:34 +0200
Committed: 2023-09-21 19:49:31 +0200
Restore the collectFields
parameter in the Annotation code (issue 17000)
Rather than trying to be "clever" here, and possibly affect code readability negatively, let's just restore the collectFields
parameter to address the unneeded parsing that now happens when printing new Annotations.
Files Modified:
- src/core/annotation.js
5711d0f95d7d53cf16ec8730d4baf799356ad0c7 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/5711d0f95d7d53cf16ec8730d4baf799356ad0c7
Authored: 2023-09-21 15:18:12 +0200
Committed: 2023-09-21 15:51:33 +0200
[GeckoView] Exclude annotation_editor_layer_builder.css
in the build (issue 16994)
Given the limitations of the old pre-processor that's used for CSS/HTML files, this unfortunately isn't as "easy" to implement as it is for JavaScript code.
Since this is the first case where we've wanted to do conditional CSS imports, rather than trying to completely re-write the pre-processor, this patch settles for handling it explicitly in the expandCssImports
function.
Files Modified:
- external/builder/builder.mjs
- gulpfile.mjs
- web/pdf_viewer.css
Reporter | ||
Comment 1•1 year ago
|
||
Dc3buMyzQIWpFwDtT9PPAA |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=1fabd9637d612a52a7df139216dccb7f07ea22da
Reporter | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Reporter | ||
Comment 3•1 year ago
|
||
VhjnYD1nQy6MDUfeh7lLAA |
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
Reporter | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
bugherder |
Assignee | ||
Comment 6•1 year ago
|
||
Comment on attachment 9354706 [details]
Bug 1854773 - Update PDF.js to 85568bd6ccf391818569190894e4f7ade7f1284d
Beta/Release Uplift Approval Request
- User impact if declined: The flow for the new alt-text dialog won't be correct
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: - Add an in image in the pdf
- add some alt-text
- check that the save button is always enabled and does its job.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Small and self contained change.
- String changes made/needed: No
- Is Android affected?: No
Assignee | ||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Comment on attachment 9354706 [details]
Bug 1854773 - Update PDF.js to 85568bd6ccf391818569190894e4f7ade7f1284d
Approved for 119.0b3
Updated•1 year ago
|
Updated•1 year ago
|
Comment 9•1 year ago
|
||
Verified as fixed with Firefox 120.0a1 (20230928215127) on macOS 12 ARM, Win 10 and Ubuntu 22.04 and treeherder build Firefox 119.0b3 (20230928191344) on macOS 12 ARM.
Description
•