1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Merge pull request #13899 from Snuffleupagus/includeAnnotationStorage-fix-caching

[Regression] Re-factor the *internal* `includeAnnotationStorage` handling, since it's currently subtly wrong
This commit is contained in:
Tim van der Meij 2021-08-21 15:04:28 +02:00 committed by GitHub
commit db11ba024d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 133 additions and 77 deletions

View file

@ -320,7 +320,14 @@ class Page {
});
}
getOperatorList({ handler, sink, task, intent, annotationStorage }) {
getOperatorList({
handler,
sink,
task,
intent,
cacheKey,
annotationStorage = null,
}) {
const contentStreamPromise = this.getContentStream(handler);
const resourcesPromise = this.loadResources([
"ColorSpace",
@ -354,7 +361,7 @@ class Page {
this.nonBlendModesSet
),
pageIndex: this.pageIndex,
intent,
cacheKey,
});
return partialEvaluator
@ -377,7 +384,7 @@ class Page {
pageOpList.flush(true);
return { length: pageOpList.totalLength };
}
const renderForms = !!(intent & RenderingIntentFlag.ANNOTATION_FORMS),
const renderForms = !!(intent & RenderingIntentFlag.ANNOTATIONS_FORMS),
intentAny = !!(intent & RenderingIntentFlag.ANY),
intentDisplay = !!(intent & RenderingIntentFlag.DISPLAY),
intentPrint = !!(intent & RenderingIntentFlag.PRINT);

View file

@ -688,6 +688,7 @@ class WorkerMessageHandler {
sink,
task,
intent: data.intent,
cacheKey: data.cacheKey,
annotationStorage: data.annotationStorage,
})
.then(