summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2018-10-09Do IWYU for ptr_util.h.Lei Zhang
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d Reviewed-on: https://pdfium-review.googlesource.com/c/43609 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Add more FPDFLink_* public API coverageTom Sepez
Change-Id: Ica4c9859b1b4b7f1b4d44a75497becdd956f2600 Reviewed-on: https://pdfium-review.googlesource.com/c/43752 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Do IWYU for cpdf_dictionary.h.Lei Zhang
Move some method implementations out of headers in the process. Change-Id: I8701e360d4addd9aec39fe887d932209985d2443 Reviewed-on: https://pdfium-review.googlesource.com/c/43608 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Cover some more NULL-arg FPDFBookmark_* test casesTom Sepez
Change-Id: I0a3db5368852eeed68bac317f8adaac4f54d023b Reviewed-on: https://pdfium-review.googlesource.com/c/43751 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Remove small unreachable path in GetLinkList().Tom Sepez
Both callers have already checked for null and returned errors. Change-Id: I48a7333dae36b74aed059ef5bba8bfe10ef2c2aa Reviewed-on: https://pdfium-review.googlesource.com/c/43750 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Add some helper methods to get InterForm objects in CJS_Document.Lei Zhang
Add GetCoreInterForm() and GetSDKInterForm(), because otherwise there are too many GetInterForm() calls. Change-Id: Ibf910a51e477787c2b04b28bb359933b55dac34b Reviewed-on: https://pdfium-review.googlesource.com/c/43597 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Pass CFX_CodecMemory in place of spans to codecs.Tom Sepez
Next step towards making CFX_CodecMemory own the memory it is ref-counting. Change-Id: I5922d80d13032c3ea028447c47d34a10234109a3 Reviewed-on: https://pdfium-review.googlesource.com/c/43630 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Clean up CJS_Document.Lei Zhang
Move code into an anonymous namespace when possible. Remove dead code. Change-Id: I7e523f110f281476e7654a56fb3a28a3d21d9c29 Reviewed-on: https://pdfium-review.googlesource.com/c/43596 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Mark more bits const in CPDFSDK_XFAWidget.Lei Zhang
Change-Id: Ib262eafc73751890a95fb60a5c8d880e9c6792af Reviewed-on: https://pdfium-review.googlesource.com/c/43615 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Use CPDFSDK_BAAnnot::GetAnnotDict() in more places.Lei Zhang
Also initialize CPDFSDK_Widget members in the header. Change-Id: I55cfad3b0393b7d8e897c6ea1b91952b9c5a68d1 Reviewed-on: https://pdfium-review.googlesource.com/c/43598 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Pass CFX_Matrix by const-ref in various OnDraw() methods.Lei Zhang
Change-Id: I6e953206520c024b2fc23b9b60c5c43112d04896 Reviewed-on: https://pdfium-review.googlesource.com/c/43603 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Switch to std::vector in ccodec_flatemodule.cpp.Tom Sepez
We may choose to clean up the memcpy's in a subsequent cl. Change-Id: I038ae67504b6b3b9c3dbd36e9ddf2600392c2d94 Reviewed-on: https://pdfium-review.googlesource.com/c/43650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Kill off some memset()s following FX_Alloc()Tom Sepez
Change-Id: I92aa74c86aef890fcb991f039b9707d680fdb83c Reviewed-on: https://pdfium-review.googlesource.com/c/43652 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-09Make more CPDFSDK_AnnotIterator members const.Lei Zhang
Change-Id: I1c387ad9f6e1e4e87ebd7b778789617f93cf2c76 Reviewed-on: https://pdfium-review.googlesource.com/c/43614 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Roll testing/corpus/ 19feefee4..502691e08 (1 commit)Lei Zhang
https://pdfium.googlesource.com/pdfium_tests/+log/19feefee44bd..502691e08e17 $ git log 19feefee4..502691e08 --date=short --no-merges --format='%ad %ae %s' 2018-10-09 thestig Add Skia shallow gradient test output to testing corpus. Created with: roll-dep testing/corpus TBR=hnakashima@chromium.org Change-Id: I5856784ee84017d05acc2a6bdfde9ae1a12d931c Reviewed-on: https://pdfium-review.googlesource.com/c/43453 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Fix a C-style cast in FPDFPage_TransFormWithClip().Lei Zhang
There is no guarantee that CFX_Matrix and FS_MATRIX are the same. Also change the code to do some early returns. Change-Id: I6b5b42cafe370cd43ec1dd5885bba8e37c4a1341 Reviewed-on: https://pdfium-review.googlesource.com/c/43611 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Remove unused CPDF_Dictionary::IsSignatureDict().Lei Zhang
Change-Id: I21320f89cc3d5e487506d6383d11ff688ad6b887 Reviewed-on: https://pdfium-review.googlesource.com/c/43607 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-06Roll tools/clang/ 9bd40b25b..7792d28b0 (10 commits)chromium/3575chromium/3574chromium/3573chromium/3572Lei Zhang
https://chromium.googlesource.com/chromium/src/tools/clang/+log/9bd40b25b05f..7792d28b069a AKA roll Clang 340925:343342. This also requires rolling build/ eb7ca761a..a09219387 (40 commits) https://chromium.googlesource.com/chromium/src/build.git/+log/eb7ca761a169..a09219387345 TBR=hnakashima@chromium.org Change-Id: I4d039161d4478b8e65e480d650f04452daaa3800 Reviewed-on: https://pdfium-review.googlesource.com/c/43594 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-06Roll third_party/depot_tools/ 02d534031..71e3be7a5 (141 commits; 44 trivial ↵Lei Zhang
rolls) https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/02d53403125b..71e3be7a50c2 Created with: roll-dep third_party/depot_tools TBR=hnakashima@chromium.org Change-Id: I03be03cf116ac03a7413ef68b29172866c991acf Reviewed-on: https://pdfium-review.googlesource.com/c/43592 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-06Roll tools/code_coverage/ 64186cbaf..4191ea067 (6 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/tools/code_coverage.git/+log/64186cbaf924..4191ea0675c4 Created with: roll-dep tools/code_coverage TBR=rharrison@chromium.org Change-Id: I6903c7afcfd6dbe22ac56c50b5792ad95a612968 Reviewed-on: https://pdfium-review.googlesource.com/c/43591 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-06Roll build/ dfca77bb0..eb7ca761a (27 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/build.git/+log/dfca77bb0d1a..eb7ca761a169 Created with: roll-dep build TBR=hnakashima@chromium.org Change-Id: Ib9ae41531585379025d14320ab234de05d875173 Reviewed-on: https://pdfium-review.googlesource.com/c/43590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-06Simplify CFX_FloatRect::Inflate() and Deflate().Lei Zhang
Make all the other Inflate() methods to call the 4 parameters version. Make all the other Deflate() methods to call the 4 parameters version. Make the 4 parameters version of Deflate() call Inflate(). Change-Id: I1d2702898206bf9845f0bb176c2bf4d5a315cf96 Reviewed-on: https://pdfium-review.googlesource.com/c/43573 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-06Move CFX_FloatRect method impls out of the header.Lei Zhang
Change-Id: Ice814a84f699ea32325e98bbcea1a5b7db065fc6 Reviewed-on: https://pdfium-review.googlesource.com/c/43572 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-06Encapsulate CPDF_PageObject's rect member.Lei Zhang
At the same time, change it from 4 floats to a CFX_FloatRect. Change-Id: I00ded941723d6a264b7a17c73fd337e66b449308 Reviewed-on: https://pdfium-review.googlesource.com/c/43570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-05Remove optional matrix parameter from CPDF_PageObject::GetBBox().Lei Zhang
Instead, add GetTransformedBBox() with a required matrix parameter and use that when the there is a matrix. Change-Id: I594f3eb6bc7e1bc3eb6aa9f66556ebb1dfdbebe1 Reviewed-on: https://pdfium-review.googlesource.com/c/43553 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-05Remove one CSection::m_pVT null checkTom Sepez
The one place we create a CSection, the argument is |this| which can not be null. Change-Id: Ia216d9d5658f695a694eb7924627c997487de623 Reviewed-on: https://pdfium-review.googlesource.com/c/43571 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-05Tidy CPVT_WordRangeTom Sepez
Change-Id: I6fea894fbf6d4865f8ca6bd70452c5730414f378 Reviewed-on: https://pdfium-review.googlesource.com/c/43551 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-05Add booleans for form flags in CPDF_FormField.Lei Zhang
Add constants/form_flags.h as well. Change-Id: If15deff6bafdf394ed975b767128d65b5d2eb0e9 Reviewed-on: https://pdfium-review.googlesource.com/c/43533 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-05Make CPDF_RenderStatus matrix params const-ref.Lei Zhang
Eliminate the possibility of nullptr. Change-Id: I16c3e442d78e5151330db7227bd1c1630af3d4a3 Reviewed-on: https://pdfium-review.googlesource.com/c/43531 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-05Remove SetSaveCalled APIRyan Harrison
This was meant to be part of a mechanism to alert users that entered data into a PDF form was not going to actually be saved how they would expect. The UI for this is blocked on a bug in V8, and is now being superseded by work to correctly implement saving. BUG=pdfium:953 Change-Id: Id9c85c109a3f6a6b4ee69d35f366006be4dc9c32 Reviewed-on: https://pdfium-review.googlesource.com/c/43552 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-10-05Add methods to read specific field flags in CPDF_FormField.Lei Zhang
Instead of reading the entire field flags value and applying bitmasks. Also read an unused setter and make a member const. Change-Id: I4ad645765ac58864b9c155ee9fe740aca4396d52 Reviewed-on: https://pdfium-review.googlesource.com/c/43532 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-05Remove unreachable null checks in CPDF_ActionFieldsTom Sepez
We always pass &local as the argument to the ctor. Change-Id: I3d6e046b8aed0a2cee3c3c20513e72b85741cabe Reviewed-on: https://pdfium-review.googlesource.com/c/43550 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-05Tidy PWL_FLOATRANGETom Sepez
Remove unused form of constructor. Initialize in header and default constructor (POD). Use std::min/max Change-Id: Ib2a37333d9f57ff2e2139a2cc1dea61416a8614b Reviewed-on: https://pdfium-review.googlesource.com/c/43476 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-04Change |virtual ~Foo(){}| to |virtual ~Foo()=default;|chromium/3571Tom Sepez
Otherwise code coverage flags the empty body as unreachable. Change-Id: Iee1d9a876d68276529c70d9b8c7a28276f271767 Reviewed-on: https://pdfium-review.googlesource.com/c/43514 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Remove some unused code in fxcrt strings.Tom Sepez
Unused static method in StringDataTemplate<>. Unused WideString::GetFloat(), which in turn allows us to remove another custom string to float parser. Change-Id: If7ae60a0ba90563598232bad229f97cb74d682ba Reviewed-on: https://pdfium-review.googlesource.com/c/43513 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Refer to const smart pointers consistently.Lei Zhang
SmartPtr<T> const m_Ptr, instead of const SmartPtr<T> m_Ptr. Change-Id: I8001b0334543f49d138a24438def62088a15c6e4 Reviewed-on: https://pdfium-review.googlesource.com/c/43512 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-04Remove unreachable code in CPDFXFA_Page.Lei Zhang
Also disambiguate LoadPDFPage() and do some cleanups. Change-Id: I591295cd5e742a14e41149b63e9d11d8c3d5b7fd Reviewed-on: https://pdfium-review.googlesource.com/c/43460 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-04Remove null m_page checks from CPDFSDK_PageView.Tom Sepez
The constructor asserts that it isn't null. Change-Id: I1812068916e8a55693387077ba3faac539172534 Reviewed-on: https://pdfium-review.googlesource.com/c/43510 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Make some CPWL_FontMap methods pure virtual.Tom Sepez
We never instantiate this class by itself, and these don't get called. Change-Id: Ibff1e57c93c346d038c5f9f508b601ef919a6895 Reviewed-on: https://pdfium-review.googlesource.com/c/43475 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Remove CPDFSDK_DateTime entirely.Tom Sepez
A previous CL has made it completely unused. Change-Id: I54d178f69ac8ea3884c89526e4d2fb81cccc0f20 Reviewed-on: https://pdfium-review.googlesource.com/c/43511 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04CPDF_VariableText::m_nHorzScale is always 100Tom Sepez
Remove the member and simplify logic in all the places this is passed. Change-Id: I39b979793fe84f0dc460261223655dd7f50555cc Reviewed-on: https://pdfium-review.googlesource.com/c/43474 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-04CPDFSDK_AnnotHandlerMgr::Annot_OnCreate() is not called.Tom Sepez
Also Annot_OnLButtonDblClk() and Annot_OnKeyUp(). Change-Id: I0a5984fc89f73f507af520c5cf5afb115b1886ce Reviewed-on: https://pdfium-review.googlesource.com/c/43490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Remove CPWL_Wnd::GetClassName() and overrides.Tom Sepez
It's only used in two tests, and there it is not essential, so save some strings and vtable space. Change-Id: If8c68e5e2580dbe588bccb942f9008efb66fe490 Reviewed-on: https://pdfium-review.googlesource.com/c/43472 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Remove CPWL_EditCtrl::m_pEdit null checks.Tom Sepez
It is always non-null. Move initializers to header while we're at it. Change-Id: I64f59ab1d5ffee9256f87e4712e46fb71f14ef08 Reviewed-on: https://pdfium-review.googlesource.com/c/43473 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>