Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Issue 1353093003: Support linearized loading (Closed)

Created:
5 years, 3 months ago by jun_fang
Modified:
5 years, 1 month ago
CC:
pdfium-reviews_googlegroups.com, kai_jing, steven_wu, 'jeff breidenbach'
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 55

Patch Set 2 : Add embedder tests #

Patch Set 3 : Address the comments from code review #

Patch Set 4 : #

Total comments: 49

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Total comments: 28

Patch Set 7 : #

Patch Set 8 : Change pdfium_test and add the third return value to indicate an error #

Total comments: 2

Patch Set 9 : #

Total comments: 1

Patch Set 10 : Add an argument 'must_linearize' in OpenDocument #

Total comments: 7

Patch Set 11 : #

Total comments: 21

Patch Set 12 : #

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+808 lines, -273 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fpdfapi/fpdf_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +24 lines, -25 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 26 chunks +530 lines, -116 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -1 line 0 comments Download
A core/src/fpdfapi/fpdf_parser/parser_int.h View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
M fpdfsdk/src/fpdf_dataavail.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -11 lines 0 comments Download
M pdfium.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M public/fpdf_dataavail.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +47 lines, -39 lines 0 comments Download
M samples/pdfium_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +99 lines, -71 lines 0 comments Download
M testing/embedder_test.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M testing/embedder_test.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +37 lines, -9 lines 0 comments Download
A testing/resources/feature_linearized_loading.pdf View 1 Binary file 0 comments Download

Messages

Total messages: 45 (2 generated)
jun_fang
I am working on some test cases for this patch. https://codereview.chromium.org/1353093003/diff/1/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/1353093003/diff/1/BUILD.gn#newcode299 ...
5 years, 3 months ago (2015-09-21 02:26:09 UTC) #2
jun_fang
https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/parser_int.h File core/src/fpdfapi/fpdf_parser/parser_int.h (right): https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/parser_int.h#newcode5 core/src/fpdfapi/fpdf_parser/parser_int.h:5: // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com ...
5 years, 3 months ago (2015-09-21 12:18:08 UTC) #3
Tom Sepez
We're going to need a lot more checking on the values in the untruted bit-stream. ...
5 years, 3 months ago (2015-09-22 00:05:39 UTC) #4
jun_fang
https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode16 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:16: #include "./parser_int.h" On 2015/09/22 00:05:38, Tom Sepez wrote: > ...
5 years, 3 months ago (2015-09-22 12:42:33 UTC) #5
jun_fang
On 2015/09/22 12:42:33, jun_fang wrote: > https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp > File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): > > https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode16 > ...
5 years, 3 months ago (2015-09-22 13:15:27 UTC) #6
Tom Sepez
https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3757 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:3757: CPDF_HintTables* pHintTables = new CPDF_HintTables(this, pDict); On 2015/09/22 12:42:32, ...
5 years, 3 months ago (2015-09-22 15:16:43 UTC) #7
jun_fang
On 2015/09/22 15:16:43, Tom Sepez wrote: > https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp > File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): > > https://codereview.chromium.org/1353093003/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3757 ...
5 years, 3 months ago (2015-09-22 15:58:43 UTC) #8
Tom Sepez
> > > There is no way to assign pHintTables to m_pHintTables. > > See ...
5 years, 3 months ago (2015-09-22 18:34:18 UTC) #9
Tom Sepez
Jun, curious where the test file came from -- who authored it? https://codereview.chromium.org/1353093003/diff/60001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h ...
5 years, 3 months ago (2015-09-22 18:58:31 UTC) #10
Tom Sepez
https://codereview.chromium.org/1353093003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3090 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:3090: m_bSupportHintTable = bSupportHintTable; Why did we lose this initialization? ...
5 years, 3 months ago (2015-09-22 19:17:59 UTC) #11
Lei Zhang
https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn#newcode299 BUILD.gn:299: "core/src/fpdfapi/fpdf_parser/parser_int.h" missing trailing comma https://codereview.chromium.org/1353093003/diff/60001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/60001/core/include/fpdfapi/fpdf_parser.h#newcode37 ...
5 years, 3 months ago (2015-09-22 23:33:43 UTC) #12
jun_fang
https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn#newcode299 BUILD.gn:299: "core/src/fpdfapi/fpdf_parser/parser_int.h" On 2015/09/22 23:33:42, Lei Zhang wrote: > missing ...
5 years, 3 months ago (2015-09-23 12:26:59 UTC) #13
jun_fang
On 2015/09/23 12:26:59, jun_fang wrote: > https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn > File BUILD.gn (right): > > https://codereview.chromium.org/1353093003/diff/60001/BUILD.gn#newcode299 > ...
5 years, 3 months ago (2015-09-23 12:32:37 UTC) #14
Tom Sepez
FYI, the bug number for the BUG= line is 446715
5 years, 3 months ago (2015-09-23 19:10:31 UTC) #15
Tom Sepez
https://codereview.chromium.org/1353093003/diff/60001/public/fpdf_dataavail.h File public/fpdf_dataavail.h (right): https://codereview.chromium.org/1353093003/diff/60001/public/fpdf_dataavail.h#newcode18 public/fpdf_dataavail.h:18: #define PDFFORM_NOTAVAIL 0 On 2015/09/23 12:26:59, jun_fang wrote: > ...
5 years, 3 months ago (2015-09-24 18:24:41 UTC) #16
jun_fang
https://codereview.chromium.org/1353093003/diff/80001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/80001/core/include/fpdfapi/fpdf_parser.h#newcode847 core/include/fpdfapi/fpdf_parser.h:847: #define PDF_FILE_UNKNOW -1 On 2015/09/24 18:24:40, Tom Sepez wrote: ...
5 years, 2 months ago (2015-09-28 08:17:23 UTC) #17
jbreiden
Very much looking forward to trying this out.
5 years, 2 months ago (2015-10-08 21:54:54 UTC) #18
jun_fang
5 years, 2 months ago (2015-10-14 11:45:32 UTC) #20
jun_fang
On 2015/10/14 11:45:32, jun_fang wrote: feature_linearized_loading.pdf was manually created by Foxit.
5 years, 2 months ago (2015-10-14 11:47:30 UTC) #21
Tom Sepez
Thanks for the test! https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h#newcode10 core/include/fpdfapi/fpdf_parser.h:10: #include "../../../public/fpdf_macro.h" this should just ...
5 years, 2 months ago (2015-10-14 16:57:45 UTC) #22
jun_fang
https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h#newcode10 core/include/fpdfapi/fpdf_parser.h:10: #include "../../../public/fpdf_macro.h" On 2015/10/14 16:57:45, Tom Sepez wrote: > ...
5 years, 2 months ago (2015-10-15 10:22:28 UTC) #23
Tom Sepez
https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h#newcode10 core/include/fpdfapi/fpdf_parser.h:10: #include "../../../public/fpdf_macro.h" > We don't include the whole header ...
5 years, 2 months ago (2015-10-15 16:20:04 UTC) #24
Tom Sepez
https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp (right): https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp#newcode24 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp:24: EXPECT_TRUE(OpenDocument("testing/resources/feature_linearized_loading.pdf")); On 2015/10/15 10:22:28, jun_fang wrote: > On 2015/10/14 ...
5 years, 2 months ago (2015-10-15 16:23:30 UTC) #25
Tom Sepez
On 2015/10/15 16:23:30, Tom Sepez wrote: > https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp > File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp (right): > > https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp#newcode24 ...
5 years, 2 months ago (2015-10-15 16:24:53 UTC) #26
jun_fang
https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h File core/include/fpdfapi/fpdf_parser.h (right): https://codereview.chromium.org/1353093003/diff/100001/core/include/fpdfapi/fpdf_parser.h#newcode10 core/include/fpdfapi/fpdf_parser.h:10: #include "../../../public/fpdf_macro.h" On 2015/10/15 16:20:04, Tom Sepez wrote: > ...
5 years, 2 months ago (2015-10-19 13:20:30 UTC) #27
yali_he
https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3721 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:3721: return FALSE; m_docStatus should be set as PDF_DATAAVAIL_DONE before ...
5 years, 2 months ago (2015-10-19 13:24:35 UTC) #28
Tom Sepez
https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp (right): https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp#newcode24 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp:24: EXPECT_TRUE(OpenDocument("testing/resources/feature_linearized_loading.pdf")); On 2015/10/19 13:20:30, jun_fang wrote: > On 2015/10/15 ...
5 years, 2 months ago (2015-10-19 16:36:07 UTC) #29
yali_he
https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/100001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3688 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:3688: return TRUE; m_docStatus should be set as PDF_DATAAVAIL_DONE before ...
5 years, 2 months ago (2015-10-21 07:07:44 UTC) #30
jun_fang
https://codereview.chromium.org/1353093003/diff/140001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/140001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3190 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:3190: if (!pHints) { It's checked in APIs. https://codereview.chromium.org/1353093003/diff/140001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode4493 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:4493: ...
5 years, 2 months ago (2015-10-21 11:08:12 UTC) #31
jun_fang
On 2015/10/21 11:08:12, jun_fang wrote: > https://codereview.chromium.org/1353093003/diff/140001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp > File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): > > https://codereview.chromium.org/1353093003/diff/140001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode3190 > ...
5 years, 2 months ago (2015-10-21 11:42:40 UTC) #32
Tom Sepez
https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h File public/fpdf_dataavail.h (right): https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h#newcode138 public/fpdf_dataavail.h:138: * PDF_DATA_ERROR: A common error is returned. It can't ...
5 years, 2 months ago (2015-10-21 17:53:08 UTC) #33
jun_fang
https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h File public/fpdf_dataavail.h (right): https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h#newcode138 public/fpdf_dataavail.h:138: * PDF_DATA_ERROR: A common error is returned. It can't ...
5 years, 2 months ago (2015-10-22 00:50:06 UTC) #34
jun_fang
On 2015/10/22 00:50:06, jun_fang wrote: > https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h > File public/fpdf_dataavail.h (right): > > https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h#newcode138 > ...
5 years, 1 month ago (2015-10-26 13:37:40 UTC) #35
Tom Sepez
On 2015/10/26 13:37:40, jun_fang wrote: > On 2015/10/22 00:50:06, jun_fang wrote: > > https://codereview.chromium.org/1353093003/diff/180001/public/fpdf_dataavail.h > ...
5 years, 1 month ago (2015-10-26 16:00:14 UTC) #36
jun_fang
Hi Tom and Lei, Please help to review patch 11. I raised some comments to ...
5 years, 1 month ago (2015-10-29 15:31:45 UTC) #37
jun_fang
https://codereview.chromium.org/1353093003/diff/200001/public/fpdf_dataavail.h File public/fpdf_dataavail.h (right): https://codereview.chromium.org/1353093003/diff/200001/public/fpdf_dataavail.h#newcode145 public/fpdf_dataavail.h:145: * generated download hints if any, until the function ...
5 years, 1 month ago (2015-10-29 15:36:00 UTC) #38
Tom Sepez
One comment, some nits, and why don't you fix all of your own comments before ...
5 years, 1 month ago (2015-10-29 16:20:17 UTC) #39
jun_fang
https://codereview.chromium.org/1353093003/diff/200001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1353093003/diff/200001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode2973 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:2973: ((CPDF_Object*)m_arrayAcroforms.GetAt(i))->Release(); On 2015/10/29 16:20:17, Tom Sepez wrote: > Why ...
5 years, 1 month ago (2015-10-30 06:02:43 UTC) #40
Tom Sepez
lgtm
5 years, 1 month ago (2015-10-30 19:36:31 UTC) #41
jun_fang
Committed patchset #13 (id:240001) manually as d946f3011984755b14d7dcfb05d572e870f93f3f (presubmit successful).
5 years, 1 month ago (2015-11-02 05:45:55 UTC) #42
dsinclair
On 2015/11/02 05:45:55, jun_fang wrote: > Committed patchset #13 (id:240001) manually as > d946f3011984755b14d7dcfb05d572e870f93f3f (presubmit ...
5 years, 1 month ago (2015-11-03 17:08:49 UTC) #43
Lei Zhang
On 2015/11/03 17:08:49, dsinclair wrote: > On 2015/11/02 05:45:55, jun_fang wrote: > > Committed patchset ...
5 years, 1 month ago (2015-11-09 19:57:58 UTC) #44
jun_fang
5 years, 1 month ago (2015-11-09 23:51:29 UTC) #45
Message was sent while issue was closed.
On 2015/11/09 19:57:58, Lei Zhang wrote:
> On 2015/11/03 17:08:49, dsinclair wrote:
> > On 2015/11/02 05:45:55, jun_fang wrote:
> > > Committed patchset #13 (id:240001) manually as
> > > d946f3011984755b14d7dcfb05d572e870f93f3f (presubmit successful).
> > 
> > 
> > It looks like this hasn't been merged to the XFA branch yet, is there
anything
> > that needs to be done to merge this into XFA?
> 
> Ping again. The longer we wait to merge to XFA, the more difficult it gets
> because the two branches diverges.

I will merge it to XFA branch today.

Powered by Google App Engine
This is Rietveld 408576698