Age | Commit message (Collapse) | Author |
|
This method always returns true, so make that assumption and clean up
dead code.
More cleanups will follow this one to remove the code that can now
be inferred to be dead.
Change-Id: I73f077561ab511a1c2c09ac6990ab5cdc5bfb055
Reviewed-on: https://pdfium-review.googlesource.com/32391
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Use one std::vector<>, too. As a result, make GetDecodeAndMaskArray()
update that member directly rather than forcing callers to assign to
it each time.
Change-Id: I51a039b9e8cce7ff885edf395622eaf6a5c4816a
Reviewed-on: https://pdfium-review.googlesource.com/32313
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL converts several asserts in the FX_Bidi code to continue instead
of asserting in the face of unexpected input.
A BIDI fuzzer has been added as well.
Bug: chromium:839695
Change-Id: If61f822bde7442c008d50be58f7cecffb6e5d658
Reviewed-on: https://pdfium-review.googlesource.com/32191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL simplifies the FormCalc method call generation when converted to
JavaScript. Currently we output the same chunk of code to run the
given method on an array or object per method call. This CL pulls out
the common execution code to a pfm_method_runner function which is used
instead.
An embedder test has been added to verify that method invocation from
formcalc works correctly.
Bug: chromium:814848
Change-Id: I1ec052eab051053fedcb464d57e0e15228b8c5a2
Reviewed-on: https://pdfium-review.googlesource.com/32372
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Cleaning up some nits that came in after my previous codec CL had gone
into the CQ.
BUG=pdfium:1080
Change-Id: I3845136d370f73c9c96ef732e95b8cf0c9c79d91
Reviewed-on: https://pdfium-review.googlesource.com/32351
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The source type value Gold results is just a logical grouping
label. Having a different value for each type will allow the Gold web
UI to have a set of labels at the top that allows you to easily switch
between specific test tool results.
Currently the test scripts are using the test directories 'corpus',
'javascript', and 'pixel', which seem like reasonable labels.
BUG=pdfium:1073
Change-Id: I893a1afeb3b87ffb84948c18ae3052b2dd6216ea
Reviewed-on: https://pdfium-review.googlesource.com/32350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Encapsulates transparency status instead of having it be a raw int.
Change-Id: I8b10dafa97da112795cf84c46cf416a0294551d5
Reviewed-on: https://pdfium-review.googlesource.com/32194
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Set the test data dir path correctly if PDFium is living inside another
project as third_party/pdfium.
BUG=chromium:841513
Change-Id: I565f7d97157e1769be8b7910f3c77d6d00015543
Reviewed-on: https://pdfium-review.googlesource.com/32314
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The order of the elements in the header is correct, but we
were clearing it early in the destructor itself.
Bug: 840695
Change-Id: I1585722fed8dc672ffd5e1dc9a1eea1c7c80f310
Reviewed-on: https://pdfium-review.googlesource.com/32311
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
https://pdfium-review.googlesource.com/c/pdfium/+/18333 introduced
several checks to prevent timeouts in JBig2. One of these is breaking
the PDF in the bug, so this CL removes that check.
Bug: chromium:841200
Change-Id: Ia75c699b7fddc26f0353b0d64349898c4d1f744d
Reviewed-on: https://pdfium-review.googlesource.com/32250
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Currently all of the BMP related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the BMP codec code if support
for BMP is turned off.
BUG=pdfium:1080
Change-Id: I56d40639a5a3631f9c601a1eef3f98873feac94f
Reviewed-on: https://pdfium-review.googlesource.com/32370
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the formcalc JS conversion code so that method calls no
longer generate exponential amounts of JavaScript.
Previously we'd duplicate the code to call into a method twice. This
would then generate twice once for arrays and once for other types of
object. This CL changes the code to wrap the actual method call into
a JavaScript function which will be used from both the array and
non-array calling code.
For the referenced bug, the generated JS originally needed a buffer of
365meg to generate. With this CL, it needs a buffer of 7.5k.
Bug: chromium:814840
Change-Id: Ibb5993fa52b7c13b20b325cf8848a306f82ae014
Reviewed-on: https://pdfium-review.googlesource.com/32312
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CJBig2_Context return methods as follows:
* Internal methods return JBig2_Result instead of int.
* Public methods return a bool (for success/failure) instead of int.
In a followup, several of the enum class values may be merged together
since they are not all needed.
Change-Id: Ifdab83b8037262370cd7c4a80e94aa94d59aa589
Reviewed-on: https://pdfium-review.googlesource.com/32310
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Instead of having const methods that return non-const pointers.
BUG=pdfium:234
Change-Id: I61495543f67229500dfcf2248e93468e9a9b23cf
Reviewed-on: https://pdfium-review.googlesource.com/32183
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instead of having const methods that return non-const pointers.
BUG=pdfium:234
Change-Id: I598e9b4f267f702e2e71001cfe3aa3c9e9d8c12f
Reviewed-on: https://pdfium-review.googlesource.com/32182
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ief6853cbfdb5dca0c81d76978075a2fd04989f41
Reviewed-on: https://pdfium-review.googlesource.com/8830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The owned copy needs to be modified, so it should be non-const. Whereas
the unowned copy can be const.
Add a GetClonedDict() method for accessing the modifiable dictionary.
Change-Id: Ia7f6bcc5f917864cd1bbc7b5000a86f6e433ae9a
Reviewed-on: https://pdfium-review.googlesource.com/32181
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Currently all of the GIF related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the GIF codec code if support
for GIF is turned off.
This also catches a few missed cases from previous CLs.
BUG=pdfium:1080
Change-Id: Ie7fe2d894d2ae2f8f36ae05e0ff256f2ce6ef8d4
Reviewed-on: https://pdfium-review.googlesource.com/32330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Currently all of the PNG related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the PNG codec code if support
for PNG is turned off.
BUG=pdfium:1080
Change-Id: I9c5247145fcadbcb1bd2243aa83350304ba421ff
Reviewed-on: https://pdfium-review.googlesource.com/32270
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
They are mostly CPDF_Object* and derived classes, but others that should
be are marked const as well.
Change-Id: Ib3344d7d8db90940df8edc97c0dd6c59da080541
Reviewed-on: https://pdfium-review.googlesource.com/32180
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:1049
Change-Id: I3a589fe51f2e584dc130ba31faa144d4494a1b08
Reviewed-on: https://pdfium-review.googlesource.com/32179
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Fix some nits in the code in the process.
Change-Id: I660b3bf547823a11bc291ed2dd1ec19a76b24b5b
Reviewed-on: https://pdfium-review.googlesource.com/32178
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Instead of allocating an N-pixel array to store some temporary values,
just use a single integer.
BUG=chromium:840728
Change-Id: I7a0ff83d814eff127033f25020a7c398db3c2062
Reviewed-on: https://pdfium-review.googlesource.com/32290
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Currently all of the TIFF related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the TIFF codec code if support
for TIFF is turned off. It also fixes cases in the code base where tif
was being used instead of tiff.
BUG=pdfium:1080
Change-Id: If6aaa8af5160fdd5b261e63bab7d5984196efcc9
Reviewed-on: https://pdfium-review.googlesource.com/32193
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:873
Change-Id: I12ae5b8776f5a73c4be81bed53ada05c94d46882
Reviewed-on: https://pdfium-review.googlesource.com/32190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds the following APIs:
FPDFPageObj_SetStrokeColor
FPDFPageObj_GetStrokeColor
FPDFPageObj_SetStrokeWidth
FPDFPageObj_SetLineJoin
FPDFPageObj_SetLineCap
FPDFPageObj_SetFillColor
FPDFPageObj_GetFillColor
Bug: pdfium:980
Change-Id: I19f9abb6756314ba8bd2f66a6c38e2e722cd8473
Reviewed-on: https://pdfium-review.googlesource.com/32192
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This reverts commit e7207f33f8024b59fc85abb1b4594b0fbab5361b.
Reason for revert: Causes crash in some XFA forms - crbug.com/840922
This is a merge, not a clean revert.
Original change's description:
> Ensure that XFA Pages always have a corresponding PDF page
>
> The PDF page may be blank, un-numbered, or untracked by CPDF, but
> this provides a place for all XFA pages to "extend" from down the
> road.
>
> Change-Id: If1003be0f261154e61e9793ccba7e1f43cd73104
> Reviewed-on: https://pdfium-review.googlesource.com/31771
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
Change-Id: Ia7f286321552b225a95f461aa8a6aef979f5c991
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:840922
Reviewed-on: https://pdfium-review.googlesource.com/32210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Work up the short call stack and mark FPDF_PAGERANGE as an opaque const
pointer. Also fix CPDF_ViewerPreferences::GenericName() to return an
optional string.
Change-Id: I2356d38888fcff8d4da37dd3efc17b284ff90485
Reviewed-on: https://pdfium-review.googlesource.com/32174
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
After getting a FPDF_PAGERANGE from FPDF_VIEWERREF_GetPrintPageRange(),
one can now use FPDF_VIEWERREF_GetPrintPageRangeCount() to get the
number of elements in the FPDF_PAGERANGE. One can then use
FPDF_VIEWERREF_GetPrintPageRangeElement() to read the elements.
Change-Id: I33eeff9026d01991ae1424e05b67f163245a35f9
Reviewed-on: https://pdfium-review.googlesource.com/32173
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Tested by running safetynet_compare.py on this patch vs master. The
results were 0 regressions and 0 improvements. The two remaining usages
cannot be replaced because they would cause a regression.
Bug: pdfium:177
Change-Id: I43eddf4ffaac2eb063f2004d6606bc3cd6e627ac
Reviewed-on: https://pdfium-review.googlesource.com/32159
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
No code actually checks to see if it is set.
Change-Id: I37631713d568f116df1c0495ffd7d7d64ddce69a
Reviewed-on: https://pdfium-review.googlesource.com/32186
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add constants/transparency.h. The header lists constants from chapter 7
of the PDF spec.
BUG=pdfium:1049
Change-Id: I66bd6fceb24807eec9c308e2e47cec3f2f836ffb
Reviewed-on: https://pdfium-review.googlesource.com/32177
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Hand edit viewer_ref.pdf to have a page range and more pages. Fix an
invalid stream length in the file as well. Fix tests that depended on
viewer_ref.pdf having only 1 page.
Change-Id: I95d5cbf1f592d1c51f11d9ab5b26abf2f23ed598
Reviewed-on: https://pdfium-review.googlesource.com/32172
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Move the predictor code into the CCodec_FlatePredictorScanlineDecoder
sub-class.
Change-Id: I5a56ba5e051cf55e8fdd039bd38089684ed257be
Reviewed-on: https://pdfium-review.googlesource.com/31272
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
- Move code into a GenerateSpace() function.
- Break apart some font size conversions.
Change-Id: I4d5ea112fc004a31ac38b7c19ff77fcbfe764d38
Reviewed-on: https://pdfium-review.googlesource.com/32157
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL modifies the formcalc transpiler to create less CFX_WideTextBuf
classes as we convert to JavaScript. This can take some pathalogical
formcal from 20sec to convert to .5sec.
Bug: chromium:834575
Change-Id: I428883297bbc3a6a325a4ab0ad51834f2f02ab82
Reviewed-on: https://pdfium-review.googlesource.com/32154
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
If there is remaining data after the lexer has said it's complete then
something has gone wrong while lexing the formcalc data. This CL changes
the transpiler to return an error in the case of the lexer havign extra
data.
Bug: chromium:834575
Change-Id: I8a1288a7f01cc69faf2033829d68246d815258de
Reviewed-on: https://pdfium-review.googlesource.com/32130
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Use it in more places there.
Change-Id: I477670a5946ec9033ad5f2bef0fbcddb52682066
Reviewed-on: https://pdfium-review.googlesource.com/31271
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Avoids a conflict should we wish to have the document actually
track pages, with a GetPage() that returns CPDF_Page.
Do the same thing to CPDF_DataAvail along the way.
Add some missing consts as well.
Change-Id: I2cb2213cc4c0649662fceab80407ee4a3f4cf30e
Reviewed-on: https://pdfium-review.googlesource.com/32158
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8
Reviewed-on: https://pdfium-review.googlesource.com/32113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id31b9f6ac33971c47cdb378ff7f9ca7d33f899b9
Reviewed-on: https://pdfium-review.googlesource.com/32112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also initialize members in the header.
Change-Id: Id814c4c5042c9d4989fa92b78f68c17f4949f09d
Reviewed-on: https://pdfium-review.googlesource.com/32111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I3fe99ecb17d37f893ce5d0d59219c82ee31fe7ea
Reviewed-on: https://pdfium-review.googlesource.com/32110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
CreateUIChild() was changed and renamed to
CreateChildUIAndValueNodesIfNeeded() in:
https://pdfium-review.googlesource.com/c/pdfium/+/24390
This caused some bugs but it's too far back for a rollback.
This cl restores the logic of CreateUIChild() keeping the new
signature.
Bug: chromium:838994
Change-Id: I44ce741fdb90f8b0fd11379b5e881e376c307f0c
Reviewed-on: https://pdfium-review.googlesource.com/32090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Avoids scrolling past this noise when looking at document code.
No functional changes.
Change-Id: I4684a8cf4d8894c699cd1c980bc5fc41b2179ad1
Reviewed-on: https://pdfium-review.googlesource.com/32156
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9d87cefc18a3a468e1bec797bc7711194f6444c7
Reviewed-on: https://pdfium-review.googlesource.com/32155
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I959d687d7d46fa61e1fe097b0b876ad02d2b123c
Reviewed-on: https://pdfium-review.googlesource.com/32153
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Also move static private members into the .cpp file.
Change-Id: Idbbdc7c78ac4199968888466caa20c58a5653dfd
Reviewed-on: https://pdfium-review.googlesource.com/32151
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I667a3cd696d44692fa3d73bdee7c2f48d3039255
Reviewed-on: https://pdfium-review.googlesource.com/32152
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The PDF page may be blank, un-numbered, or untracked by CPDF, but
this provides a place for all XFA pages to "extend" from down the
road.
Change-Id: If1003be0f261154e61e9793ccba7e1f43cd73104
Reviewed-on: https://pdfium-review.googlesource.com/31771
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|