pdf.js/test
Jonas Jenwald 0c31320c12 [api-minor] Improve thumbnail handling in documents that contain interactive forms
To improve performance of the sidebar we use the page-canvases to generate the thumbnails whenever possible, since that avoids unnecessary re-rendering when the sidebar is open. This works generally well, however there's an old problem in PDF documents that contain interactive forms (when those are enabled): Note how the thumbnails become partially (or fully) blank, since those Annotations are not included in the OperatorList.[1]

We obviously want to keep using the `PDFThumbnailView.setImage`-method for most documents, however we need a way to skip it only for those pages that contain interactive forms.
As it turns out it's unfortunately not all that simple to tell, after the fact, from looking only at the OperatorList that some Annotations were skipped. While it might have been possible to try and infer that in the viewer, it'd not have been pretty considering that at the time when rendering finishes the annotationLayer has not yet been built.
The overall simplest solution that I could come up with, was instead to include a *summary* of the interactive form-state when doing the final "flushing" of the OperatorList and expose that information in the API.

---
[1] Some examples from our test-suite: `annotation-tx2.pdf` where the thumbnail is completely blank, and `bug1737260.pdf` where the thumbnail is missing the "buttons" found on the page.
2022-07-30 16:53:32 +02:00
..
chromium Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
font Update ttx from version 2.5 to version 3.19.0 2022-07-10 21:18:36 +02:00
integration [Editor] Avoid to slightly move ink editor when undoing/redoing 2022-07-29 16:53:03 +02:00
pdfs Fix wrong order of arguments when calling the CipherTransform ctor (bug 1782186) 2022-07-29 12:46:45 +02:00
resources Use more for...of loops in the code-base 2022-07-17 16:18:54 +02:00
stats Use more for...of loops in the code-base 2022-07-17 16:18:54 +02:00
ttx Update ttx from version 2.5 to version 3.19.0 2022-07-10 21:18:36 +02:00
types Add support for modern ECMAScript class features 2021-10-22 22:01:17 +02:00
unit [api-minor] Improve thumbnail handling in documents that contain interactive forms 2022-07-30 16:53:32 +02:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.js Enable the ESLint no-var rule in test/add_test.js 2021-03-14 10:25:51 +01:00
annotation_layer_builder_overrides.css Add an outline around popup trigger areas in ref-tests 2022-06-20 21:23:30 +02:00
downloadutils.js Make verifyManifestFiles fail for non-linked test-cases with a "link": true-entry 2021-09-10 09:51:34 +02:00
driver.js Call AnnotationLayer.setDimensions as part of the render/update-methods (PR 15036 follow-up) 2022-07-04 12:27:20 +02:00
integration-boot.js [Editor] Unselect correctly removed editors 2022-07-22 13:21:08 +02:00
test_manifest.json Fix wrong order of arguments when calling the CipherTransform ctor (bug 1782186) 2022-07-29 12:46:45 +02:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
test.js Disable canvas acceleration for linux tests 2022-07-15 13:31:37 +02:00
testutils.js Enable the no-var linting rule in test/testutils.js 2021-12-18 15:58:47 +01:00
text_layer_test.css Remove old prefixed CSS rules used with text tests 2022-02-20 18:01:22 +01:00
webserver.js Remove the LGTM configuration and inline disable comments (issue 13829) 2021-08-03 11:14:49 +02:00
xfa_layer_builder_overrides.css XFA - Fix xfaLink class to make links work (bug 1735738) 2021-10-29 11:39:33 -04:00