summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-10Make CJBig2_Object::operator delete accept nullptrchromium/2455Vitaly Buka
Standard delete operator should do noting for nullptr. Overloaded CJBig2_Object::operator delete de-referenced provided pointer causing crashes after https://codereview.chromium.org/1192743004/ TBR=thestig BUG=508197 Review URL: https://codereview.chromium.org/1230763007 .
2015-07-04Remove a superfluous qualifier. No behavior change.Nico Weber
BUG=505296 R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1221673007.
2015-07-02Add parentheses around && within ||.chromium/2453chromium/2452chromium/2451chromium/2450chromium/2449chromium/2448Nico Weber
BUG=504699 R=raymes@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/1213433005.
2015-07-01Revert "Revert "Redo range check in CPDF_SampledFunc::v_Call().""Tom Sepez
This reverts commit 327080bacabb3d90094144e66ae57037d4a8d8e6. This re-lands the patch, but removes the tests which would require 512MB buffers to be reliably allocatable on small bots. It also adds small fixes accumulated while diagnosing it. R=sanqingsong@gmail.com Review URL: https://codereview.chromium.org/1214403002.
2015-07-01Fix some clang warnings with -Wmissing-braces in pdfium.Nico Weber
Clang warns if there are missing braces around a subobject initializer. The most common idiom that triggers this is: STRUCT s = {0}; if the first field of STRUCT is itself a struct. This can be more simply written as: STRUCT s = {}; which also prevents the warning from firing. Other instances of the warning have been fixed by adding braces where appropriate. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1213523004.
2015-06-30Fix a clang warning about a dangling else.chromium/2447chromium/2446Tom Sepez
BUG=none R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1223433002.
2015-06-30Revert "Redo range check in CPDF_SampledFunc::v_Call()."Tom Sepez
This reverts commit 74742a75ac7a07c08cf36fe6f4eaa91bed8236a3.
2015-06-30Redo range check in CPDF_SampledFunc::v_Call().Tom Sepez
The current |bitpos1| calculation protects the passed argument to _GetBits32(): |bitpos.ValueOrDie() + j * m_nBitsPerSample|, but doesn't account for adding in the sample length in that routine. Also bound bits per sample to something reasonable to avoid undefined behaviour on the shift to compute the max value. BUG=471990 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1219663003.
2015-06-29Remove references to three deleted files.Bruce Dawson
The gyp-to-ninja conversion process doesn't check for missing files, so they creep in. This change deletes three files that were deleted or never added but which are referenced from .gyp files. To see warnings about deleted files (Windows only) set GYP_GENERATORS to msvs-ninja,ninja before running build\gyp_pdfium. The msvs-ninja generator warns on missing files. R=tsepez@chromium.org BUG=483424 Review URL: https://codereview.chromium.org/1201273006.
2015-06-22Fix Javascript tests after commit f55771af6429.chromium/2445chromium/2444chromium/2443chromium/2442chromium/2441chromium/2440Lei Zhang
- Return true instead of false. All the other unsupported JS functions return true. - Adjust test expectations accordingly. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1196163006.
2015-06-22Cleanup: Get rid of CPDF_Reference::Create().Lei Zhang
Just call new CPDF_Reference instead. R=jam@chromium.org Review URL: https://codereview.chromium.org/1194343002.
2015-06-22Cleanup: Remove more checks for new returning NULL.Lei Zhang
R=jam@chromium.org Review URL: https://codereview.chromium.org/1198903002.
2015-06-22Cleanup: Remove CFX_MapPtrToPtr from fpdfppo.cpp.Lei Zhang
R=jam@chromium.org Review URL: https://codereview.chromium.org/1194153002.
2015-06-22Delete dead code for deleting pages and icons.Lei Zhang
1) Document::deletePages() 2) CPDFSDK_Document::DeletePages() 3) Document::removeIcon() 4) IconTree::DeleteIconElement() Originally (1) called (2), but only when FOXIT_CHROME_BUILD was not defined. Since it was always defined for PDFium, this was effectively dead code the whole time. Ditto for (3) and (4). The functions were deemed unsafe in https://crbug.com/67100 R=jam@chromium.org Review URL: https://codereview.chromium.org/1193323002.
2015-06-22Cleanup: Remove dead formfiller code.Lei Zhang
R=jam@chromium.org Review URL: https://codereview.chromium.org/1196853002.
2015-06-19Cleanup: Remove dead CPDF_InlineImages code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192413007.
2015-06-19Replace CFX_MapPtrTemplate with std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1181593003.
2015-06-19Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
2015-06-19Small cleanup of CPDF_TextObject and other CPDF_PageObject subclasses.Lei Zhang
- Add overrides - Remove empty overrides - Remove dead friends - Cleanup bad formatting R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1199563002.
2015-06-19Disintermediation.Tom Sepez
Removed several header files that simply proxy other headers. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1199553002.
2015-06-19Move zlib to third_party/Tom Sepez
Remove some fx_* files that simply included other files along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1197693003.
2015-06-18Move libopenjpeg to third_party/Tom Sepez
We get to delete a whole bunch of fx_foo.c files that did nothing but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this from the .gyp/.gn files instead. Also sort some "config"s in .gn file. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a Review URL: https://codereview.chromium.org/1185373010.
2015-06-18Fix CPDF_ICCBasedCS::GetDefaultValue heap-buffer-overflow.Tom Sepez
Introduced in ea44bd0. Re-animating the dead (code) usually turns out badly, and this is no exception. Make both of the uncallable methods go away. BUG=501889 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179773007.
2015-06-17Revert "Move libopenjpeg to third_party/"Tom Sepez
This reverts commit c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a.
2015-06-17Move libopenjpeg to third_party/Tom Sepez
We get to delete a whole bunch of fx_foo.c files that did nothing but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this from the .gyp/.gn files instead. Also sort some "config"s in .gn file. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1185373010.
2015-06-17Replace some Release() calls with virtual destructors.Tom Sepez
A virtual method that does |delete this| is an anti-pattern. Some classes can be de-virtualized instead. Throw in some unique_ptrs and delete dead code for good measure. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1192013002.
2015-06-17Run GYP after gclient sync.Tom Sepez
Makes the behaviour consistent with chromium. Also fix some indentation. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1193563002.
2015-06-17Move libjpeg to third_party/Tom Sepez
Removal of fpdfapi_ suffix can be part of a future CL. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1186113005.
2015-06-17Move lcms2 into third_partyTom Sepez
Second CL to apply less restrictive flags to third party. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1181943008.
2015-06-16Separate agg-authored code from fx-authored code.chromium/2439chromium/2438chromium/2437chromium/2436chromium/2435Tom Sepez
Creates a separate library so we can apply less-strict warnings to the code we can't change from upstream vs. the code we can change, reducing noise in the standalone build. Remove needless foo.{cpp,h} files that merely perform indirection via #include "some_other_path/foo.{cpp,h}". BUG=pdfium:166 R=brucedawson@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1152743007.
2015-06-16Add constructor for CPDF_ColorSpace.Tom Sepez
Prevents sub-classes from tweaking parent class instance vars. Also "fix" https://code.google.com/p/pdfium/issues/detail?id=170, assuming 0 is a good value. BUG=pdfium:170 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1185903002.
2015-06-15Make CPDF_PageModuleDef and CPDF_RenderModuleDef pure virtual.Lei Zhang
Get rid of the dummy implementations, which are never used when the modules have been initialized. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1177383003.
2015-06-15Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002.
2015-06-15Provide a constructor for CPDF_CountedObject.Tom Sepez
Make members protected and remove external manipulations. Move "*" into template since its always an indirection. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1182903002.
2015-06-15Remove some dead code.Lei Zhang
Review URL: https://codereview.chromium.org/1186673005.
2015-06-15Fix -Winconsistent-missing-override warnings.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1187463003.
2015-06-12Remove unneeded checks in CPDF_DocPageData::GetFontFileStreamAcc().Lei Zhang
The input cannot be null. Same for CPDF_Document::LoadFontFile(). Also set the contract for CPDF_Document::LoadFont() and adjust callers accordingly. Also remove unused CPDF_Document::FindFont(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1184673002.
2015-06-12Corpus tests check for unexpected successes.Tom Sepez
Update run_corpus_tests.py to always run all test cases, and just ignore the results that are supposed to fail. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178393002.
2015-06-11Remove trailing whitespaces in core.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1177973008.
2015-06-11Remove unused reflow code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1181803002.
2015-06-11Remove trailing whitespaces in fpdfsdk.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173343004.
2015-06-11Correct unexpected hinting fontsTom Sepez
If the font is 'tricky', it needs to be hinted by default according to the description in freetype. BUG=490814 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/7a2fcd8d1256c267380b40f2d2d8e98c3b181cee Review URL: https://codereview.chromium.org/1170313003.
2015-06-11Cleanup: Get this rid of "this->" in fpdfsdk/Lei Zhang
Also remove commented out code and trailing whitespaces. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1179653005.
2015-06-11Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
At one point in time, it may have made sense to indicate the expected alignment of the memory you're about to copy, but that was last century. The compiler will take care of it just fine. I stopped short of removing the FXSYS_ wrapper macros entirely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179693003.
2015-06-10Cleanup: Remove uses of "this->" in core/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002.
2015-06-10Convert CPDF_FontFileMap to std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1144333008.
2015-06-10Convert CPDF_IccProfileMap to use std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1143133008.
2015-06-10Remove FX_BSTR and FX_WSTR typedefs.chromium/2434chromium/2433chromium/2432chromium/2431chromium/2430Tom Sepez
These stand for const CFX_{Byte,Wide}StringC&, which is just monumentally confusing, since there are so many string types running around here. The following had manual changes: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp core/src/fpdfdoc/doc_form.cpp fpdfsdk/src/fpdf_ext.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1180593004.
2015-06-10Fix font rendering issues because of an incorrect transform.John Abd-El-Malek
This regressed in https://pdfium.googlesource.com/pdfium/+/71c24b839498fb89184002ed30fcff353e1e402c. The code would reach into FreeType internals and reset transform_flags. This would effectively set the font's transform matrix to the identity (since a transform is only used if the flag is set). I removed it because I assumed this is only a cache, and any other place that would call FT_Load_Glyph would have set a transform first. Apparently that's not the case (verified through adding some additional code). The fix is to reset the transform matrix after changing it. This is functionally equivalent to the previous behavior, since if the flag was 0 but there was a transform, it would be ignored until another transform is set. BUG=479434 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1163423005.
2015-06-10Convert CPDF_ImageMap to std::map.Lei Zhang
Also simplify CPDF_DocPageData::ReleaseIccProfile() since its first argument is always null. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1149273004.