summaryrefslogtreecommitdiff
path: root/BUILD.gn
AgeCommit message (Collapse)Author
2018-08-23BUILD.gn - put cfx_windowsrenderdevice.h in win-specific section.Tom Sepez
It just looks wrong otherwise. Change-Id: Id4f45d9111a76a78ec35c8234465d2cdf93299bc Reviewed-on: https://pdfium-review.googlesource.com/41090 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-17Remove CFPF_SkiaFontDescriptor.Lei Zhang
CFPF_SkiaFontDescriptor only has a single subclass. Merge it with the subclass. Change-Id: I26d19ee527c010d2d69acd820d8acc9634b12239 Reviewed-on: https://pdfium-review.googlesource.com/40551 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-17Remove CFPF_SkiaBufferFont and CFPF_SkiaFileFont.Lei Zhang
The classes are never instantiated. Change-Id: I108d3c397464e50b337bc46702d4adbc263e8814 Reviewed-on: https://pdfium-review.googlesource.com/40550 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-17Rename CJS_Return to CJS_Result.Tom Sepez
"Return" is a verb, and "return" is a reserved-word at that, so avoid using it as part of a class name. Fully mechanical change apart from rename. Change-Id: I120e453e8ba001c4ab74a39e2da6aa6eb590835f Reviewed-on: https://pdfium-review.googlesource.com/40532 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-16Add a way to save a barcode generated bitmap to a .png.Henrique Nakashima
This is useful for debugging and validation purposes. The hashes that are in BarcodeTest are not necessarily for valid outputs. This CL refactors the code in embedder_test.png that already does this, moving it to testing/utils where unit tests can access it too. Bug: pdfium:1135 Change-Id: I6f1d70a4e133f8f04dbe52646087f99c448e95f8 Reviewed-on: https://pdfium-review.googlesource.com/40152 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-08-13Implement CFX_CodecMemory.Lei Zhang
This class is much simpler than CFX_MemoryStream and does only what CFX_BmpDecompressor and CFX_GifContext needs. Swap out CFX_MemoryStream and remove CFX_MemoryStream::Seek(). BUG=pdfium:263 Change-Id: Ifd8ce4d2b6c9fedd6ec842d46f54fc8e654fbca7 Reviewed-on: https://pdfium-review.googlesource.com/39880 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-13Move CPDFSDK_MemoryAccess to fxcrt.Lei Zhang
Rename it CFX_ReadOnlyMemoryStream and swap out one use of CFX_MemoryStream. BUG=pdfium:263 Change-Id: I15012df156a6a4d7c36f6fd58f32c355eae5fa1a Reviewed-on: https://pdfium-review.googlesource.com/39878 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-09Move all utf8 decoding under fx_string.hTom Sepez
Put encoder in cfx_utf8encoder.{h,cpp} to parallel decoder. Add tests, and fix one corner case involving 0xff. Change-Id: Ib97540afdc708bcc6280a79c76734ec68ea72690 Reviewed-on: https://pdfium-review.googlesource.com/39770 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-02Remove -Wno-pointer-to-int-cast from fxcodec target.Lei Zhang
Presumably, a libopenjpeg upgrade fixed third_party/libopenjpeg20/mct.c. Change-Id: I0e0e593b0cf7f32934ce45b19a54fe556b955448 Reviewed-on: https://pdfium-review.googlesource.com/39411 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-28Remove CXFA_TraverseStrategy_ContentLayoutItem.chromium/3507chromium/3506Tom Sepez
It makes illegal casts and requires its callers to double-check the type validity of results before use. Instead, use the parent class iterator and perform checked casts. No functional difference, since it looks like the requisite checks were being made in all places. Make one "using" visible to other files to save some verbosity. Change-Id: I894ca15b4bdddd4723b787663950a58bc58b7f06 Reviewed-on: https://pdfium-review.googlesource.com/39030 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-25Only build cfx_fileaccess_windows.cpp on Windows.Lei Zhang
- Remove #if guards in the .cpp file and flip the #if guard in the header to produce an error when incorrectly included. - Do the same for cfx_fileaccess_posix.cpp. - Also remove forward declarations for win32 APIs. Change-Id: I81056ea6198d342e62744bd3240b3a28ac53d5c0 Reviewed-on: https://pdfium-review.googlesource.com/38410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-24Rename JS_{METHOD,PROP} to JSE_{METHOD,PROP}Tom Sepez
Because they are too easily confused with non-XFA JS_STATIC_PROP despite being on the XFA side. The JSE_ prefix mirrors the fxjs/fxjse split ("e" presumably standing for "extension" or some such) between the non-xfa/xfa V8 adapter layer. Rename fxjs/{cjx_define.h => jse_define.h}, since there aren't any symbols starting with |CJX| in it. Fix some IWYU for jse_define.h No functional changes. Change-Id: I6a0b2b6fe6ef1b564b0bfa2fa7ba317a0cea0953 Reviewed-on: https://pdfium-review.googlesource.com/38730 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-23Replace CFXJSE_HostObject::type_ with polymorphic conversion methodsTom Sepez
More foolproof technique, and saves one word in every instance at a cost of two pointers in every subclass vtable. Change-Id: Ied4f91d4d203b5e6d83abe751159eb7e55489bb5 Reviewed-on: https://pdfium-review.googlesource.com/38530 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-19Make FX stream internal details more private to .cpp files.Tom Sepez
Makes the generic fx_streams.h header pull in lots less OS-specific cluter. Combine and de-virtualize the windows struct. Change-Id: I836b9efb00b25dbd1b8f814645dd31a0f04bb4f4 Reviewed-on: https://pdfium-review.googlesource.com/38330 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-16Use UnownedPtr/Optional in cfxa_layoutcontext.cppTom Sepez
Introduce cfxa_layoutcontext.cpp to satisfy chromium style ctor check. Fix typo in class forward declaration in cfxa_layoutcontext.h Change-Id: I2b29bf61a21be0f895faf8984897c5655a4f0e89 Reviewed-on: https://pdfium-review.googlesource.com/37950 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-11Write marked content operators when generating a stream.Henrique Nakashima
The marked content operators are BMC, BDC and EMC. In the case of BDC, it is preceded by a direct dict or a property name. Bug: pdfium:1118 Change-Id: I3ee736ff7be3e7d7dde55ef581af3444a325e887 Reviewed-on: https://pdfium-review.googlesource.com/37470 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-07-11Fix crash and memory leak.Artem Strygin
Do not return size within CPDF_StreamAcc in case when read data failed. Also free buffers in this case. Bug: chromium:860210 Change-Id: Ifb2a061d7c8427409b68c33f213c5c55343fb946 Reviewed-on: https://pdfium-review.googlesource.com/37310 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-07-04Remove gn arg 'use_coverage'chromium/3482Ryan Harrison
This flag was used for enabling GCOV style coverage data generation. Our code coverage tools now use the native LLVM tools, so no longer depend on this flag. Having this flag is confusing and a source of developer error. Change-Id: I42cfce6fe9e5a7d0f0ac13abdb5fec90f61f1c13 Reviewed-on: https://pdfium-review.googlesource.com/37130 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-27Add fxcrt::AutoRestorer<T>::AbandonRestoration().chromium/3475Tom Sepez
Kinda like reaching a commit point, makes going forward more useful. Change-Id: I7695b6e627d4cd8ed2bccb667d0cabd7f42c7b1c Reviewed-on: https://pdfium-review.googlesource.com/35970 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-27Implement CPDF_CrossRefTableArtem Strygin
Change-Id: I5ac61ab323adb5eec2de8660064fff95ee877b5e Reviewed-on: https://pdfium-review.googlesource.com/35432 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-06-26Implement CPDF_ObjStream.Artem Strygin
It is allow do not store raw objects streams within CPDF_Document for reduce memory usage. Change-Id: I4377bd5119d87314e76f14255171618cf6ee533d Reviewed-on: https://pdfium-review.googlesource.com/35430 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-06-19Speculative fix for segv destroying CPDF_PageObjectHolder::m_GraphicsMapTom Sepez
We speculate that the bug that makes the comparison operator irreflexive might be the cause of the segv on windows production code, should a NaN sneak into the GraphicsData struct. In any event, should this happen, the tree won't be correct with some nodes erroneously replaced. Add a test which fails prior to the patch, but alas does not elicit the segv. Also move operator<() methods to .cpp file corresponding to .h file in which they are delcared. Bug: 852273 Change-Id: Ib7929881e7ffbed8b09f6e2c9fb7898cbde58946 Reviewed-on: https://pdfium-review.googlesource.com/35171 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-12Refactor modification of Contents in CPDF_PageContentGenerator.Henrique Nakashima
This is a pure refactor, there should be no change in behavior. It prepares for the next CL, which will allow modification of content streams. Bug: pdfium:1051 Change-Id: I01ca3e897efe423e89df75e1f31cd67539cc3d08 Reviewed-on: https://pdfium-review.googlesource.com/34470 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-12Rework "Make common page base class."Tom Sepez
Re-landing of https://pdfium-review.googlesource.com/c/pdfium/+/32892 This time, however, we do not build on the previous CL which cached pages. This CL by itself should be OK but was reverted only because it was blocking earlier reverts. Change-Id: I067d5f07373eeac6cced5d0c113ea40e5f8dcd15 Reviewed-on: https://pdfium-review.googlesource.com/34910 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-08Add constants for PDF 1.7 spec, table 3.27.Lei Zhang
BUG=pdfium:1049 Change-Id: Ie8bdb893d2af8d63420027a7ef95baf58cd97aa6 Reviewed-on: https://pdfium-review.googlesource.com/34691 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-06-08Write some FPDFTransformEmbedderTests.Lei Zhang
Test FPDFPage_GetMediaBox() and FPDFPage_GetCropBox(). Change-Id: Ia5ba3d95c0c859acb5c2576781cca90d3e60b40e Reviewed-on: https://pdfium-review.googlesource.com/34570 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-06-06Add ability to log click events reaching PDFiumRyan Harrison
Adds in logging statement to related API methods and a build flag to control enabling the feature. This is meant to be used in conjunction with Chromium. A developer can enable this flag, load a test PDF, and then click on elements to determine appropriate coordinates for an .evt file. BUG=pdfium:1057 Change-Id: I956c39f545297872a61affdb621a412b3c407ff5 Reviewed-on: https://pdfium-review.googlesource.com/34010 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-06[fm2js] Fixup initialized variable conversionDan Sinclair
When converting a Var statement from formcalc to JS we would neglect to add the ; if the variable was initialized. This generated invalid JS as we'd end up with two statements smushed together. FormCalc: var s = "" Previous JS: var s = ""s = pfm.... New JS: var s = ""; s = pfm ... Bug: pdfium:1097 Change-Id: I8a869f07374cac68a06a487dace89699a4e5540c Reviewed-on: https://pdfium-review.googlesource.com/34110 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-06-04Lowercase JS_Define.{h,cpp} and CJS_Define.hTom Sepez
Consistency with file naming conventions. No functional change. Change-Id: I596c4be5bbf0510950c44a7d9d80f59537739c3b Reviewed-on: https://pdfium-review.googlesource.com/33593 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Make common page base class for XFA and non-XFA."Tom Sepez
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-30Remove manual references to exe_and_shlib_depsTom Anderson
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary since it's automatically added. This CL removes all remaining manual references to exe_and_shlib_deps. [1] https://chromium.googlesource.com/chromium/src.git/+/d7ed1f0a9c28c932fddc834ca5de44f28266c7f5 BUG=chromium:845700 R=thestig Change-Id: I5708e7c662b24493d1216f9a802dfce3de5dbea6 Reviewed-on: https://pdfium-review.googlesource.com/33151 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-30Make common page base class for XFA and non-XFA.Tom Sepez
Now that both are ref-counted, we can replace ifdef's with some polymorphism. Bug: pdfium:760 Change-Id: Ie22ea259c9af56fa569f0af268b8e7065789a3f2 Reviewed-on: https://pdfium-review.googlesource.com/32892 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-30Roll DEPS for build and buildtools.Tom Anderson
https://chromium.googlesource.com/chromium/src/build/+log/037f38ae..10a93c2c https://chromium.googlesource.com/chromium/buildtools/+log/ab7b6a7b..893eb86b https://chromium.googlesource.com/android_ndk/+log/e951c372..5cd86312 https://chromium.googlesource.com/chromium/src/tools/clang/+log/abe5e4f9..c893c7ee https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+log/4f03e51f..8fbdf9f1 BUG=chromium:845700 R=thestig Change-Id: I1496686af4336917f363297fb582b7f0483d3591 Reviewed-on: https://pdfium-review.googlesource.com/33231 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-29[xfa] Propagate the xfa change data for text to JS and back.Dan Sinclair
This CL adds the necessary plumbing to propagate the change information for a text widget from FWL out to JS and handle the returned value as necessary. Bug: pdfium:1066 Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc Reviewed-on: https://pdfium-review.googlesource.com/33070 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-25Move fuzzers to testing/fuzzers.Lei Zhang
Move them out of testing/libfuzzer, to make it possible to pull libfuzzer into that directory. Leave testing/libfuzzer/BUILD.gn there for now as a transitional build file. BUG=pdfium:1088 Change-Id: I4126d89dd3e075ac63477a4860e029c135866dbe Reviewed-on: https://pdfium-review.googlesource.com/32896 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-23Add unit test for CFX_BitStream.Lei Zhang
Change-Id: I764196b9cc1d437313aac18ee9d5dbed642c7119 Reviewed-on: https://pdfium-review.googlesource.com/32850 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-16Move JBig2 HuffmanTables into JBig2_HuffmanTable.cppNicolas Pena
This CL changes the table information so it can be indexed, and allows moving all of the information to the CJBig2_HuffmanTable implementation, which is the only real user of the data. Change-Id: I88780bee32c8509198518fd3b1e82d68ae7ff707 Reviewed-on: https://pdfium-review.googlesource.com/32635 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-12Remove unused CFWL_FormProxy.Henrique Nakashima
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>
2018-05-11Remove CFWL_ComboBoxProxy.Henrique Nakashima
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>
2018-05-10Fixup ASSERT in Bidi handling; Add bidi fuzzer.Dan Sinclair
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>
2018-05-10Add CPDF_Transparency.Lei Zhang
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>
2018-05-10Do not build BMP when codec is disabledRyan Harrison
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>
2018-05-09Do not build GIF when codec is disabledRyan Harrison
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>
2018-05-09Do not build PNG when codec is disabledRyan Harrison
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>
2018-05-09Do not build TIFF when codec is disabledRyan Harrison
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>
2018-05-08Add constants for PDF 1.7 spec, table 7.2 and 7.3.Lei Zhang
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>
2018-05-07Move codepage tables from cpdf_document.cpp to fx_codepage.cppTom Sepez
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>
2018-05-03Use strict types in FPDF API, try #3Tom Sepez
Rather than messing with actual inheritence, add type-checking wrappers and just blatantly cast to incomplete types. Along the way, this points out places where we would downcast without checking, which I fix. Change-Id: Ieb303eb46ad8522dfe082454f1f10f247ffd52d5 Reviewed-on: https://pdfium-review.googlesource.com/32030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-02Add a CFX_XMLDocument class.Dan Sinclair
This CL adds a CFX_XMLDocument to act as the XML node container. All nodes are now owned by the document and the document is returned by the CFX_XMLParser. Classes which parse XML files now store the document instead of the root node. BUG: chromium:835636 Change-Id: I1e07d6115cf14714911d6fd4c3fa920c94fd5faf Reviewed-on: https://pdfium-review.googlesource.com/31313 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-01Fixes XML Instruction handling in CXFA_DocumentParser.Dan Sinclair
This CL fixes issues with handling XML instructions in CXFA_DocumentParser. Unittests were added to verify the behaviour. Change-Id: Iff8d51d0e6d411419473c9b2c32c700d4bbf86f5 Reviewed-on: https://pdfium-review.googlesource.com/31810 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>