summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-02Rename png_ functions conflicting with chrome.Tom Sepez
Part of the work required to ship XFA with chrome. BUG=pdfium:396 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1763493002 .
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-01Replace FX_LPCRECT typedef with underlying typesTom Sepez
Helps with transparency. Also remove default args and use override consistently in the affected methods. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1751093002 .
2016-03-01Add myself to AUTHORS file.Dan Sinclair
I assumed there was a *@chromium.org entry in there, so never looked. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1754763002 .
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-03-01Remove FX_NUM_DOUBLEDan Sinclair
This is never defined in the current code base. Remove. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751913002 .
2016-03-01Remove XFA_PARSE_HAS_LINEIDENTIFIERDan Sinclair
This flag is always defined, remove conditional code and flag. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1752503004 .
2016-03-01Remove _XFA_EMBDan Sinclair
The _XFA_EMB flag is never defined, remove conditionals. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751033002 .
2016-03-01Cleanup some fsdk_common definesDan Sinclair
* FIELDFLAG_DONOTSPELLCHECK is defined on line 20. * 1 << 25 is used by FIELDFLAG_RICHTEXT already. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1745263002 .
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-29Remove xfa_fm2js.h and IWYU.Dan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1745023003 .
2016-02-29Remove foxitlib.h and foxitxfa.h and IWYU.Dan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1746053003 .
2016-02-29Speculative fix for windows broken at d5e7b355b8c4.Tom Sepez
I'm guessing that |small| is #defined somewhere. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1746243002 .
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-29Using size_t to silence warnings.Dan Sinclair
Change a couple int32_t's to size_t in order to fix warnings on OSX. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747793002 .
2016-02-29Remove fgas_base.h and IWYUDan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1749703002 .
2016-02-29Remove _XFA_LAYOUTITEM_* defines.Dan Sinclair
The _XFA_LAYOUTITEM_ProcessCACHE_ define is always set and the _XFA_LAYOUTITEM_MAPCACHE_ define is never set. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1750623002 .
2016-02-29Remove #if 0 code.Dan Sinclair
This code is dead, remove it. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1746793002 .
2016-02-29Remove _FX_USEGASFONTMGR_ as it is always definedDan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1749793002 .
2016-02-29Remove #ifdef _FXEMB as it is not definedDan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1749783002 .
2016-02-29Remove wParentIndex from XFA_ELEMENTHIERARCHY.Dan Sinclair
This value is never set and never read. Removing it fixes a series of warnings when building on OSX as g_XFAElementPropertyIndex does not initialize the value. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1744893002 .
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-29Remove _FXLIB_NEW_VERSION_ as it is always defined.Dan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1746803002 .
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-26Fix windows build broken at 007e6c0Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1727273007 .
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-26Silence shift-negative-value warnings only on POSIX/Clang.chromium/2665chromium/2664chromium/2663chromium/2662Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1740103002 .
2016-02-26Replace or remove _FX control-flow definesTom Sepez
They buy us nothing and obfuscate the logic. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740223002 .
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-25Remove FDE_USEFORMATBLOCK.Dan Sinclair
This does not appear to ever be defined. There are a few methods which end up being empty after this change, removed those and their callers as well. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1736133002 .
2016-02-25_XFA_VERIFY_Checksum is always defined.Dan Sinclair
Remove the define and the #ifdef checks. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1741543002 .
2016-02-25Remove fde_mem.hDan Sinclair
The fde_memory.h include wasn't needed. This CL converts the FDE_NewWith and FDE_DeleteWith calls to their FXTARGET_ counterparts. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736053002 .
2016-02-25Remove fgas.h and IWYU.Dan Sinclair
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740863002 .
2016-02-25Use std::unique_ptr in CXFA_FMParse.Lei Zhang
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1740643002 .
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-25Remove fde.h and IWYU.Dan Sinclair
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1735353002 .
2016-02-25Make CXFA_Node::GetMeasure() and friends const.Lei Zhang
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1735333002 .
2016-02-25Remove set but unsed variables.Lei Zhang
And other nearby dead code. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1740613002 .
2016-02-25refactor CPDF_Font and subclassesWei Li
Get rid of types; use virutal functions instead of type based checking; remove unused functions; change casts; simplify load()/UnicodeFromCharCode()/CharCodeFromUnicode() calling. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729823004 .