summaryrefslogtreecommitdiff
path: root/core/src
AgeCommit message (Collapse)Author
2016-03-11Re-enable MSVC warning 4800 for compiling with chromium_codeWei Li
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
2016-03-10Split fpdf_parser_objects.cpp into per-class .cpp/.h files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1776913007 .
2016-03-10Change colorspace's number of components to be unsignedWei Li
Also remove unnecessary casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783933002 .
2016-03-10Split apart the remainder of fpdf_render_render.cpp into per-class files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1778173002 .
2016-03-09Split off IPDF_CryptoHandler into its own .cpp/.h files.Tom Sepez
CPDF_CryptoHandler was always a pure-virtual class, now it is named as IPDF_ to indicate this. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1782673002 .
2016-03-09Move ScopedSetInsertion to third_party/base/stl_util.hTom Sepez
Also move ScopedFileStream, since it isn't specific to the parser, and belongs with the fxcrt object it manipulates. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1780063003 .
2016-03-09Move CPDF_NumberTree to fpdfdoc.Tom Sepez
It's not used anywhere in fpdfapi, and can become restricted to fpdfoc/. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1776713004 .
2016-03-09Convert NULLs to nullptrs in fx_xml_parser.cppOliver Chang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1780703002 .
2016-03-09Fix build broken at ca78d9a52893Tom Sepez
Move time.h inclusion to new file. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1778893003 .
2016-03-09Split off IPDF_SecurityHandler and CPDF_StandardSecurityHandler.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1781593003 .
2016-03-09Fix build broken at 8388037a5c58Tom Sepez
Missing explicit include of <vector> TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1783433004 .
2016-03-09Split off CPDF_Parser and CPDF_SimpleParser into .h/.cpp filesTom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1773103003 .
2016-03-09Review and cleanup lint warnings.Dan Sinclair
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
2016-03-08Split off CPDF_Document into its own .cpp/.h files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1780503002 .
2016-03-08Re-land "Split CPDF_SyntaxParser into its own named .cpp/.h files."Tom Sepez
This reverts commit 06fae28d307fe051f0c7e890344cd487c2260910. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1775023003 .
2016-03-08Missing return, broken win build.Dan Sinclair
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1775913003 .
2016-03-08Revert "Split CPDF_SyntaxParser into its own named .cpp/.h files."Tom Sepez
This reverts commit d50095fb151688e119a7097aabce11e4b3d36244. Reason for revert: build broken. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1774293002 .
2016-03-08Split CPDF_SyntaxParser into its own named .cpp/.h files.Tom Sepez
BUG= R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1774753002 .
2016-03-08Reland "Fix chromium-style errors."Dan Sinclair
This reverts commit 594912241cd7d409b5f58a48ccffdc1904d844b2. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1769273002 .
2016-03-08FX_FONTDESCRIPTOR must be POD.Tom Sepez
Since it is malloc'd, memset, and such, and clang-cl notices this. Also delete unused function found by clang-cl. BUG=pdfium:429 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1777573003 .
2016-03-08Move fx_agg_driver files up one levelDan Sinclair
The agg driver files are split into src/ and include/ directories. This CL moves the source files up one level and removes the src/ and include/ directories. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773593007 .
2016-03-07Revert "Fix chromium-style errors."Dan Sinclair
This reverts commit c582c0ddfea8ba01c8449ed7841cdb33c12e0a98. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1769263002 .
2016-03-07Fix chromium-style errors.Dan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1772543003 .
2016-03-07Fix a regression caused by 7cf13c9Wei Li
BUG=591137 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1769183002 .
2016-03-04Small change to enable skia-backed version of pdfium.Cary Clark
This only directs paths to use Skia. Text and bitmaps still use antigrain. Clipping is disabled -- still figuring out pdfium's model for saving and restoring clips. Deleting the Skia canvas is disabled -- there's some build problem where the pdfium and skia libraries are built with slightly different options that I haven't tracked down. This is also why for the moment SkDebugf is defined locally. With this patch and pdf_use_skia=1 a modestly complicated PDF draws (mostly) correctly with pdfium_test. R=dsinclair@chromium.org, tsepez@chromium.org, dsinclair BUG= Review URL: https://codereview.chromium.org/1761453002 .
2016-03-03Combine StrToInt methods.Dan Sinclair
This Cl combines the two StrToInt implementations. In doing so I had to add some more overrides to toDecimalDigit() and add a isDecimalDigit(). BUG=pdfium:423 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1757283002 .
2016-03-03Fixup chromium-style warnings in fpdf_objects.hDan Sinclair
This CL fixes up chromium-style warnings in fpdf_object.h Specifically, the warnings fixed were: * Complex constructor has an inlined body. * Complex destructor has an inline body. * virtual methods with non-empty bodies shouldn't be declared inline. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1764793002 .
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-03-03Fix O(n^2) behaviour in parser.Tom Sepez
Despite what the c++11 spec says, std::list::size() is still O(n), not O(1). R=dsinclair@chromium.org, ochang@chromium.org Review URL: https://codereview.chromium.org/1763443003 .
2016-03-03Fix parsing of object numbers > 16,777,216.Dan Sinclair
Currently, there is a check that an object number is <= 0x1000000. If that check fails, we end up putting the parser into a bad state and fail to load documents. The object does not need to be in the XRef table, or referenced from the document, just be in the document. This Cl removes the size check and updates the various atoi calls to use a uint32_t instead of an int32_t so we don't end up getting strange values when converting from a string. BUG=455199 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1755273002 .
2016-03-02Don't load GDI+ if GDI is disabled.chromium/2666Tom Sepez
This is to fix an issue when win32k lockdown is enabled on PDF content which can cause application crashes. If GDI is disabled then there's little benefit to loading the GDI+ library. BUG=583038 Patch by forshaw@ R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1748163006 .
2016-03-02Check that the names buffer is not empty before passing to GetNameFromTT.Tom Sepez
Due to implicit conversion if the names buffer is empty then nullptr will be passed to GetNameFromTT which blindly dereferences it leading to a NPD if an invalid font file is read. BUG=583037 Patch by forshaw@ R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1763493003 .
2016-03-02Remove unused CFX_GrowOnlyPool.dan sinclair
The CFX_GrowOnlyPool class is never used, removed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1757043002 .
2016-03-01Remove implicit conversions and some cleanupWei Li
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751753002 .
2016-03-01Fix and enable lint checks.Dan Sinclair
This CL fixes and enables: * readability/namespace * readability/multiline_string * readability/multiline_comment * readability/inheritance * readability/function * readability/braces R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747123002 .
2016-03-01This Cl adds some whitespace and other formatting while removing some braces ↵Dan Sinclair
and making bits of the code simpler. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1742273002 .
2016-03-01Remove _FX_WINAPI_PARTITION_DESKTOP_Dan Sinclair
This does not appear to ever be defined, remove. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1753723002 .
2016-02-29Add CFX_FloatRect::ToFxRect().Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1752543002 .
2016-02-29Remove fx_fpf.h and IWYUDan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1748803002 .
2016-02-29Pass rect by const reference in SetClip_Rect().Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1745243002 .
2016-02-29Fixup FX_RECT and FX_SMALL_RECT classes.Tom Sepez
Put these first, so later on more complicated classes can have constructors that take these as arguments. Add better constructors, and call appropriately. Also don't be afraid to return these from methods since RVO. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1745683002 .
2016-02-29Add missing field initializers to g_PredefinedCMaps.Dan Sinclair
This CL adds some missing initializers for m_LeadingSegCount and m_LeadingSegs. This silences a series of warnings on OSX. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1744903002 .
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-26Re-land "Replace CPDF_Rect and CPDF_Point with CFX types."Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1737593006 .
2016-02-26Revert "Replace CPDF_Rect and CPDF_Point with CFX types."Tom Sepez
This reverts commit 3b8fdd34bdf57ec45291b77008a43249f838efcb. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1743753002 .
2016-02-26Replace CPDF_Rect and CPDF_Point with CFX types.Tom Sepez
Too many rectangle types. Remove CPDF_Rect #define, and make an equivalent point type in CFX, but stop short of consolidating the N different forms of rectangles in CFX. Also banish PDF_ClipFloat to the one .cpp file that needs it, since it was in the vicinity of the .h file changes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740923003 .
2016-02-25Fix static initializers.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1725303003 .
2016-02-25Use std::lower_bound() in a couple places.Lei Zhang
Do some cleanups along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1732223002 .
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 .