summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-15Make xfa/ pass gn check.Lei Zhang
Use allow_circular_includes_from as a crutch for now. Change-Id: I1aad3276a6fd571071270090235b0cfb625e337b Reviewed-on: https://pdfium-review.googlesource.com/c/43986 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-15Make FlateEncode()'s buffer out parameter a unique_ptr.Lei Zhang
Change-Id: I31a5abb3c8dd31826098493f51effbd5afe109d1 Reviewed-on: https://pdfium-review.googlesource.com/c/41856 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-13Fix span / unique_ptr destruction order in PDF_DataDecode().chromium/3581chromium/3580Lei Zhang
BUG=chromium:895026 Change-Id: Ie7d8bfd6e42308c3531ce6637ad29ec2231a2095 Reviewed-on: https://pdfium-review.googlesource.com/c/43984 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-13Make testing/ pass gn check.Lei Zhang
Change-Id: Ifb2d60bf3c2d86a105705196d65e318081cefe4e Reviewed-on: https://pdfium-review.googlesource.com/c/43981 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-13Fix v8 ToLocalChecked() failure in CJS_Runtime.Lei Zhang
BUG=chromium:894938 Change-Id: I3d1ca33eec4cd2b01bfa4dfce7da3642dd5ad31b Reviewed-on: https://pdfium-review.googlesource.com/c/43983 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-13Add missing config to core/fxcrt:seekablemultistream target.Lei Zhang
Should have been part of commit e421d384. TBR=tsepez@chromium.org Change-Id: I042c1c85f915798dd393f5ea136edb86d644ca11 Reviewed-on: https://pdfium-review.googlesource.com/c/43982 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Add setters/getters for BleedBox and TrimBox.xlou
Since BleedBox and TrimBox are supported according to PDF specification, hence added setters and getters to get the value if exists. Bug:894655 Change-Id: I3c2600450f07665241a4724457a7cbc4282941ed Reviewed-on: https://pdfium-review.googlesource.com/c/43977 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-12Beef up coverage in CJS_Field.Tom Sepez
Still a long way to go, but hit the easy ones first. Alphabetize property names in cjs_field.cpp file. Change-Id: I1ede770a1e159d464287775cf9e19cbaf9f2a62f Reviewed-on: https://pdfium-review.googlesource.com/c/43978 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-12Split core/fpdfapi build rules into various sub-directories.Lei Zhang
Change-Id: I98e2e913f11ff63e70cb841de00a4f56b06ca03b Reviewed-on: https://pdfium-review.googlesource.com/c/43974 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Make core/fxcrt pass gn check.Lei Zhang
Split some XFA-only code into their own targets to avoid circular dependencies. Make CFX_SeekableMultiStream XFA-only. Change-Id: I88f49556623d52dddd4d0013cc3308b694c01d42 Reviewed-on: https://pdfium-review.googlesource.com/c/43973 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Do IWYU in xfa.Lei Zhang
Change-Id: Ia104471caffe79f92d439920baeea37a71c71c50 Reviewed-on: https://pdfium-review.googlesource.com/c/43971 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Beef up CJS_Document method coverage.Tom Sepez
Also alphabetize mailDoc method position in .cpp file. Change-Id: Ifb53e9a6f5f165bb41b865d51dae15e3bc84c4c7 Reviewed-on: https://pdfium-review.googlesource.com/c/43972 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-12Split core/fxcrt build rules into core/fxcrt/BUILD.gn.Lei Zhang
Change-Id: I9b3608bd76ec4911a4bb820fcda62c5d9533fb4f Reviewed-on: https://pdfium-review.googlesource.com/c/43947 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Add test for CJS_Annot JS callbacks.Tom Sepez
Change-Id: I8ef9bb333e786e833faca75566730a5b441d63c2 Reviewed-on: https://pdfium-review.googlesource.com/c/43830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-12Remove more unnecessary includes and do IWYU as needed.Lei Zhang
Also move some implementations out of headers. Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee Reviewed-on: https://pdfium-review.googlesource.com/c/43890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Split most core build rules into various BUILD.gn files in core.Lei Zhang
Change-Id: I773eec2bbf104f073eba7a64ed19f6fba0131d21 Reviewed-on: https://pdfium-review.googlesource.com/c/43946 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Move core/fdrm/crypto/* to core/fdrm/.Lei Zhang
core/fdrm/ currently only contains the crypto directory. Change-Id: I68f4a38e7098f8a3bdc19764bc1ec78c28a386c9 Reviewed-on: https://pdfium-review.googlesource.com/c/43945 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Split constants and testing build rules into their own BUILD.gn files.Lei Zhang
Change-Id: I3a100e1f009f18ee06959edf47d189d1bfdcb25a Reviewed-on: https://pdfium-review.googlesource.com/c/43944 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Add test for CJS_Color properties.Tom Sepez
Return a more precise error in one case. Change-Id: I21e4ef6b30be5f44d35922640643bffb9cb4b5e4 Reviewed-on: https://pdfium-review.googlesource.com/c/43950 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-12Add tests for CJS_Console methods.Tom Sepez
Change-Id: Ie534b26d8241e889ad9cdca942e142cddca44bf4 Reviewed-on: https://pdfium-review.googlesource.com/c/43933 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-12Split fpdfsdk build rules into various BUILD.gn files in fpdfsdk.Lei Zhang
Change-Id: I3500ab9a9bbf0ec983e02dd4b739c9b199d71e21 Reviewed-on: https://pdfium-review.googlesource.com/c/43943 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Split fxjs build rules into fxjs/BUILD.gn.Lei Zhang
Change-Id: I7d9d5bb14a4a2b11afeab0da25bad35322560d3b Reviewed-on: https://pdfium-review.googlesource.com/c/43942 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Split xfa build rules into various BUILD.gn files in xfa/.Lei Zhang
Change-Id: I3e6624d0e7af6c4f7ec9674d5990ae25cc3954d0 Reviewed-on: https://pdfium-review.googlesource.com/c/43941 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Slightly simplify CPDF_FormField's notify methods.Lei Zhang
Change-Id: I5eaa286d8cd0920cfb73f3ca0dacc1800affc6b6 Reviewed-on: https://pdfium-review.googlesource.com/c/43936 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Rename CPDF_{Array,Dictionary}::GetCount() to size().Lei Zhang
Make them compatible with pdfium::CollectionSize(). Change-Id: Ibef3b182e35a7eca7c656cf590462782de0cc157 Reviewed-on: https://pdfium-review.googlesource.com/c/43937 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Forward declare more in codec code.Lei Zhang
Change-Id: I8060ada299f845a9198a6e83d31d128bd4bf09bc Reviewed-on: https://pdfium-review.googlesource.com/c/43870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Remove redundent ASSERT + if checks in CPDF_FormControl.Lei Zhang
Change-Id: Iedaf9447513d7142359771c81c49f03f8bca28d7 Reviewed-on: https://pdfium-review.googlesource.com/c/43935 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Split fxbarcode build rules into fxbarcode/BUILD.gn.Lei Zhang
Enable GN check for fxbarcode and make it pass. Change-Id: I696a97b90113b65ae5c7f8aa18185328c4640251 Reviewed-on: https://pdfium-review.googlesource.com/c/43940 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Add minimal pixel test for a rendering bug.Lei Zhang
The test is suppressed because it currently renders incorrectly. BUG=pdfium:632 Change-Id: Ie780e2128ef3a0bcf5f7d57b164ae38f03b1e9fd Reviewed-on: https://pdfium-review.googlesource.com/c/43090 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Fix naming for CPDF_FormField::Type enum.Lei Zhang
The preferred Google C++ style is kFoo. Change-Id: I167b147aab91245a4dfce1185008f0b412078260 Reviewed-on: https://pdfium-review.googlesource.com/c/43934 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Mark the bigint target as XFA only.chromium/3579Lei Zhang
Depend on it directly from the only user, fxbarcode. Change-Id: I303dc7b0e713d683257fb3d893e74fdd40ac2046 Reviewed-on: https://pdfium-review.googlesource.com/c/43939 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Make PDF_DataDecode()'s buffer out parameter a std::unique_ptr.Lei Zhang
Change-Id: Id8f7473c590ef94799d0dd29f5de790a453c86f6 Reviewed-on: https://pdfium-review.googlesource.com/c/42603 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Fix some nits in CJS_Document helpers.Lei Zhang
Change-Id: Iad2eaf53fcca2d4eee92760cdbd6da2869695d56 Reviewed-on: https://pdfium-review.googlesource.com/c/43831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-11Use pdfium::Vector2D in CCodec_FaxEncoder ctor.Lei Zhang
Instead of manual CHECKs. Change-Id: I387008bea88cba9b9b3e813631d9fc02ac7eb3a9 Reviewed-on: https://pdfium-review.googlesource.com/c/43932 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Add functions to get/set ArtBox.chromium/3578xlou
There are PDFs that use ArtBox. In some use cases, user may scale a page, scale up/down MediaBox and CropBox. So if ArtBox exists, it needs to be scaled as well. Bug:409670 Change-Id: I78ac7afa66942352277f856514bdd9b15dda270b Reviewed-on: https://pdfium-review.googlesource.com/c/43931 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Shirleen Lou <xlou@chromium.org>
2018-10-11Add check_targets list to .gn.Lei Zhang
Start trying to pass "gn check". Change-Id: Iec694d8abf558f3e1ca477dd3934020088e43cb5 Reviewed-on: https://pdfium-review.googlesource.com/c/43895 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Sync fx_tiff target conditional with its dependent's.Lei Zhang
The dependent for fx_tiff is gated by pdf_enable_xfa_tiff, so make the target itself match. Change-Id: I829977d3b470c5c5388f4069e650abc0b57d5c6c Reviewed-on: https://pdfium-review.googlesource.com/c/43892 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Enable jumbo support for PDFium fuzzers.Lei Zhang
Make fuzzer helpers that are mutually exclusive use the same name for their global variables. If any target tries to include both, the jumbo build will likely fail. BUG=pdfium:964 Change-Id: Idadbc86ff990bf1e8c7cfb3500f1f191a96432db Reviewed-on: https://pdfium-review.googlesource.com/c/43850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-11Mark tests as testonly.Lei Zhang
Also move testing/pseudo_retainable.h into the right test target. Change-Id: I1073390c2f17f3048e63921238cdd3b71d577769 Reviewed-on: https://pdfium-review.googlesource.com/c/43894 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Replace most static_library entries with source_set.Lei Zhang
Per GN documentation, "static_library: A .lib or .a file (normally you'll want a source_set instead)." Change-Id: If2ce44157f4d6c8998a0417f398f3bd19c052795 Reviewed-on: https://pdfium-review.googlesource.com/c/43893 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Make a couple more source_sets into jumbo_source_sets.Lei Zhang
BUG=pdfium:964 Change-Id: I31c8e99ef35227404091c9c8e8f39a893eaf5b6b Reviewed-on: https://pdfium-review.googlesource.com/c/43891 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Rename InterForm classes to InteractiveForm.Lei Zhang
Shorten some names to try to avoid CPDF_InteractiveForm* pInteractiveForm = GetInteractiveForm(); Change-Id: I77fafd6c4cce20aa46908830afde12f87784680e Reviewed-on: https://pdfium-review.googlesource.com/c/43815 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-11Rename interform files to interactiveform.Lei Zhang
Just rename the files in this CL. Change-Id: I39f7fefa885977fffab6c909762b05484a1c923d Reviewed-on: https://pdfium-review.googlesource.com/c/43814 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Update build rules for CFX_CodecMemory.Lei Zhang
It it no longer only used with BMP and GIF formats. BUG=chromium:894325 TBR=tsepez@chromium.org Change-Id: I6d53bf29b8b8eb37c30139f3f48ce54d77579f9f Reviewed-on: https://pdfium-review.googlesource.com/c/43871 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-11Fix double V8 initialization with fuzzers.Lei Zhang
Commit 95860d7 added some new fuzzers, but they try to use both the generic fuzzer's initialization code, as well as their own custom initialization code. Add a new "pdfium_public_fuzzer" GN template for these new fuzzers, so they use their own initialization code rather than the generic one. BUG=chromium:894053 TBR=tsepez@chromium.org Change-Id: I6110a199e1c64d7c0632f9966e146fd316b757ae Reviewed-on: https://pdfium-review.googlesource.com/c/43832 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-10Use optipng to optimize expected .pngs when regenerating them.Henrique Nakashima
Bug: pdfium:1127 Change-Id: I5371ecf6f704761320a021fbee07a79839fb80b7 Reviewed-on: https://pdfium-review.googlesource.com/c/43810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-10-10Rename CPDF_ContentMark to CPDF_ContentMarks.Henrique Nakashima
Also change variable names and member names of this type. This better reflects the fact that this class contains all the marks in a page objects, not just one mark. Change-Id: I4fe3d2620e78cbe423f18634f19fa82530d7efe1 Reviewed-on: https://pdfium-review.googlesource.com/c/43813 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-10-10Create embeddertests for other kinds of actions.Tom Sepez
Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-10Remove more impossible checks in form filler code.Lei Zhang
Also fix some nits and inline some calls. Change-Id: Ie962f416b8ecd51ce05341e5511129ea0602fa8e Reviewed-on: https://pdfium-review.googlesource.com/c/43604 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-10Get rid of useless form of CPDFSDK_Widget::GetFormControl().Lei Zhang
Just call CPDF_InterForm::GetControlByDict() directly instead. Change-Id: I3fce2330ab81324d62477530b2617feeb0a49749 Reviewed-on: https://pdfium-review.googlesource.com/c/43606 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>