mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Introduce some logical assignment in the src/core/
folder
This commit is contained in:
parent
317abd6d07
commit
d950b91c4e
20 changed files with 62 additions and 103 deletions
|
@ -261,8 +261,7 @@ class WorkerMessageHandler {
|
|||
pdfManagerArgs.source = pdfStream;
|
||||
pdfManagerArgs.length = fullRequest.contentLength;
|
||||
// We don't need auto-fetch when streaming is enabled.
|
||||
pdfManagerArgs.disableAutoFetch =
|
||||
pdfManagerArgs.disableAutoFetch || fullRequest.isStreamingSupported;
|
||||
pdfManagerArgs.disableAutoFetch ||= fullRequest.isStreamingSupported;
|
||||
|
||||
newPdfManager = new NetworkPdfManager(pdfManagerArgs);
|
||||
// There may be a chance that `newPdfManager` is not initialized for
|
||||
|
@ -661,7 +660,6 @@ class WorkerMessageHandler {
|
|||
});
|
||||
}
|
||||
|
||||
const lastXRefStreamPos = xref.lastXRefStreamPos;
|
||||
newXrefInfo = {
|
||||
rootRef: xref.trailer.getRaw("Root") || null,
|
||||
encryptRef: xref.trailer.getRaw("Encrypt") || null,
|
||||
|
@ -669,8 +667,7 @@ class WorkerMessageHandler {
|
|||
infoRef: xref.trailer.getRaw("Info") || null,
|
||||
info: infoObj,
|
||||
fileIds: xref.trailer.get("ID") || null,
|
||||
startXRef:
|
||||
lastXRefStreamPos === null ? startXRef : lastXRefStreamPos,
|
||||
startXRef: xref.lastXRefStreamPos ?? startXRef,
|
||||
filename,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue