summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2018-10-10Document image comparison with safetynet_compare.py.chromium/3577Henrique Nakashima
Change-Id: I12a0bb92031173209b71a5ea5e06bff64a5d80a0 Reviewed-on: https://pdfium-review.googlesource.com/c/43730 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-10Add Observable::ObservedPtr::HasObservable().Lei Zhang
if (pObserved->HasObservable()) is more readable than if (*pObserved). Change-Id: I61ad3deb8e9f30cdc120a05555c2558f34489681 Reviewed-on: https://pdfium-review.googlesource.com/c/43811 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-10Get rid of non-const ref parameter in CPDFSDK_InterForm::OnFormat().Lei Zhang
Return Optional<WideString> instead. Change the call stack to accept Optional<WideString>. Change-Id: I020589fac8a1de4974070268a19b4acad64c4092 Reviewed-on: https://pdfium-review.googlesource.com/c/43601 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-10Use pdfium::Optional in CPDFSDK_Widget.Lei Zhang
Also make some methods const. Change-Id: Ie2d0f7e691ad9448b4e77227ce3c0b2b065e0da0 Reviewed-on: https://pdfium-review.googlesource.com/c/43602 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-10Remove impossible nullptr checks in CPDFSDK_InterForm.Lei Zhang
Also remove dead code and move initialization to headers in CPDFSDK_InterForm. Change-Id: Ib75864ccfd3f1d0d255d9c7942cc610edce822a3 Reviewed-on: https://pdfium-review.googlesource.com/c/43599 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-10Fix dangling reference in CFX_CodecMemory.Tom Sepez
Do this by making CFX_CodecMemory actually own the memory that it is ref-counting. Remove some test cases that are now prohibited, and relax one lifetime restriction in the test because we are now doing one additional copy (in the test, but not in real life). Bug:879512 Change-Id: If030dfcf97fe40155c46a42288fc73192437ce9c Reviewed-on: https://pdfium-review.googlesource.com/c/43670 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-10Remove non-const ref parameters in CPDF_IconFit.Lei Zhang
Also make methods const. Change-Id: I40a21d63fea30bbf37898cb57e1acc5ba8b3345f Reviewed-on: https://pdfium-review.googlesource.com/c/43792 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-10Simplify some object rect calculations.Lei Zhang
Change-Id: I46ae4fb4e0f8d51130f5e5beae286dae5466b629 Reviewed-on: https://pdfium-review.googlesource.com/c/43574 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-10Fix some random nits.Lei Zhang
Change-Id: I735c057d4900bcd58c1041df16b885dc7c9ed27d Reviewed-on: https://pdfium-review.googlesource.com/c/43793 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-10Better test FPDFAction_* public functions.Tom Sepez
Update public documentation. Make implementation match documentation for bad argument types. Change-Id: I70aa3ccaf2580f81d6eb14c6fb4198374010a695 Reviewed-on: https://pdfium-review.googlesource.com/c/43690 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-10Use std::vector in ccodec_faxmodule.cppTom Sepez
Rework a memset while we're at it. Change-Id: Id62ae3a8c1f64a93417915e23fcd93935ae95c73 Reviewed-on: https://pdfium-review.googlesource.com/c/43651 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-10Document how to setup safetynet_job.py nightly.Henrique Nakashima
Change-Id: I5792f5940a3195854b6117d2418c773de34f891b Reviewed-on: https://pdfium-review.googlesource.com/c/43710 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-10Catch SSL errors when fetching Gold JSON data.Lei Zhang
Also increase timeout value when retrying. Change-Id: I14dd3f76fd1a7555c3a5e1bd8c7bf8f214bc8ec0 Reviewed-on: https://pdfium-review.googlesource.com/c/43616 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Remove default argument to CPDF_Dictionary::GetBooleanFor().chromium/3576Lei Zhang
Change-Id: I5b64bc3af90b9557d8e0c456675afe60e463927d Reviewed-on: https://pdfium-review.googlesource.com/c/43612 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Remove some string comparisons in CPDF_Action.Tom Sepez
We have a string to enum tokenizer. Use it. Re-order .cpp to match .h in one place. Change-Id: I6835826d5c7be599265ff05f2369da4f2bcc789c Reviewed-on: https://pdfium-review.googlesource.com/c/43791 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Do IWYU for retain_ptr.h and unowned_ptr.hLei Zhang
Change-Id: I2897feee27f80c85f0328f0b220ae5be93686170 Reviewed-on: https://pdfium-review.googlesource.com/c/43610 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Beef up FPDFTransformEmbedderTest.Tom Sepez
Change-Id: I53b7c24c2b8f126cb2d2c676a02ccade76966fe8 Reviewed-on: https://pdfium-review.googlesource.com/c/43753 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-09Copy some fuzzer code from Chromium into PDFium.Lei Zhang
These came from Chromium's pdf/pdfium/fuzzer directory. The code has been modified to be buildable in standalone PDFium and modernized. Change-Id: Ia4ddad4a164f798689af4b9f92d41d635901dccb Reviewed-on: https://pdfium-review.googlesource.com/c/43530 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Add some comments about pointer ownership in fpdf_transformpage.h.Lei Zhang
Remove some unused typedefs. Change-Id: I9cf99b2daae2c6e86f2d6a2e6e96812b67b28f88 Reviewed-on: https://pdfium-review.googlesource.com/c/43790 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Clean up CPDF_FormControl.Lei Zhang
Mark methods as const and remove dead code. Change-Id: Ib7baa9ac9783422439d8319cc8ddd1f78561b702 Reviewed-on: https://pdfium-review.googlesource.com/c/43613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Add two NULL argument FPDFDest_* test casesTom Sepez
Change-Id: I4b811bb28f9af5fd4a907a9a9eb29b05a8dc4b6a Reviewed-on: https://pdfium-review.googlesource.com/c/43731 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>