[Firefox] Avoid displaying the indeterminate loadingBar when disableStream=true
is set (PR 10714 follow-up)
While PR 10714 did address the `disableRange=true` case, it also managed to "break" the `disableStream=true` case instead since the indeterminate loadingBar is now displayed when it shouldn't; sorry about that! The solution is simple enough though, don't attempt to fallback to `_fullRequestReader.onProgress` when handling "incomplete" loading information.
This commit is contained in:
parent
8bbae79832
commit
5e9b606e7b
@ -81,18 +81,18 @@ var PDFDataTransportStream = (function PDFDataTransportStreamClosure() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onProgress: function PDFDataTransportStream_onDataProgress(evt) {
|
_onProgress: function PDFDataTransportStream_onDataProgress(evt) {
|
||||||
if (evt.total === undefined && this._rangeReaders.length > 0) {
|
if (evt.total === undefined) {
|
||||||
// Reporting to first range reader.
|
// Reporting to first range reader, if it exists.
|
||||||
var firstReader = this._rangeReaders[0];
|
let firstReader = this._rangeReaders[0];
|
||||||
if (firstReader.onProgress) {
|
if (firstReader && firstReader.onProgress) {
|
||||||
firstReader.onProgress({ loaded: evt.loaded, });
|
firstReader.onProgress({ loaded: evt.loaded, });
|
||||||
return;
|
}
|
||||||
}
|
} else {
|
||||||
}
|
let fullReader = this._fullRequestReader;
|
||||||
let fullReader = this._fullRequestReader;
|
if (fullReader && fullReader.onProgress) {
|
||||||
if (fullReader && fullReader.onProgress) {
|
fullReader.onProgress({ loaded: evt.loaded, total: evt.total, });
|
||||||
fullReader.onProgress({ loaded: evt.loaded, total: evt.total, });
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onProgressiveDone() {
|
_onProgressiveDone() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user