Update PDF.js to new version 74515c623c1a0a555e6ca684c435202bf3a91752 from 2026-09-02 09:38:24
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: TzXFvAm2RWm6Ec0Bo_2fcw])
Attachments
(1 external file)
This update covers 31 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/build/pdf.mjs | 71 +++--
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 5 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 164 ++++---------
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 13 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 22 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 109 insertions(+), 170 deletions(-)
8390ba8de4b15ae5ab616ca81087b0478f0b1a06 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/8390ba8de4b15ae5ab616ca81087b0478f0b1a06
Authored: 2026-09-01 18:00:00 +0200
Committed: 2026-09-01 18:15:18 +0200
[api-minor] Expose the operatorList to the operationsFilter callback function (issue 20399)
Without this the operationsFilter functionality is perhaps too limited, since it's currently not really possible to e.g. ignore certain operators.
Files Modified:
- src/display/api.js
- src/display/canvas.js
- test/unit/api_spec.js
bcc0a2a0b26bf8d243dbdb285b1bfc8151128e38 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/bcc0a2a0b26bf8d243dbdb285b1bfc8151128e38
Authored: 2026-09-01 13:58:00 +0200
Committed: 2026-09-01 14:46:30 +0200
Add a helper to reduce duplication in the collectActions function
The new helper avoids duplicating the same code twice, when invoking _collectJS, during parsing of actions.
Files Modified:
- src/core/core_utils.js
5a3732776debb2c14a20a15a95de620ebdf76bcf by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/5a3732776debb2c14a20a15a95de620ebdf76bcf
Authored: 2026-09-01 12:20:51 +0000
Committed: 2026-09-01 12:20:51 +0000
Bump github/codeql-action/init from 4.37.7 to 4.37.8
Bumps github/codeql-action/init from 4.37.7 to 4.37.8.
updated-dependencies:
- dependency-name: github/codeql-action/init
dependency-version: 4.37.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
ed21dc4c763326ae69ce7f164207f922cd8b0351 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/ed21dc4c763326ae69ce7f164207f922cd8b0351
Authored: 2026-09-01 12:19:23 +0000
Committed: 2026-09-01 12:19:23 +0000
Bump github/codeql-action/autobuild from 4.37.7 to 4.37.8
Bumps github/codeql-action/autobuild from 4.37.7 to 4.37.8.
updated-dependencies:
- dependency-name: github/codeql-action/autobuild
dependency-version: 4.37.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
6397e95a15f93cba180b602d348d63dfeae20987 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/6397e95a15f93cba180b602d348d63dfeae20987
Authored: 2026-09-01 12:18:14 +0000
Committed: 2026-09-01 12:18:14 +0000
Bump github/codeql-action/analyze from 4.37.7 to 4.37.8
Bumps github/codeql-action/analyze from 4.37.7 to 4.37.8.
updated-dependencies:
- dependency-name: github/codeql-action/analyze
dependency-version: 4.37.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
14a29369e9702f4d36ee0ab551ad8c42868d3092 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/14a29369e9702f4d36ee0ab551ad8c42868d3092
Authored: 2026-09-01 12:39:57 +0200
Committed: 2026-09-01 12:39:57 +0200
Move checks into the ScreenAnnotation.#isPlayAction method
This avoids duplicating these checks in the ScreenAnnotation.#renditionActions method, which is a tiny bit shorter.
Files Modified:
- src/core/annotation.js
e7c8b3ea76a28e15ed6fd4f5dbc82eb36ebc00ab by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/e7c8b3ea76a28e15ed6fd4f5dbc82eb36ebc00ab
Authored: 2026-08-31 16:38:24 +0200
Committed: 2026-08-31 16:38:24 +0200
Remove the unused fallback parameter from L10n.prototype.get
This parameter hasn't been used anywhere in the code-base after the introduction of Fluent, hence it can simply be removed now.
Furthermore, note also that the L10n.prototype.get method itself is not used very much nowadays.
Files Modified:
- web/l10n.js
268b6a421751c3c071c0729ec61779f0b5002739 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/268b6a421751c3c071c0729ec61779f0b5002739
Authored: 2026-08-31 12:34:28 +0200
Committed: 2026-08-31 12:34:28 +0200
Get the l10n arguments at once in PDFDocumentProperties.prototype.#parsePageSize
Given that Fluent supports localizing multiple strings "at once", we can replace the current two or three calls (depending on page size) with just a single one.
This also, indirectly, improves test coverage of the L10n class since the "multiple ids branch" previously wasn't used anywhere in the code-base.
Files Modified:
- web/pdf_document_properties.js
26341dcdbd048398a517a66cc2c716ec16b1df9f by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/26341dcdbd048398a517a66cc2c716ec16b1df9f
Authored: 2026-08-31 11:50:34 +0200
Committed: 2026-08-31 11:57:30 +0200
Add JSDoc linting
Enable rules that validate existing JSDoc comments and fix the reported issues.
Files Modified:
- eslint.config.mjs
- external/check_l10n/check_l10n.mjs
- package-lock.json
- package.json
- src/core/annotation.js
- src/core/base_stream.js
- src/core/catalog.js
- src/core/core_utils.js
- src/core/crypto.js
- src/core/editor/pdf_editor.js
- src/core/evaluator.js
- src/core/file_spec.js
- src/core/font_substitutions.js
- src/core/fonts.js
- src/core/fonts_utils.js
- src/core/image.js
- src/core/parser.js
- src/core/pdf_manager.js
- src/core/postscript/ast.js
- src/core/postscript/js_evaluator.js
- src/core/postscript/wasm_compiler.js
- src/core/sound.js
- src/core/struct_tree.js
- src/core/xfa/xfa_object.js
- src/core/xml_parser.js
- src/display/annotation_layer.js
- src/display/annotation_storage.js
- src/display/api.js
- src/display/canvas.js
- src/display/canvas_dependency_tracker.js
- src/display/content_disposition.js
- src/display/display_utils.js
- src/display/draw_layer.js
- src/display/editor/annotation_editor_layer.js
- src/display/editor/comment.js
- src/display/editor/draw.js
- src/display/editor/drawers/freedraw.js
- src/display/editor/drawers/highlight.js
- src/display/editor/drawers/outline.js
- src/display/editor/editor.js
- src/display/editor/tools.js
- src/display/filter_factory.js
- src/display/page_viewport.js
- src/display/pages_mapper.js
- src/display/pdf_objects.js
- src/display/text_layer.js
- src/display/touch_manager.js
- src/display/webgpu.js
- src/display/worker_options.js
- src/display/xfa_layer.js
- src/display/xfa_text.js
- src/license_header_libre.js
- src/pdf.sandbox.external.js
- src/shared/base_pdf_stream.js
- src/shared/message_handler.js
- src/shared/util.js
- test/driver.js
- test/integration/text_layer_spec.mjs
- web/annotation_editor_layer_builder.js
- web/annotation_editor_params.js
- web/annotation_layer_builder.js
- web/app.js
- web/app_options.js
- web/base_tree_viewer.js
- web/chromecom.js
- web/draw_layer_builder.js
- web/event_utils.js
- web/external_services.js
- web/firefoxcom.js
- web/genericl10n.js
- web/grab_to_pan.js
- web/internal/canvas_context_details_view.js
- web/internal/multiline_view.js
- web/internal/split_view.js
- web/internal/tree_view.js
- web/password_prompt.js
- web/pdf_attachment_viewer.js
- web/pdf_cursor_tools.js
- web/pdf_document_properties.js
- web/pdf_find_controller.js
- web/pdf_history.js
- web/pdf_layer_viewer.js
- web/pdf_link_service.js
- web/pdf_outline_viewer.js
- web/pdf_page_view.js
- web/pdf_presentation_mode.js
- web/pdf_rendering_queue.js
- web/pdf_scripting_manager.js
- web/pdf_text_extractor.js
- web/pdf_thumbnail_view.js
- web/pdf_thumbnail_viewer.js
- web/pdf_viewer.js
- web/preferences.js
- web/renderable_view.js
- web/secondary_toolbar.js
- web/sidebar.js
- web/struct_tree_layer_builder.js
- web/text_accessibility.js
- web/text_highlighter.js
- web/text_layer_builder.js
- web/toolbar-geckoview.js
- web/toolbar.js
- web/ui_utils.js
- web/views_manager.js
- web/xfa_layer_builder.js
316e03cef4c1a362e988c682c8962922117b28f9 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/316e03cef4c1a362e988c682c8962922117b28f9
Authored: 2026-08-31 09:43:06 +0200
Committed: 2026-08-31 09:43:06 +0200
Set deployment: false on the code-coverage environment jobs
This avoids creating deployment objects, and the associated pull request
timeline entries, for jobs that only need the environment secrets.
Files Modified:
- .github/workflows/ci.yml
- .github/workflows/coverage_browser_tests.yml
- .github/workflows/font_tests.yml
- .github/workflows/integration_tests.yml
- .github/workflows/unit_tests.yml
5daae077a9f8d1d47de1b8c1b51ae2d79474903b by Dmitry Rantovov <rantovov5@gmail.com>
https://github.com/mozilla/pdf.js/commit/5daae077a9f8d1d47de1b8c1b51ae2d79474903b
Authored: 2026-08-30 19:23:37 +0300
Committed: 2026-08-30 19:23:37 +0300
Fix four JSDoc param entries that do not match the signatures
Files Modified:
- src/display/canvas_dependency_tracker.js
- src/display/editor/annotation_editor_layer.js
- src/display/editor/draw.js
- src/display/editor/tools.js
284a66b6ead7eb42fd5032639f99995bd299e60f by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/284a66b6ead7eb42fd5032639f99995bd299e60f
Authored: 2026-08-30 14:31:31 +0200
Committed: 2026-08-30 14:35:09 +0200
Implement unit tests for the error cases in src/core/xml_parser.js
This improves coverage of the file because the error cases were
previously untested according to the coverage report.
Files Modified:
- src/core/xml_parser.js
- test/unit/xml_spec.js
90400390cbb581e1ace371a99f0af21ca9263ef6 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/90400390cbb581e1ace371a99f0af21ca9263ef6
Authored: 2026-08-30 14:34:46 +0200
Committed: 2026-08-30 14:34:46 +0200
Use arrow functions consistently with Promise catch methods
This improves consistency in the code-base, and it's a tiny bit shorter which never hurts.
Files Modified:
- src/core/document.js
- src/core/evaluator.js
- src/display/api.js
- test/driver.js
- test/test.mjs
0c6a7f11663f9a8e53b4763c663e580ce7df5aba by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/0c6a7f11663f9a8e53b4763c663e580ce7df5aba
Authored: 2026-08-30 14:29:07 +0200
Committed: 2026-08-30 14:31:09 +0200
Include updated engine specification in package-lock.json
It was erroneously only introduced in package.json in the commit that
upgraded postcss-discard-comments to version 9.0.0, and thus shows up
as a new change after a clean npm install.
Fixes 21b00b9.
Files Modified:
- package-lock.json
ffb904cc63a628265d2902b9f79d6b9ac294febd by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/ffb904cc63a628265d2902b9f79d6b9ac294febd
Authored: 2026-08-29 20:34:34 +0200
Committed: 2026-08-29 20:34:34 +0200
Fix the adjacent-page reordering integration test
Files Modified:
- test/integration/reorganize_pages_spec.mjs
d0fce362b40aa4bc37843e8c23ec2832fbb50866 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/d0fce362b40aa4bc37843e8c23ec2832fbb50866
Authored: 2026-08-29 18:15:41 +0200
Committed: 2026-08-29 19:49:33 +0200
Lower the protocol delay for Chrome tests
Analogous to commit c66f9f2 this commit reduces the Chrome-specific
delay from 3 to 2 milliseconds to speed up the Chrome tests and to bring
them closer to Firefox in terms of runtime. Locally the runtime of
npx gulp integrationtest --noFirefox went from 665 seconds on master
to 526 seconds with this commit applied.
Note that eventually we wish to get rid of this Chrome-specific setting,
which should possible now that the known sources of intermittent
failures have been addressed, but to have more confidence in that change
and to make sure we didn't miss any we do in small increments so that it
can settle and be monitored for a while.
Files Modified:
- test/test.mjs
000fa48460e478ecaf111f06ba16263b3ffeb1d8 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/000fa48460e478ecaf111f06ba16263b3ffeb1d8
Authored: 2026-08-29 18:27:39 +0200
Committed: 2026-08-29 19:38:57 +0200
Remove the services.settings.server preference override for Firefox tests
This value is now correctly set upstream since Puppeteer 25.9.0; see
https://github.com/puppeteer/puppeteer/commit/d203988b85fca13a8967c57a65f0ac3cdf450657.
Files Modified:
- test/test.mjs
356cfddf0319250fcc2f0474166577f9cf580755 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/356cfddf0319250fcc2f0474166577f9cf580755
Authored: 2026-08-29 15:17:20 +0200
Committed: 2026-08-29 18:19:46 +0200
Upgrade jasmine to version 7.0.0
This is a major version bump, and the changelog at
https://github.com/jasmine/jasmine-npm/blob/main/release_notes/7.0.0.md
and the migration guide at
https://jasmine.github.io/upgrade-guides/7.0#browser-boot-changes
indicate two breaking changes that impact us:
- Jasmine's
loadConfig()method is now async, so we need to await it. - The browser boot process has been simplified to remove boilerplate, so
since we have custom boot files we need to update them according to
https://github.com/jasmine/jasmine/blob/v7.0.0/lib/jasmine-core/boot.js,
which means we no longer used the removedjasmineRequireglobal.
More context about the redesigned boot process can be found at
https://github.com/jasmine/jasmine/issues/2094.
Files Modified:
- package-lock.json
- package.json
- test/font/jasmine-boot.js
- test/integration/jasmine-boot.js
- test/unit/jasmine-boot.js
21b00b95e581e6d9f828de07344c4e35ea6cb709 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/21b00b95e581e6d9f828de07344c4e35ea6cb709
Authored: 2026-08-29 15:14:08 +0200
Committed: 2026-08-29 18:18:53 +0200
Upgrade postcss-discard-comments to version 9.0.0
This is a major version bump, but the changelog at
https://github.com/cssnano/cssnano/blob/main/packages/postcss-discard-comments/CHANGELOG.md
and the migration guide at
https://cssnano.github.io/cssnano/blog/cssnano-9-migration-guide
don't indicate any breaking changes that should impact us.
Note that the new major version does require more recent Node.js
versions, so we bump the development versions for PDF.js accordingly.
Files Modified:
- package-lock.json
- package.json
501219a697287a9c2b8a2b123340cb92a3f5c233 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/501219a697287a9c2b8a2b123340cb92a3f5c233
Authored: 2026-08-29 17:15:53 +0200
Committed: 2026-08-29 17:22:55 +0200
Remove the unused totalLength getter from the OperatorList class
The only actual totalLength invocations, outside of the unit-tests, were removed in the previous commit and this is now dead code.
Files Modified:
- src/core/operator_list.js
- test/unit/evaluator_spec.js
0b1b07b02cde48da1e6e92759e3727d480308001 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/0b1b07b02cde48da1e6e92759e3727d480308001
Authored: 2026-08-29 10:11:25 +0200
Committed: 2026-08-29 17:08:30 +0200
Remove old info logging from the "GetOperatorList"/"GetTextContent" handlers (issue 21836)
Also remove an "ancient" comment, from the "GetOperatorList" handler, which no longer seems helpful.
Finally, since they're now unused, remove the return-values from the Page.prototype.getOperatorList method.
Files Modified:
- src/core/document.js
- src/core/worker.js
0ccb4ad9a8af73a927114e9bad3bde853f78eb2e by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/0ccb4ad9a8af73a927114e9bad3bde853f78eb2e
Authored: 2026-08-29 15:11:53 +0200
Committed: 2026-08-29 15:11:53 +0200
Upgrade eslint-plugin-unicorn to version 74.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v74.0.0
doesn't indicate any breaking changes that should impact us.
Files Modified:
- package-lock.json
- package.json
7001143fae225ae244457f90861c657b0358a883 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/7001143fae225ae244457f90861c657b0358a883
Authored: 2026-08-29 15:10:12 +0200
Committed: 2026-08-29 15:10:59 +0200
Update dependencies to the most recent versions
Files Modified:
- gulpfile.mjs
- package-lock.json
- package.json
409cc38029dd2a2337f6fcb78fd750bfd5d83536 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/409cc38029dd2a2337f6fcb78fd750bfd5d83536
Authored: 2026-08-29 14:53:19 +0200
Committed: 2026-08-29 14:53:19 +0200
Bump the stable version in pdfjs.config
Files Modified:
- pdfjs.config
67c035f451867ada7994b4720fb9a319c6ca45ef by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/67c035f451867ada7994b4720fb9a319c6ca45ef
Authored: 2026-08-29 13:44:48 +0200
Committed: 2026-08-29 13:52:08 +0200
Inline the PDFDocument.prototype._parseHasJSActions method
This code is short and simple enough that it can just be inlined in the hasJSActions getter.
Files Modified:
- src/core/document.js
c58a2758f73480f46bce8769e5392d3f2ff3e08d by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/c58a2758f73480f46bce8769e5392d3f2ff3e08d
Authored: 2026-08-29 13:35:19 +0200
Committed: 2026-08-29 13:52:00 +0200
Move some WorkerTask class field definitions out of the constructor
Also, make use of actually private fields in one case.
Files Modified:
- src/core/worker.js
159dca9e0efd96915246be019877d220abe1d62a by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/159dca9e0efd96915246be019877d220abe1d62a
Authored: 2026-08-28 23:01:15 +0200
Committed: 2026-08-28 23:01:15 +0200
Remove the unused getOutputLength method from the ColorSpace classes (PR 21637 follow-up)
The only actual getOutputLength call-site, outside of the unit-tests, was removed in PR 21637 and these methods are now unused.
This code can always be easily re-instated if needed, thanks to version control, so let's avoid shipping dead code in the builds.
Files Modified:
- src/core/colorspace.js
- src/core/icc_colorspace.js
- test/unit/colorspace_spec.js
289592267e605d79ead0450318f6b8a5b22fd37e by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/289592267e605d79ead0450318f6b8a5b22fd37e
Authored: 2026-08-28 15:07:17 +0200
Committed: 2026-08-28 15:07:17 +0200
Improve unit-test coverage for the getViewerPreferences functionality
Files Modified:
- test/unit/api_spec.js
16b94d1565482f34a7726adc713516418f5a8714 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/16b94d1565482f34a7726adc713516418f5a8714
Authored: 2026-08-28 13:56:20 +0200
Committed: 2026-08-28 13:57:30 +0200
[api-minor] Convert markInfo to return data in a Map
Note: This functionality isn't currently used in the default viewer.
Files Modified:
- src/core/catalog.js
- test/unit/api_spec.js
651ee701da2392e081132c2875b55b6e252238a4 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/651ee701da2392e081132c2875b55b6e252238a4
Authored: 2026-08-21 19:34:05 +0200
Committed: 2026-08-26 20:57:43 +0200
Account for the Firefox font size quantization in the text layer
Firefox rounds the font size set on a canvas 2d context, once divided by
the device pixel ratio, to 7 bits of precision. Hence measureText can
return a width up to ~1% off the one the spans are laid out with, which
made --scale-x slightly wrong in a zoom dependent way.
Measure with a size left untouched by that rounding and rescale the
returned width, which is linear in the font size.
Files Modified:
- src/display/text_layer.js
3d282d446dd4085cd2aca25eb17cdbd228858c16 by Hyeryong Choi <hyeryong.choi@gmail.com>
https://github.com/mozilla/pdf.js/commit/3d282d446dd4085cd2aca25eb17cdbd228858c16
Authored: 2026-08-27 00:59:48 +0900
Committed: 2026-08-27 00:59:48 +0900
Fix incorrect text stroke width caused by stale pixel-width cache
Issue #20294 reports what appears to be a hidden black shape on page 5 of a PDF,
covering the text underneath. No hidden shape is actually being rendered: some
text is rendered with an excessively wide stroke, causing the glyph outlines to
cover an entire column.
getSinglePixelWidth computes the conversion factor from one screen pixel to
the current coordinate system, so its result depends on the current transform.
However, the result is cached in _cachedGetSinglePixelWidth, while showText
applies the text matrix to the canvas without invalidating that cache. A value
computed for one text run can therefore be reused by the next under a different
transform.
In the PDF from #20294, a run with a text-matrix scale of 0.1 caches 10, and
the following run at scale 36 reuses it instead of recomputing approximately
0.03, making the stroke about 334 times wider than expected.
Remove the cache rather than adding another invalidation in showText. Keeping
it correct would require reading the current transform to validate the cached
value, which accounts for most of the cost the cache was intended to avoid.
getSinglePixelWidth also has a single caller and is called at most once per
text-showing operation, so with correct invalidation there would be no
opportunity for a cache hit.
Files Added:
- test/pdfs/issue20294_reduced.pdf
Files Modified:
- src/display/canvas.js
- test/pdfs/.gitignore
- test/test_manifest.json
| Reporter | ||
Comment 1•2 months ago
|
||
| TzXFvAm2RWm6Ec0Bo_2fcw | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=29bf3c600ab123b5668da8180580b0403621f572
| Reporter | ||
Comment 2•2 months ago
|
||
| Reporter | ||
Comment 3•2 months ago
|
||
| cEUk5VluT-WkCtsV-VJi1A | ||
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.
Comment 5•2 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Description
•