summaryrefslogtreecommitdiff
path: root/core/src/fxcodec
AgeCommit message (Collapse)Author
2016-03-03Remove other remaining use of std::list::size() from loop body.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1761993002 .
2016-02-27Cleanup forward declarations.dan sinclair
This CL removes duplicate forward declarations, removes extraneous declarations and adds a couple of missing declarations. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1741003002 .
2016-02-26Remove some FX_BOOLsTom Sepez
Grepping for FX_BOOL and |==| on the same line gives a very strong clue that the expression won't be out of range of the |bool| type iteself. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736323003 .
2016-02-25Rename some functions that start with underscore.Lei Zhang
Fix misc issues along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1739623002 .
2016-02-24Fixing whitespace lint errors.Dan Sinclair
This CL enables several of the diabled whitelist/* lint checks. R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1730553002 .
2016-02-23Remove FXSYS_Div.Dan Sinclair
This is just a wrapper for (a) / (b). Inline the divide. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1727793002 .
2016-02-22Remove foo != NULL outside of xfa/Lei Zhang
Most of these are from the XFA branch. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1720043003 .
2016-02-19Revert "Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.""Tom Sepez
This relands the CL at https://codereview.chromium.org/1710403002 Tests passed locally. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1717603003 .
2016-02-19Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf."Tom Sepez
This reverts commit 78353d5dbc0b0c9b2d6946005439a51efa7d108c. Reason for revert Failed tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1719493002 .
2016-02-19Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.Tom Sepez
Always call ExpandBuf(), and if it returns, we know the subsequent calculations won't overflow. Also use std::unique_ptr, and fix unintentional copies thus detected by its suppressed copy ctor in fsdk_baseform.cpp Also Remove unused CFX_BinaryBuf::TakeOver(), AppendFill(), CopyData(). Also remove operator= in favor of using <<, for similarity with std::ostream and friends. Also move ByteStringC methods to CFX_ByteTextBuf sub-class. Also re-order members, may pack tighter on 64-bits. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1710403002 .
2016-02-18Remove gotos in CJBig2_TRDProc.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1708413002 .
2016-02-18Fixup incorrect include guards.Dan Sinclair
This CL updates include guards throughout the code base to be in the chromium style. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707893004 .
2016-02-18Sort headers in non-xfa directories.Dan Sinclair
This CL runs the chromium sort-headers.py script over the non-xfa code. XFA will be done after the includes have been updated to full paths. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711793002 .
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-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-01-27XFA: Fix DOS newlines, final round.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1641963002 .
2016-01-15XFA: Rename libpng to libpng16.chromium/2625chromium/2624Lei Zhang
Otherwise this conflicts with Chromium's copy if the include paths just happens to be in the wrong order. Since the two copies of libpng are of different versions, we cannot use Chromium's copy. TBR=tsepez@chromium.org,ochang@chromium.org Review URL: https://codereview.chromium.org/1599513004 .
2016-01-15XFA: Add another valid fxcodec DEPS entry.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1591833002 .
2016-01-15XFA: Upgrade libpng to 1.6.20.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1591483003 .
2016-01-11Merge to XFA: Switch most min/max macros to std::min/max.Lei Zhang
Fix lint errors along the way. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 . (cherry picked from commit 9adfbb0920a258e916003b1ee9515e97879db82a) Review URL: https://codereview.chromium.org/1577503002 .
2016-01-08XFA: Remove relative includes outside of xfa/.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1572523002 .
2016-01-07XFA: Upgrade to libtiff 4.0.6.Lei Zhang
R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1563103002 .
2015-12-24Merge to XFA: Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 . (cherry picked from commit d20dfba2ae10e8aeb328328f09da79ff904110a8) Review URL: https://codereview.chromium.org/1545183002 .
2015-12-24Merge to XFA: Fix failed JPX image renderingJun Fang
BUG=pdfium:338 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1549043003 . Review URL: https://codereview.chromium.org/1549083002 .
2015-12-22Merge to XFA: Start using allowed C++11 features.Lei Zhang
TBR=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 . Review URL: https://codereview.chromium.org/1545823002 . (cherry picked from commit ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6) (cherry picked from commit 87f7d29531dabfd66e547a6be31a08272ff631d5) Review URL: https://codereview.chromium.org/1542213002 .
2015-12-18Merge to XFA: Cleanup CJBig2_HuffmanTable and friends.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1536923002 . (cherry picked from commit 9c061e2dfb22a0e321728b73c8650eded8828d90) Review URL: https://codereview.chromium.org/1539023002 .
2015-12-18Merge to XFA: Fix the JBIG2 decoding regressions from commit bc4b82e and ↵Lei Zhang
8a9ce57. BUG=566063 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1534323002 . (cherry picked from commit 20c8a9a66ea710b96493c9048fb65753e68b48fc) Review URL: https://codereview.chromium.org/1540673003 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo == NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo != NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
2015-12-10Merge to XFA: Fix integer and bounds issues in sycc4{22,44}_to_rgb.Oliver Chang
Also clean up while we're here. BUG=557223 TBR=tsepez@chromium.org Original Review URL: https://codereview.chromium.org/1512833008 . (cherry picked from commit 08750d0400f1635ac33c3234cb11b192f31a1eeb) Review URL: https://codereview.chromium.org/1521473003 .
2015-11-25Manual fixups to PDF_ENABLE_XFA in core/Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477663003 .
2015-11-25Inflict PPDF_ENABLE_XFA ifdefs on XFA core/Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1471323004 .
2015-11-25Merge to XFA: Fix two memory leaks from pdfium_unittestsQin Zhao
- remove redundant alloc in fx_codec_jpx_unittest.cpp - free memory allocated by HexDecode calls in fpdf_parser_decode_unittest.cpp BUG=PDFium:239 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1467183006 . (cherry picked from commit 6c2d736011c09266015d3e2a0b9c08aeba1bbf31) Review URL: https://codereview.chromium.org/1477833002 .
2015-11-24Merge to XFA: Fix a NULL pointer crash in the CJBig2_Image copy constructor.Lei Zhang
Also change the copy ctor to take a const ref. BUG=560520 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1472113002 . (cherry picked from commit d03bc01003ae2603dafdc07b901ffef0a509a2b9) Review URL: https://codereview.chromium.org/1478473002 .
2015-11-20Merge to XFA: Change |CCodec_ScanlineDecoder::m_Pitch| to FX_DWORDOliver Chang
This matches the type of the corresponding |CFX_DIBSource::m_Pitch|, where integer overflow is checked for FX_DWORD. This change is propagated to many other places. Also, check for integer overflow in |CCodec_RLScanlineDecoder::Create| during the calculation of |m_Pitch| since it aligns to 4 bytes while overflow was was previously checked without this alignment. TBR=tsepez@chromium.org BUG=555784 Review URL: https://codereview.chromium.org/1460033002 . (cherry picked from commit e7950df70a2fd658f466751b29483436cb31e829) Review URL: https://codereview.chromium.org/1461363002 .
2015-11-20Reduce diffs with master in coreTom Sepez
This week's version. Mostly whitespace, but takes the master version of core/src/fxge/ge/fx_ge_text.cpp verbatim. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1462923004 .
2015-11-19Merge to XFA: Add more overrides.Lei Zhang
Using Chromium's clang + build options, there's more override warnings. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1453643002 . (cherry picked from commit 126ba519bdd489ec6c285d1410dcae773e8ef673) Review URL: https://codereview.chromium.org/1458373002 .
2015-11-19Merge to XFA: Add a missing setjmp() to CCodec_JpegDecoder::v_GetNextLine().Oliver Chang
If jpeg_read_scanlines() ends up calling the error callback, we longjmp into some undefined state. BUG=558840 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1463563003 . (cherry picked from commit 06e33aec03f13c76d9eff5c09cb03e142b0c5ef1) Review URL: https://codereview.chromium.org/1462253004 .
2015-11-16Merge to XFA: Reland "Cleanup some numeric code.""Dan Sinclair
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1449873003 . (cherry picked from commit 3f148915d12f54a946a0c0bf526162b79c39d650) Review URL: https://codereview.chromium.org/1452673002 .
2015-11-12Merge to XFA: Remove relative includes.Lei Zhang
That refer to parent directories. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 . (cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228) Review URL: https://codereview.chromium.org/1439223003 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-09Merge to XFA: Fix all relative includes to core.Lei Zhang
Do some IWYU to fix build errors due to files that have no #includes but just happened to work previously because the #includes were in the right order. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1407423004 . (cherry picked from commit 9e7cd8ffb81c564e1102f6c6459ec0942a0b11ea) Review URL: https://codereview.chromium.org/1425163004 .
2015-11-09Merge to XFA: Remove dead code in fx_codec_jbig_enc.cpp.Lei Zhang
TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1420693004 . (cherry picked from commit 37e4a11e58257b757bec2700bc53facc59d0b845) Review URL: https://codereview.chromium.org/1423583005 .
2015-11-06XFA: Actually fix all relative includes to third_party.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413253003 .
2015-11-06Merge to XFA: Fix all relative includes to third_party.Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. - And fix XFA's lack of #includes. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . (cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c) Review URL: https://codereview.chromium.org/1434543003 .
2015-10-30Merge to XFA: Remove external jpeg provider interface.Tom Sepez
(cherry picked from commit 3d59bd9d66d01eb39c30742bce67fa0376cb4ea8) Review URL: https://codereview.chromium.org/1407903005 . Conflicts: core/include/fxcodec/fx_codec_provider.h core/src/fxcodec/codec/codec_int.h core/src/fxcodec/codec/fx_codec_jpeg.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1412713009 .
2015-10-30XFA: Remove null CFX_DIBAttribute default argument.Tom Sepez
Add some consts and overrides along the way. Group some statics together. Tidy some unused vars. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411683005 .
2015-10-30XFA: bring fx_codec_fax in-line with masterTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1419473006 .
2015-10-29XFA: remove unsafe exif parsing codeTom Sepez
Fortunately, this could only be called with a null buffer, so none of unchecked lengths could be used. The remaining use of the CFX_/IFX_DIBAttributeEx class is as a table, so put one directly in the CFX_DIBAttribute. Fix a "register" warning along the way. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1425983002 .
2015-10-29XFA: Remove unused _JpegLoadIccProfile()Tom Sepez
In turn, remove now unused _JpegIsIccMarker(). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1418653008 .