summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-10Remove IFWL methods proxied from CFWL classeschromium/2916dsinclair
This CL removes a few methods from IFWL that are around just to proxy from CFWL methods which are, in turn, never called. Review-Url: https://codereview.chromium.org/2486333004
2016-11-10IFWL method and param cleanupdsinclair
Cleaning up virtual methods, unused methods, and visibility. Review-Url: https://codereview.chromium.org/2491103002
2016-11-10Roll V8 to 1fe5910c.thestig
Also roll trace_event to 6232c13e to match. Just a routine roll. TBR=jochen@chromium.org Review-Url: https://codereview.chromium.org/2489413002
2016-11-10Cleanup methds in IFWL_MonthCalendardsinclair
This CL cleans up the methods and parameters in IFWL_MonthCalendar. Review-Url: https://codereview.chromium.org/2493583002
2016-11-10Fold IFWL_DateTimeCalendar into IFWL_MonthCalendardsinclair
The IFWL_MonthCalendar was never instantiated and had a single sub-class. This CL folds the subclass into IFWL_MonthCalendar and uses MonthCalendar directly. Review-Url: https://codereview.chromium.org/2491443003
2016-11-10Continue IFWL cleanupdsinclair
Cleaning up more IFWL classes. Review-Url: https://codereview.chromium.org/2492563002
2016-11-10Convert FWL_SCBCODE to an enum classdsinclair
This Cl changes the enum into an enum class and updates calling code to pass the enum instead of a uint32_t Review-Url: https://codereview.chromium.org/2482253004
2016-11-10Use more unique_ptrs for CPDF_Annot and friends.thestig
Review-Url: https://codereview.chromium.org/2494583002
2016-11-10Use more unique_ptrs in CPVT_GenerateAP.thestig
Review-Url: https://codereview.chromium.org/2488103002
2016-11-10Continue cleaning IFWL classesdsinclair
More work cleaning up visiblity, unused methods and return values. Review-Url: https://codereview.chromium.org/2489013002
2016-11-10Free the FPDF_SYSFONTINFO_DEFAULT instead of deletenpm
It was created with FX_Alloc instead of new. So use FX_Free instead of delete. BUG=664072 Review-Url: https://codereview.chromium.org/2485383005
2016-11-10Cleanup IFWL_Widget visibility and virtual parametersdsinclair
This Cl cleans up the IFWL_Widget class including: * Making members and methods private where possible * Removing virtual methods that are never overridden * Removing methods that do nothing * Removing unchecked FWL_Error return codes Review-Url: https://codereview.chromium.org/2488953003
2016-11-09Roll DEPS for clang to 63ca7c81.thestig
Also roll DEPS for build/ to 98f2d80a which is required, and update the build_overrides for the new build configs. Also bump the android_ndk_revision version to 26d93ec07. BUG=chromium:663913 TBR=dpranke@chromium.org Review-Url: https://codereview.chromium.org/2488143002
2016-11-09Do not load main cross ref table for first page in linearized pdf.art-snake
For the first page in linearized PDFs, it is not necessary to load the main xref table, because it have separate special xref table in the file header. This decreasing the time to show first page in PDF plugin. Review-Url: https://codereview.chromium.org/2483633002
2016-11-09Add early returns in CJBig2_TRDProc::decode_Arith when decode fails.npm
None of the decodes in the method are currently being checked. This is causing pdfium to take a long time rendering corrupted files. Thus, I added a couple of early returns to help prevent this from happening. BUG=450971 Review-Url: https://codereview.chromium.org/2493633002
2016-11-09Tidy fpdfsdk/fpdf_flatten.cppchromium/2915tsepez
Remove CFX_ArrayTemplate usage. Use std::min(), std::max() in a few places. Review-Url: https://codereview.chromium.org/2491583003
2016-11-09Fix receiving page, if it have not obj num.art-snake
In some PDF's the page may not have the obj num. For example: testing\corpus\fx\other\jetman_std.pdf in pdfium repository. And CPDF_Document::GetPage failed on second call for this page. Restart the traversing of pages, to fix this Also added test. Review-Url: https://codereview.chromium.org/2491583002
2016-11-09Return unique_ptr from CPDF_Object::Clone().tsepez
Because that's what clone does. There are numerous release() calls that will go away as more code is converted. Review-Url: https://codereview.chromium.org/2484033002
2016-11-09Rename IFWL_ListItem to CFWL_ListItemdsinclair
This CL removes the empty IFWL_ListItem class and uses CFWL_ListItem in its place. As well, the CFWL_ComboListItem is removed and replaced with CFWL_ListItem. These were almost duplicate classes and the one missing field added to CFWL_ListItem. Review-Url: https://codereview.chromium.org/2487943003
2016-11-09Revert of Clean up fx_codec_icc.cpp (patchset #1 id:1 of ↵kcwu
https://codereview.chromium.org/2482663002/ ) Reason for revert: Max cmsChannelsOf() is 15, which is larger than expectation of existing code and cause crashes (at least the fuzzer). BUG=chromium:663240 Original issue's description: > Clean up fx_codec_icc.cpp > > Committed: https://pdfium.googlesource.com/pdfium/+/a94fc11866adb1b9ca4a4e1afb4fb574ed472e07 TBR=dsinclair@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. Review-Url: https://codereview.chromium.org/2485363002
2016-11-08Define IsFloatEqual macro properly.thestig
BUG=chromium:663253 Review-Url: https://codereview.chromium.org/2482373002
2016-11-08Fix regression in annotation key event handling.thestig
BUG=chromium:663294 Review-Url: https://codereview.chromium.org/2482143002
2016-11-08Fix abort above FPDFPage_Flattentsepez
Main issue: FPDFPage_Flatten trying to re-add an indirect object. BUG=662698 Review-Url: https://codereview.chromium.org/2489653003
2016-11-08Add FPDF_FreeDefaultSystemFontInfo APInpm
Added method that will cast into FPDF_SYSFONTINFO_DEFAULT and delete. This will allow using FPDF_GetDefaultSystemFontInfo() without memory management problems. Review-Url: https://codereview.chromium.org/2485283002
2016-11-08Cleanup CPDF_DeviceCS and friends.chromium/2914thestig
Review-Url: https://codereview.chromium.org/2482273002
2016-11-08Fix CPDFSDK_FormFillEnvironment destruction ordertsepez
This was broken in 6c659ab2. Also fix m_PageMap naming while we're at it to match conventions. TEST=covered by forthcoming bug 662698 CL. Review-Url: https://codereview.chromium.org/2489663002
2016-11-08Compile fuzzer sources in standalone builds. (try 2)thestig
- Add a template for fuzzers to remove redundancy. - Sort fuzzers in alphabetical order. Previous attempt: https://codereview.chromium.org/2480043002/ Review-Url: https://codereview.chromium.org/2481933003
2016-11-08Add FPDFDest_GetLocationInPage APIdsinclair
Add an API to get the value of the /XYZ destination parameter. This CL was originally from https://codereview.chromium.org/1960193003/ by halcanary@. Review-Url: https://codereview.chromium.org/2481743004
2016-11-07Fix #include after commit c09625ca.thestig
TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/2477323004
2016-11-07Force compiler to deduce src type for checked_cast<dst, src>.tsepez
Otherwise, we might be silently doing an unsafe cast before applying the check if the actual argument doesn't match the exact src type. Review-Url: https://codereview.chromium.org/2484953003
2016-11-07Hold trailers via unique_ptrs.tsepez
Follow-up from ParseIndirectObject() CL. This will get cleaner once CPDF_Object::Clone itself returns unique_ptrs. Pack some bools together while we're at it. Review-Url: https://codereview.chromium.org/2479353002
2016-11-07Sync pdfium tryserver list with main pdfium waterfall.thestig
BUG=pdfium:627 Review-Url: https://codereview.chromium.org/2483003002
2016-11-07Use unique_ptr return from CPDF_Parser::ParseIndirectObject()tsepez
In turn, propgate to callers. This introduces a few release() calls that will go away as more code is converted. It also removes a couple of WrapUnique calls that are no longer needed as ownership of the object flows along. Review-Url: https://codereview.chromium.org/2479303002
2016-11-07Rename CPDF_Linearized to CPDF_LinearizedHeadertsepez
My OCD insists that classes be named after nouns, and "linearized" feels like an adjective. Remove a redundant "if" while at it. Review-Url: https://codereview.chromium.org/2482973002
2016-11-07lcms: backport upstream commit c0a98d86kcwu
This fixed several issues. BUG=chromium:654265,chromium:657282,chromium:654676,chromium:654313 Review-Url: https://codereview.chromium.org/2482523003
2016-11-07Fold DataProviders into parent classesdsinclair
This CL removes the data provider classes and folds the code into the parent classes. Review-Url: https://codereview.chromium.org/2480233003
2016-11-07Remove unused CFX_QuartzDevice(Driver) classes.chromium/2913npm
Review-Url: https://codereview.chromium.org/2484453002
2016-11-07lcms: Fix memory leak in ReadSegmentedCurvekcwu
BUG=chromium:658223 Review-Url: https://codereview.chromium.org/2480013002
2016-11-07Clean up fpdf_page_parsersnpm
- The code in fpdf_page_parser is only called by CPDF_StreamContentParser, so moved there. - Split fpdf_page_parser_old into its two classes - Renamed the corresponding unittests accordingly. - Moved PDF_ReplaceAbbr to namespace - Fixed few nits - Added TODO because CPDF_StreamParser has a lot of code similar to CPDF_SyntaxParser Review-Url: https://codereview.chromium.org/2474303003
2016-11-07Reland of Unify some codeart-snake
Unify some code Move parsing of linearized header into separate CPDF_Linearized class. Original review: https://codereview.chromium.org/2466023002/ Revert review: https://codereview.chromium.org/2474283005/ Revert reason was: Breaking the chrome roll. See https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/331856 ___ Added Fix for fuzzers. Review-Url: https://codereview.chromium.org/2477213003
2016-11-07Clean up fx_codec_icc.cppkcwu
Review-Url: https://codereview.chromium.org/2482663002
2016-11-07Revert of Compile fuzzer sources in standalone builds. (patchset #3 id:40001 ↵npm
of https://codereview.chromium.org/2480043002/ ) Reason for revert: Breaking the tree: https://build.chromium.org/p/client.pdfium/builders/windows_xfa_32/builds/619/steps/compile%20with%20ninja/logs/stdio Original issue's description: > Compile fuzzer sources in standalone builds. > > - Add a template for fuzzers to remove redundancy. > - Sort fuzzers in alphabetical order. > > Committed: https://pdfium.googlesource.com/pdfium/+/470b5fa8f8dbfd2aa702d9d8cfdc03a7b486b374 TBR=dsinclair@chromium.org,thestig@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2480323002
2016-11-07Compile fuzzer sources in standalone builds.thestig
- Add a template for fuzzers to remove redundancy. - Sort fuzzers in alphabetical order. Review-Url: https://codereview.chromium.org/2480043002
2016-11-04Revert of Unify some code (patchset #14 id:260001 of ↵chromium/2912chromium/2911dsinclair
https://codereview.chromium.org/2466023002/ ) Reason for revert: Breaking the chrome roll. See https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/331856 Original issue's description: > Unify some code > > Move parsing of linearized header into separate CPDF_Linearized class. > > Committed: https://pdfium.googlesource.com/pdfium/+/71333dc57ac7e4cf7963c83333730b3882ab371f TBR=thestig@chromium.org,brucedawson@chromium.org,art-snake@yandex-team.ru # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2474283005
2016-11-04Unify some codeart-snake
Move parsing of linearized header into separate CPDF_Linearized class. Review-Url: https://codereview.chromium.org/2466023002
2016-11-04Implement FPDF_VIEWERREF_GetName() API.chromium/2910thestig
This is a generic API function to retrieve any viewer preference of type name. BUG=pdfium:414 Review-Url: https://codereview.chromium.org/2475923003
2016-11-04Pass object to ReplaceIndirectObjectIfHigherGeneration() by unique_ptr.tsepez
Review-Url: https://codereview.chromium.org/2477003002
2016-11-04CHECK for re-addition of indirect objectstsepez
Review-Url: https://codereview.chromium.org/2471263005
2016-11-04Revert: Only create widgets if really neededdsinclair
This CL reverts ef523dd36aea991084b8b934df846014a5c09c6f which causes issues with syncing of form fields over pages. The initial bug had follow on fixes which seem to have rendered this fix un-needed. BUG=chromium:632709, chromium:661294 Review-Url: https://codereview.chromium.org/2473103003
2016-11-04Traverse PDF page tree only once in CPDF_Document Try 3npm
Now, we do not start traversal from where we were at, but from the top. This makes the code less prone to bugs, as now there is no need to call methods to recursively fix things. This will save a lot of time when the trees are rather flat, as in the PDF file in the bug. It can still be slow, for instance if we have a chain of page nodes, and the last in the chain contains all of the pages (this is artificial). Try 2 at https://codereview.chromium.org/2442403002/ Also added test where Try 2 would have failed. Tested the pdf from the bug on my Mac: With this CL: load in 21 seconds Without this CL: did not load in 4 minutes, got tired of waiting BUG=chromium:638513 Review-Url: https://codereview.chromium.org/2470803003