PDFjs should stop using XHR.responseType="moz-chunked-arraybuffer"
Categories
(Firefox :: PDF Viewer, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: baku, Assigned: robwu)
References
Details
Attachments
(1 file, 1 obsolete file)
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Comment 2•6 years ago
|
||
yury, are we ready to proceed here? I'm not sure what still needs to be done, given that PDF.js 2 has shipped with Firefox for a while (and so has ReadableStream).
Comment 3•6 years ago
|
||
:Snuffleupagus, would you happen to know if we still need -moz-chunked-arraybuffer for pdf.js in central? If not, maybe we can try to remove it.
Comment hidden (obsolete) |
Comment 5•6 years ago
|
||
Looking at comment 3 again, I cannot help feeling that there's a few different questions being asked. Hence I'll obsolete my previous comment and try break this up into a hopefully more helpful response:
-
Can the platform support, i.e. https://searchfox.org/mozilla-central/rev/486b64e4bff86b7988af8c8b80845404ad197533/dom/webidl/XMLHttpRequest.webidl#25 and any related code, for
moz-chunked-arraybuffer
be removed now?Yes, as far as I'm concerned. (I'd guess that this is the most important part of the question, from a wider Firefox perspective.)
-
Can the
moz-chunked-arraybuffer
support be removed from the Firefox-specific version of PDF.js now?Yes, because as far as I can tell that particular branch is actually dead code; please see the attached patch for additional information.
-
Can the
moz-chunked-arraybuffer
support be removed from the generic PDF.js library?No, not until both
Fetch
andReadableStream
support is available in Firefox ESR. However, as can be seen in https://github.com/mozilla/pdf.js/blob/bce9ff7347266e18326fff52c201faba04a96bd7/src/display/network.js#L56-L73 feature detection is used, hence I cannot see the harm in leaving this intact for the time being.
Unless I'm missing something here, this last point should be irrelevant for the platform removal ofmoz-chunked-arraybuffer
though.
The above is my take, as an occasional PDF.js contributor, on the state of this bug.
Thomas, does this help clarify the current situation?
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Ah, thank you for the details, that does clarify things.
I was asking as I'd like to try removing platform support for -moz-chunked-arraybuffer in bug 1120171, and this seemed to be the only obvious blocker I could find.
Assignee | ||
Comment 8•6 years ago
|
||
Reviewing has moved off Bugzilla to Phabricator.
Jonas, can you and do you want to upload your patch to Phabricator? (see https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html)
If not, then I am willing to submit a patch to remove the unused code to get the ball rolling.
Comment 9•6 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #8)
Reviewing has moved off Bugzilla to Phabricator.
I'm aware of that, and find it to be a very unfortunate decision.
Jonas, can you and do you want to upload your patch to Phabricator? (see https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html)
It seems that you need to enable 2FA in order to use Phabricator, and I don't have a device that I'm able to use for that purpose.
If not, then I am willing to submit a patch to remove the unused code to get the ball rolling.
It would be great if you could submit my patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1411865#c6, since I'm not able to myself (unless Mozilla is willing to send me a 2FA device); thanks for offering to help!
Assignee | ||
Comment 10•6 years ago
|
||
onProgressiveData
callback is never set, so everything that is
conditional on it can be removed.loadedRequests
has never been used, it can be removed.- Several other methods are unused and not part of any interface;
These can also be removed.
Comment 11•6 years ago
|
||
Rob, shall I help get the patch here across the finish line, given Jonas cannot access Phabricator?
Assignee | ||
Comment 12•6 years ago
|
||
I have already submitted the patch (with more cleanups besides Jonas' changes - see https://phabricator.services.mozilla.com/D24745).
The only blocker on this bug is a review from Brendan.
Assignee | ||
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
bugherder |
Description
•