summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-02-17Fix some issues with CXFA_FMParse/CXFA_FMLexer infinite looping.chromium/2657chromium/2656chromium/2655Oliver Chang
The parser did not expect an invalid token in some places, leading to an infinite loop. In the lexer, if an invalid string was found, the underlying pointer was never advanced. Also cleans some minor stuff along the way: - Remove nonsensical/useless destructors - Use unique_ptrs for owned members - Remove unused members - Other minor style changes BUG=587620 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1701363003 .
2016-02-17Remove CFX_PtrList from renderer main loop.Tom Sepez
Exposes an iterator over the object list, but not the object holder, since pages and forms inherit from object holder, and we don't want to imply that there's only one thing that might be iterated over for those classes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1700183002 .
2016-02-17Expand all paths to be based off pdfium/ directoryDan Sinclair
This CL runs a script over the source and updates the include files to be a full path from the pdfium/ directory. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707923002 .
2016-02-17Fix windows build at ab27768d2359.Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1703193002 .
2016-02-17Banish CFX_ByteArray and CFX_WideArray to the XFA side.Tom Sepez
Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 .
2016-02-16Split CPDF_PageObjectHolder off from CPDF_PageObjectListTom Sepez
Eventually, we're going to expose an iterator over CPDF_PageObjectList that we don't want to be inherited by the CPDF_PageObjectHolder sub-classes: page and form. Also, the operations that the object holder performs dealing with inquiring about masks and such seem beyond the scope of what a list would provide. Hence the "Holder" name. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701073002 .
2016-02-16Fix name change after rebase 970c11eWei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1705553002 .
2016-02-16Refactor CPDF_SimpleParser and add unit tests.Wei Li
Remove unused member functions and simplify calls to find tag parameters. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1681403007 .
2016-02-16Simplify string function test macroWei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701123002 .
2016-02-16Fix GYP for nonxfa builds from last commit.chromium/2654chromium/2653Oliver Chang
Also disables mac build. libfuzzers are only built on Linux. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1703623002 .
2016-02-16Add initial libfuzzers for fm2js transpiling and XML parsing.Oliver Chang
GN source_sets are added so that the fuzzers can be built from //testing/libfuzzer in a Chromium checkout. GYP targets are also added to make sure these always build properly on our waterfall. These don't actually build the proper libfuzzers, but build the target fuzz function with a driver main() since the actual build process is quite complicated. R=tsepez@chromium.org, thestig@chromium.org BUG=587126 Review URL: https://codereview.chromium.org/1701103002 .
2016-02-16IFWL_App::Create() always passed adapter, "fuel" adapter unusedTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1707433002 .
2016-02-16Rework progressive render loop.Tom Sepez
Migrating this off of CFX_PrtList depends on first making this saner. The tricky part is checking whether new objects have been added to a partially-parsed layer. The old code used to do this by keeping track of the last element in the list, and seeing if it changes. It's far simpler to keep track of the last element processed, and just keep looking for more objects after it with each pass. Fold together some duplicated blocks along the way. Remove unused EstimateProgress() method. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1699443002 .
2016-02-12Fix the way to access marked content.Wei Li
When there is no dictionary for marked content, it potientially may cause crash. But it is not happening now since 1) we now check for the returned dict parameter 2) the alloc function in pdfium does zero initialization. BUG=pdfium:67 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1695633004 .
2016-02-12Add a class to better represent PS operations.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1686153004 .
2016-02-12One less PI.Tom Sepez
One less Bezier. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1692413002 .
2016-02-12Remove the FX_MIN macro.Tom Sepez
Bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1693913003 .
2016-02-12Make fx_bidi sane.Tom Sepez
Replace array of heterogenous ints with array of struct. Create a class for traversing a string. Flip array when R2L and process with forward iterator always. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1682983002 .
2016-02-11Remove unused NormalizeString()Tom Sepez
- NormalizeString() has 1 caller: - CTextBaseLine::WriteOutput(), which has only 1 caller: - CTextPage::WriteOutput(), which has only 1 caller: - PDF_GetPageText_Unicode(), which has only 1 caller: - PDF_GetPageText(), which has no callers. Removing this also makes CheckRotate(), NormalizeCompositeChar(), and CTextPage unused. Removing those makes CTextBaseline() unused. Removing that makes txtproc.h unused. PDF_GetTextStream_Unicode also unused. ... and so on until entire files can be removed. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1689843002 .
2016-02-10Banish CFX_PtryArray to XFA side only.Tom Sepez
The m_Operators array represents a heterogeneous instruction stream, so leave it as a void* for now. R=thestig@chromium.org, thestig@chromimum.org Review URL: https://codereview.chromium.org/1676413002 .
2016-02-09Add unit tests for ascii85 and hex decoders.chromium/2652chromium/2651chromium/2650chromium/2649chromium/2648chromium/2647chromium/2646Wei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1666663004 .
2016-02-09Several pure virtual IFWL_Adapter* classes not implemented.Tom Sepez
The routines that would return them always return NULL. Some path, however, didn't previously check for NULL. Those must have been bugs; treat such cases as unreachable. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1679103002 .
2016-02-09Banish CFX_WordArray to XFA-land.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1676913004 .
2016-02-08Fix for-loop which results in no-opLei Zhang
The existing code (added in https://codereview.chromium.org/1650793002/) changes the state of a copy of the object. Original CL: https://codereview.chromium.org/1679783002/ Original Author: hashimoto@chromium.org R=hashimoto@chromium.org Review URL: https://codereview.chromium.org/1681863002 .
2016-02-08Fix typo in standalone.gypi.Oliver Chang
TBR=thakis@chromium.org BUG=585261 Review URL: https://codereview.chromium.org/1683523002 .
2016-02-08Speculative fix for mac build failure.Oliver Chang
R=thakis@chromium.org BUG=585261 Review URL: https://codereview.chromium.org/1679843003 .
2016-02-08Convert NULLs to nullptrs in fpdf_parser_decode.cppOliver Chang
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1680923002 .
2016-02-08Tidy fpdfsave.cppTom Sepez
Remove CFX_PtrArray filelist. Promote ScopedFileStream to .h file and use it. Fix _CAPS names, bool returns, and put in anonymous namespace. FX_CreateMemoryStream() can't return null, so remove checks. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1672153002 .
2016-02-08CPDF_TextStream::m_pObjArray is always NULLTom Sepez
Also, use full path to include "text_int.h", as there are two of them; I suspect that fpdf_text_search was including the wrong one as the compiler didn't complain about a signature mismatch I had overlooked. In fact, rename the fxge file to avoid collision completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1679743003 .
2016-02-08Remove CFX_PtrArray from xfa/include/fwlTom Sepez
Fix IWYU in stl_util.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1672283002 .
2016-02-05Fix heap-use-after-free in CXFA_FFWidget::GetDataAcc()Jun Fang
BUG=pdfium:386 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1680463002 .
2016-02-06Add a parameter checker in CXFA_ScriptContext::QueryNodeByFlag()Jun Fang
BUG=pdfium:380 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1674453004 .
2016-02-05Combine two if/else blocks in CPDF_DIBSource::DownSampleScanline32Bit().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1671843002 .
2016-02-05lcms2: Fix a type confusion.chromium/2645chromium/2644chromium/2643Oliver Chang
R=tsepez@chromium.org BUG=584223 Review URL: https://codereview.chromium.org/1672163002 .
2016-02-05Remove CFX_FileSizeArray.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1671113002 .
2016-02-05Fix build broken at e059b5ba1260Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1671213002 .
2016-02-05Remove CFX_PtrArray from xfa's combobox.h.Tom Sepez
patch from issue 1665243003 at patchset 1 (http://crrev.com/1665243003#ps1) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1669313002 .
2016-02-05Support 16-bit images in downsampler.chromium/2642Lei Zhang
The downsampler was not sampling correctly from 16-bit images, resulting in using the RRG bytes (of the RRGGBB 16-bit pixel) for RGB in the 8-bit output. Original code review: https://codereview.chromium.org/1663983002/ Original author: ballbach@google.com BUG=583804 R=ballbach@google.com Review URL: https://codereview.chromium.org/1671833002 .
2016-02-04Fix an assertion failure in CXFA_DefFontMgr::GetDefaultFont()Jun Fang
BUG=pdfium:385 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1668813002 . Review URL: https://codereview.chromium.org/1669193002 .
2016-02-04Fix a crasher in CPDFSDK_Document::GetPageView()Jun Fang
BUG=pdfium:369 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1667643002 . Review URL: https://codereview.chromium.org/1668283003 .
2016-02-04Fix tests under no_v8 build optionTom Sepez
TBR=thestig@chromium.org TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1670843002 .
2016-02-04Use full include path in core/include/fpdfapiTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1669113002 .
2016-02-04Update README.md to match new master branchTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1667333002 .
2016-02-04Merge XFA fully back to master.Tom Sepez
2016-02-04Kill CFX_PtryArray in CXFA_FWLAdapterTimerMgr.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1664543005 .
2016-02-04Merge to Master: Remove CFX_PtrArray from fx_xml.hold_master_before_xfaTom Sepez
Original Review URL: https://codereview.chromium.org/1671473002 . (cherry picked from commit cdac3446f26751ff5db4123d87710f8b4e15d11c) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1665273002 .
2016-02-04Remove CFX_PtrArray from fx_xml.hTom Sepez
Removes another case of a void* array where the even elements mean one thing and the odd elements mean another. And even the odd elements aren't consistently typed -- leave for later. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1671473002 .
2016-02-04Call CXFA_Object::ToNode() rather than C-style casting.Tom Sepez
The static_casts<> are places where void* pointers are converted. Fix these in a subsequent CL by using a properly typed container. The const_casts<> are places where functions are missing "consts". Fix these in a subsequent CL, too. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1668003003 .
2016-02-04Pdfium does not create isolate when it runs in chromiumjinming_wang
BUG=pdfium:373 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1652873003 .
2016-02-03Make CXFA_Data sub-classes ctors explicit.Tom Sepez
Remove implicit CXFA_Node* operator. Add bool() operator. Remove IsExistInXML() which duplicates bool operator. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1663313002 .