mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-27 02:25:47 +02:00
Fix the issue in the ref test tracemonkey-extract_0_2_12
When getting the extracted document, the url for the wasms wasn't passed and consequently the icc-based color wasn't rendered as expected because of the wasm for qcms.
This commit is contained in:
parent
3127492a38
commit
dde0beafc6
@ -666,7 +666,7 @@ class Driver {
|
|||||||
task.isOffscreenCanvasSupported === false ? false : undefined;
|
task.isOffscreenCanvasSupported === false ? false : undefined;
|
||||||
const disableFontFace = task.disableFontFace === true;
|
const disableFontFace = task.disableFontFace === true;
|
||||||
|
|
||||||
const loadingTask = getDocument({
|
const documentOptions = {
|
||||||
url: new URL(task.file, window.location),
|
url: new URL(task.file, window.location),
|
||||||
password: task.password,
|
password: task.password,
|
||||||
cMapUrl: CMAP_URL,
|
cMapUrl: CMAP_URL,
|
||||||
@ -682,12 +682,15 @@ class Driver {
|
|||||||
isOffscreenCanvasSupported,
|
isOffscreenCanvasSupported,
|
||||||
styleElement: xfaStyleElement,
|
styleElement: xfaStyleElement,
|
||||||
disableFontFace,
|
disableFontFace,
|
||||||
});
|
};
|
||||||
|
const loadingTask = getDocument(documentOptions);
|
||||||
let promise = loadingTask.promise;
|
let promise = loadingTask.promise;
|
||||||
|
|
||||||
if (!this.masterMode && task.type === "extract") {
|
if (!this.masterMode && task.type === "extract") {
|
||||||
promise = promise.then(async doc => {
|
promise = promise.then(async doc => {
|
||||||
const data = await doc.extractPages([
|
const extractedDocumentOptions = { ...documentOptions };
|
||||||
|
delete extractedDocumentOptions.url;
|
||||||
|
extractedDocumentOptions.data = await doc.extractPages([
|
||||||
{
|
{
|
||||||
document: null,
|
document: null,
|
||||||
includePages: task.includePages,
|
includePages: task.includePages,
|
||||||
@ -695,7 +698,7 @@ class Driver {
|
|||||||
]);
|
]);
|
||||||
await loadingTask.destroy();
|
await loadingTask.destroy();
|
||||||
delete task.includePages;
|
delete task.includePages;
|
||||||
return getDocument(data).promise;
|
return getDocument(extractedDocumentOptions).promise;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user