summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2015-06-10Cache the CPDF_Annot's subtype, since it should never changes.Lei Zhang
BUG=495300 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1178513002.
2015-06-10Convert CPDF_PatternMap to std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1162123004.
2015-06-10Cleanup: Remove CFFL_IFormFiller::GetCommitKey() that always returns 0.Lei Zhang
Remove callers and related code that all just pass zeros around. Also remove CFFL_IFormFiller::GetKeyDown(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1149623012.
2015-06-10Convert CPDF_ColorSpaceMap to std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1154963003.
2015-06-10Remove typdefs for pointer types in fx_system.h.Tom Sepez
This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003
2015-06-10Convert CPDF_FontMap to std::map.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1151133004.
2015-06-09Revert 'Correct unexpected hinting fonts'JUN FANG
TBR=tsepez@chromium.org BUG=N/A Review URL: https://codereview.chromium.org/1174583003
2015-06-09Correct unexpected hinting fontsJUN FANG
If the font is 'tricky', it needs to be hinted by default according to the description in freetype. BUG=490814 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1170313003
2015-06-09Use stdint.h types throughout PDFium.Tom Sepez
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
2015-06-08Remove more cruft from fx_system.hTom Sepez
- include system headers first and alphabetize. - remove unsupported FX_WIN32_MOBILE symbol. - actually define a FX_WIN64 symbol and make consistent. - use final/override, not FX_FINAL. - let stdint.h resolve FX_WORDSIZE concerns. - unused FX_ERR and FX_SUCCESS() macros. - unused FX_LSB_FIRST macro. - outline FX type deprecation plan. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1169963003
2015-06-08Fix potentially massive memory leak in CPDF_DIBSource::LoadJpxBitmap().chromium/2429chromium/2428chromium/2427Lei Zhang
Leaks can happen in several places. For this particular bug, it happens when there is a colorspace component count mismatch. BUG=497191 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1153633009
2015-06-05Cleanup: Make CPDF_Annot::m_pAnnotDict private.Lei Zhang
Remove dead code in CPDF_Annot as well. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1157773012