Merge pull request #10995 from Snuffleupagus/app-rm-one-setFileSize
Remove an unnecessary `PDFDocumentProperties.setFileSize` call, relevant for the Firefox built-in viewer, and use the "normal" code-path in `PDFViewerApplication.open` instead
This commit is contained in:
commit
71d9f5f860
16
web/app.js
16
web/app.js
@ -512,11 +512,7 @@ let PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
this.externalServices.initPassiveLoading({
|
this.externalServices.initPassiveLoading({
|
||||||
onOpenWithTransport(url, length, transport) {
|
onOpenWithTransport(url, length, transport) {
|
||||||
PDFViewerApplication.open(url, { range: transport, });
|
PDFViewerApplication.open(url, { length, range: transport, });
|
||||||
|
|
||||||
if (length) {
|
|
||||||
PDFViewerApplication.pdfDocumentProperties.setFileSize(length);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onOpenWithData(data) {
|
onOpenWithData(data) {
|
||||||
PDFViewerApplication.open(data);
|
PDFViewerApplication.open(data);
|
||||||
@ -659,11 +655,13 @@ let PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args) {
|
if (args) {
|
||||||
for (let prop in args) {
|
for (let key in args) {
|
||||||
if (prop === 'length') {
|
const value = args[key];
|
||||||
this.pdfDocumentProperties.setFileSize(args[prop]);
|
|
||||||
|
if (key === 'length') {
|
||||||
|
this.pdfDocumentProperties.setFileSize(value);
|
||||||
}
|
}
|
||||||
parameters[prop] = args[prop];
|
parameters[key] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user