Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland of Improve linearized pdf load/show time."
Use received bytes count as the value for progress, not chunks count. Reason for reland: The fix of revert reason has been added. Bug: 755061 Original change's description: > Revert "Reland of Improve linearized pdf load/show time." > > This reverts commit 9a6d148. > > Reason for revert: https://crbug.com/755061. This appears to be > causing a serious regression in loading. The loading bar does not > appear as expected and appears all at once at the end as the screen > displays. There is 5-6seconds of nothing happening which makes it look > like the browser has stopped working. > > > Original change's description: > > Reland of Improve linearized pdf load/show time. > > > > XFA forms loading has been fixed. > > Now for document with single non XFA page, the form load first. > > This is necessary for correct loading pages, because in XFA document > > the page count and them contents may be changed after loading form. > > > > See > > https://codereview.chromium.org/2558573002/ > > > > For test this: > > build chromium pdf with XFA support > > and open any document from > > https://www.idrsolutions.com/jpdfforms/xfa-html5-example-conversions/ > > > > Original CL: > > https://codereview.chromium.org/2455403002/ > > > > Original description: > > Improve linearized pdf load/show time. > > Reduce Pdf Plugin's count of reconnects. > > Add tests for PDFPlugin DocumentLoader. > > > > DocumentLoader was splitted into separate components, and missing tests was added for them. > > > > The main ideas in this CL are: > > > > 1) Do not reset browser initiated connection at start (includes case when we can use range requests), if we request data near current downloading position. > > 2) Request as much data as we can on each request, and continue loading data using current range request. (like tape rewind) > > 3) Isolate RangeRequest logic into DocumentLoader. Method OnPendingRequestComplete is called, when we receive requested data (main connection, or Range connection). (like tape playing without rewing). > > 4) Fill this logic by tests. > > > > Example URL: > > http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf > > Comparison of changes: > > https://drive.google.com/file/d/0BzWfMBOuik2QNGg0SG93Y3lpUlE/view?usp=sharing > > > > Change-Id: I97bb25d2e82bcb4ba2e060af8128f49b9c0680d9 > > Reviewed-on: https://chromium-review.googlesource.com/581292 > > Reviewed-by: Robert Sesek <rsesek@chromium.org> > > Reviewed-by: Dan Sinclair <dsinclair@chromium.org> > > Commit-Queue: Art Snake <art-snake@yandex-team.ru> > > Cr-Commit-Position: refs/heads/master@{#489755} > > TBR=rsesek@chromium.org Change-Id: I78e10565f639c26faae29b3cf854419208af8665 Reviewed-on: https://chromium-review.googlesource.com/615302 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: (000 09-08 - 09-18) dsinclair <dsinclair@chromium.org> Cr-Commit-Position: refs/heads/master@{#501344}
- Loading branch information