Age | Commit message (Collapse) | Author |
|
Change-Id: I1d2a91619a1c944b6fdca00b2f9c5bb338326986
Reviewed-on: https://pdfium-review.googlesource.com/32572
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
When detecting the exponent on a floating point number, cap the maximum
amount we'll multiply by otherwise we can get excessivly large numbers.
Bug: chromium:843074
Change-Id: I6a8d1b4c20b66e305d2727f464119b1e74beb699
Reviewed-on: https://pdfium-review.googlesource.com/32570
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also format the trailer in a cleaner multi-line format.
Change-Id: If145834b56f8678f97247b346cc0cfd4d367c501
Reviewed-on: https://pdfium-review.googlesource.com/32571
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Precursor to testing app.beep() in chrome's browser tests.
Change-Id: I09ef497bd6a8094e389783b144fa04c9230cbe3d
Reviewed-on: https://pdfium-review.googlesource.com/32550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL separates the parts of CPDF_ContentParser::Continue into three
distinct methods. It clarifes when and what is returned from Continue.
Change-Id: Id7a9bf1aa16f366f567cce74006c27c452cb5dcc
Reviewed-on: https://pdfium-review.googlesource.com/32531
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Use the same limit as JBIG2 codecs.
BUG=chromium:834633
Change-Id: I11d12c841e10ab48fd85df792bf8a034fe40493c
Reviewed-on: https://pdfium-review.googlesource.com/32514
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
In case there are long runs of data to be skipped, FindBit() runs much
faster reading and comparing 8 bytes at a time.
BUG=chromium:834633
Change-Id: Ifc7b348d123c5a72cf09fbf53d764075f8abfba0
Reviewed-on: https://pdfium-review.googlesource.com/32513
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Get rid of a few more fxbarcode exception codes.
Change-Id: Ia9c9cdcef581174e25be8dc2fba181915dc6d729
Reviewed-on: https://pdfium-review.googlesource.com/32471
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ibc446d9f4606d29f997ee3521f31f0fbcf1ad84b
Reviewed-on: https://pdfium-review.googlesource.com/32176
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Break out parts of ProcessTextObject() into helper functions.
Change-Id: I76ad141728ce77e8d24d7dc9635722d670663f39
Reviewed-on: https://pdfium-review.googlesource.com/32175
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL folds the StartParse() method of CPDF_Form into the
ParserContent method. The no arguments ParseContent is removed and
ParseContentWithParams renamed to ParseContent. The callsites are
updated to pass the nullptr's.
Bug: chromium:813349
Change-Id: I304b77aef1de1b9aa20e4a3044db5023f5701584
Reviewed-on: https://pdfium-review.googlesource.com/32511
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL switches the usage of wcstod to use the FXSYS_wcstof to
determine if a given string is a valid floating point number.
Using the internal method makes linux slightly slower (10's of ms)
makes mac a lot faster 900ms to 60ms for the test case in the bug.
The FXSYS_wcstof method has been extended to handle the parsing of
float exponents. Unittests were added for FXSYS_wcstof.
Bug: chromium:813646
Change-Id: Ie68287a336e3b95a0c0b845d5bf39db6fc82b39c
Reviewed-on: https://pdfium-review.googlesource.com/32510
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: 840922
Change-Id: I984db568153bd55eff6d217e6a5219fd8a32c947
Reviewed-on: https://pdfium-review.googlesource.com/32470
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ia3a79aa7cc65aaecd1b0f0a5ea07df4e9d33a012
Reviewed-on: https://pdfium-review.googlesource.com/32396
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ic39b843ab21e7eb738849511a5187822ad49d67a
Reviewed-on: https://pdfium-review.googlesource.com/32413
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL merges some of the values of JBig2_Result. The only checks are
against Success and EndOfFile || EndOfPage, so we only need three
values: Success, EndReached, and Failure (for anything that does not
match either of those two).
Change-Id: I552c54f2d70aa8e8bf52702dab4dfc00d528ef76
Reviewed-on: https://pdfium-review.googlesource.com/32393
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This is useful for comparing images without slowing down performance
with a profiler.
Change-Id: Ia0c41bf8ef32d82bbc24f47f44586e22d991aa51
Reviewed-on: https://pdfium-review.googlesource.com/32352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Do not open the html in a browser automatically.
Change-Id: I7394b86f4a46a701dedb4fa0887515211561aee7
Reviewed-on: https://pdfium-review.googlesource.com/32315
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I952cf31cb2e3f5ca19ea3af5e9e4e11881f0a90d
Reviewed-on: https://pdfium-review.googlesource.com/32395
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id70a0c068f565ab87d10d021803a29a56ea92d67
Reviewed-on: https://pdfium-review.googlesource.com/32411
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The methods removed are not called anymore, and the members removed
then become unused too.
Change-Id: I5832f801a678f6907faf623ac678f9b3818c2af7
Reviewed-on: https://pdfium-review.googlesource.com/32394
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I707273c81d51124cf6ca7ba43cf1a817f3c852ea
Reviewed-on: https://pdfium-review.googlesource.com/32412
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I0247abb14a68cdb845f4c0060de9d30592a32d3d
Reviewed-on: https://pdfium-review.googlesource.com/32392
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It is never instantiated.
Change-Id: I6b97abbe4bd7013e8a540e788da6cea7d0ba978b
Reviewed-on: https://pdfium-review.googlesource.com/32410
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 466bd4f4e0cb2bc2a7b3626948609268c52c4690.
Reason for revert: On closer inspection, it seems the test is not
flaky, and the root cause of the failure is an SEH exception,
which is the true source of flakiness. Other tests are also affected.
Original change's description:
> Revert "Filter out "Type" and "DecodeParms" from trailer keys."
>
> This reverts commit 5f7c5be8b7072d46e8d8088a1ec14370ecfad44c.
>
> Reason for revert: New test is flaky, ID is not stable.
>
> Original change's description:
> > Filter out "Type" and "DecodeParms" from trailer keys.
> >
> > 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>
>
> TBR=dsinclair@chromium.org,hnakashima@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: pdfium:873
> Change-Id: I642771e12c61181c7b81681dae7b2f5549c14b18
> Reviewed-on: https://pdfium-review.googlesource.com/32430
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org
Change-Id: I2552729610c9f8adf02c70a2a43e2383ceda19b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:873
Reviewed-on: https://pdfium-review.googlesource.com/32397
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The non-Disform versions are gone, so inline the Disform_ versions
to reduce indirection.
Change-Id: Icf261795e5df6e5015055ec64f3dcdba56789a07
Reviewed-on: https://pdfium-review.googlesource.com/32373
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 5f7c5be8b7072d46e8d8088a1ec14370ecfad44c.
Reason for revert: New test is flaky, ID is not stable.
Original change's description:
> Filter out "Type" and "DecodeParms" from trailer keys.
>
> 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>
TBR=dsinclair@chromium.org,hnakashima@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: pdfium:873
Change-Id: I642771e12c61181c7b81681dae7b2f5549c14b18
Reviewed-on: https://pdfium-review.googlesource.com/32430
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
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>
|