mozilla/pdf.js — pull request #2719 by mduan (2013-02-13 18:54:39+00:00)
Title: Implement progressive loading of PDFs

This implements progressive loading of the PDF using an implementation similar to that described in #1108.

**Note:** This is still a work in progress, so it's incomplete and a bit messy. It is **NOT** ready to be merged.

Some of the things that still have to be done are:
- Integrate w/ extension
- Fallback to fetching entire PDF if range requests are not supported
- When there are no PDF chunks that are actively being requested, continue fetching PDF chunks sequentially
- Fetching the current page first when the user changes pages
- More optimization/heuristics
- Possibly more optimizations specifically for linearized PDFs
- Code cleanup