summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2016-05-26Fix a bug which may cause infinite loopweili
When the condition is "status == FXCODEC_STATUS_DECODE_TOBECONTINUE" while |status| never gets updated in the loop, it would enter infinite loop. Also, since Start_decode_MMR() never returns FXCODEC_STATUS_DECODE_TOBECONTINUE, there is no point to check on the return value for that. Review-Url: https://codereview.chromium.org/2013263002
2016-05-26Remove checks for _WIN32_WCE.thestig
Review-Url: https://codereview.chromium.org/2011563006
2016-05-26Make CPDF_IndirectObjectHolder::InsertIndirectObject return a bool.thestig
Fix some nits in CPDF_Parser::LoadCrossRefV5() and other callers. Review-Url: https://codereview.chromium.org/2019443002
2016-05-26skia: add bitmap color table supportcaryclark
Fix 2/4/8 bits per pixel bitmaps that PDFium transposes into 8 bpp indexed. R=tsepez@chromium.org,dsinclair@chromium.org,reed@google.com Review-Url: https://codereview.chromium.org/2011153002
2016-05-26Clean up CPDF_TextRenderer slightly.thestig
- Remove dead code - Remove default arguments - Move code into anonymous namespace Review-Url: https://codereview.chromium.org/2013023002
2016-05-26Remove default arguments in CFX_RenderDevice.thestig
Review-Url: https://codereview.chromium.org/2011943004
2016-05-26Remove default argument from RestoreState() methods.thestig
Review-Url: https://codereview.chromium.org/2009803003
2016-05-25Clean up fx_ge.h and IWYU.thestig
Review-Url: https://codereview.chromium.org/2009253003
2016-05-25Remove FX_GAMMA() and friends. They do nothing.thestig
Review-Url: https://codereview.chromium.org/2017503002
2016-05-25Banish CFX_PrivateData to the XFA sidetsepez
Remove an unused inheritance. The remaining usages are a little more intricate. Review-Url: https://codereview.chromium.org/2015743002
2016-05-25Remove CFX_PrivateData inheritance from CPDF_InterFormtsepez
It wasn't being used. Also rename a static member from m_ to s_, just because. Review-Url: https://codereview.chromium.org/2009393002
2016-05-25Remove CFX_PrivateData from CPDF_Documenttsepez
Replace it with two generic slots for Links and Codec usage. Since the codec is at a lower layer than the document, we don't provide separate get/set methods, since having a document upon which to call these would be a layering violation. Do the same for the Links for simplicity. Review-Url: https://codereview.chromium.org/2005193003
2016-05-25Remove CFX_PrivateData from CPDF_Pagetsepez
CFX_PrivateData served two purposes here: The first was to hold an opaque pointer to the corresponding page structure in the next higher layer, of which it knows no details. Introduce an empty CPDF_Page::View class to represent this higher class, so as to get type safety while preserving layering. The second was to hold an opaque render context, which it also happened to own. Make this a CFX_Deletable to help with management. Also remove an unused inheritance from CFX_PrivateData in CPDF_Annot. Review-Url: https://codereview.chromium.org/2008553008
2016-05-25get skia buildingcaryclark
Resolve changes to cpdf_shadingpattern.h that prevent Skia from building. R=thestig@chromium.org,dsinclair@chromium.org,reed@google.com BUG= Review-Url: https://codereview.chromium.org/2017463002
2016-05-25fix rotated and alpha bitmapscaryclark
Match the matrix supplied by PDFium to the one expected by Skia to draw bitmaps. Set up the color if the bitmap is an image mask. Additional work required to figure out when bitmap filtering should be applied. R=reed@google.com,dsinclair@chromium.org BUG= Review-Url: https://codereview.chromium.org/2004203003
2016-05-24Remove CFX_PrivateData from CPDF_ModuleMgrtsepez
Its only used to store one object, so replace it with a unique_ptr to a class with a virtual dtor. Rename the prototypical class with virtual dtor from CFX_DestructObject to CFX_Deletable. Rename the fx_basic_module.cpp to cfx_modulemgr.cpp to match the one class in it. Review-Url: https://codereview.chromium.org/2013483003
2016-05-23Change CPDF_Boolean to use bool instead of FX_BOOL.thestig
Review-Url: https://codereview.chromium.org/1999313002
2016-05-23Rename IFX_Unknown to IFX_Retainable.tsepez
Rename addRef() method to Retain() to match Release(). This CL does not convert to CFX_RetainPtrs, which will happen in a follow-on. Review-Url: https://codereview.chromium.org/2005933002
2016-05-23Remove dead code from CPDF_InterForm.thestig
Clean up related code. Review-Url: https://codereview.chromium.org/2003853003
2016-05-23Distinguish between user and owner passwords.thestig
BUG=pdfium:496 Review-Url: https://codereview.chromium.org/2005653002
2016-05-23Make CPDF_Function::Load() return an unique_ptr.chromium/2750chromium/2749chromium/2748thestig
Review-Url: https://codereview.chromium.org/2000973002
2016-05-23Use unique_ptr in CPDF_CidFonttsepez
Review-Url: https://codereview.chromium.org/2003833003
2016-05-23Clean up doc_ocg.cpp.thestig
Review-Url: https://codereview.chromium.org/2006483002
2016-05-23Delete CPDF_Object::IsModified().thestig
Review-Url: https://codereview.chromium.org/2001933002
2016-05-23Fix infinite recursion in CPDF_DocPageData::GetColorSpace().thestig
BUG=pdfium:497 Review-Url: https://codereview.chromium.org/2003873002
2016-05-21Get rid of CPDF_Object::GetArray().thestig
BUG=pdfium:234 Review-Url: https://codereview.chromium.org/2001783003
2016-05-20Add an enum to represent text rendering modes.thestig
Review-Url: https://codereview.chromium.org/1999553002
2016-05-20Use enum type for char type variablesweili
The mixed use of enum and uint32_t causes warnings. And it is more meaningful to use enum for char type variables. BUG=pdfium:29 Review-Url: https://codereview.chromium.org/2001733002
2016-05-20Merge GetBits32() impls into one. Put it in fxcrt.thestig
Review-Url: https://codereview.chromium.org/1990153003
2016-05-19Remove Release() from IFXCRT_FileAccess.tsepez
Remove some unused impls. Review-Url: https://codereview.chromium.org/1994323002
2016-05-19Fix the Skia build after 9b1a0ee.thestig
Review-Url: https://codereview.chromium.org/1996533004
2016-05-19Fix Undefined-shift in CPDF_SampledFunc::v_Init().thestig
Also fix a divide by zero in CPDF_SampledFunc. Do some cleanups too. BUG=596530,613032 Review-Url: https://codereview.chromium.org/1990843004
2016-05-19Fix a potential nullptr deref in CFX_MapPtrToPtr.thestig
And also in CFX_PtrList. BUG=596528 Review-Url: https://codereview.chromium.org/1991123002
2016-05-19Fix leak in CPDF_StreamContentParser::AddTextObject().thestig
... by using STL containers in more places. Remove dead / duplicate code as well. BUG=603904 Review-Url: https://codereview.chromium.org/1998583002
2016-05-19Correctly check for overflow in FX_atonum.dsinclair
Instead of the existing method, use the CheckedNumeric class to check for overflow during conversion. BUG=chromium:596526 Review-Url: https://codereview.chromium.org/1992023003
2016-05-19Remove agg from skia buildcaryclark
This removes the last vestiges of antigrain from a Skia-specific build. R=dsinclair@chromium.org,tsepez@chromium.org,thestig@chromium.org,reed@google.com Review-Url: https://codereview.chromium.org/1998623002
2016-05-19Clean up CFX_RenderDevice::DrawNormalText().thestig
Review-Url: https://codereview.chromium.org/1990583002
2016-05-18Use std::vector in CPDF_StructTreeImpltsepez
Allows use of CFX_RetainPtrs in place of explicit refcounting. Review-Url: https://codereview.chromium.org/1985253002
2016-05-18Remove c_str() from widestring checksum variant.tsepez
Brings it back in line with bytestring version. Review-Url: https://codereview.chromium.org/1985223002
2016-05-18Pass objects instead of strings for undo/redo records.dsinclair
Currently the Undo/Redo records are serialized as byte strings and stored into a CFX_ByteStringArray. They are deserialized when used. This CL removes the serialization and stores the objects in a deque of unique pointers. Review-Url: https://codereview.chromium.org/1980293004
2016-05-17Don't use LCD antialiasing if Fontconfig doesn't support hintingthomasanderson
Some Freetype implementations (like the one packaged with Fedora) do not support hinting due to patents 6219025, 6239783, 6307566, 6225973, 6243070, 6393145, 6421054, 6282327, and 6624828; the latest one expires 10/7/19. This makes LCD antialiasing very ugly, so we instead fall back on NORMAL antialiasing. A before/after on Fedora: https://bugs.chromium.org/p/chromium/issues/detail?id=479400#c31 BUG=479400 Review-Url: https://codereview.chromium.org/1982263004
2016-05-17Rename CPDF_Struct{Element,Tree} to IPDF_tsepez
After all, what good is a naming convention unless you're going to blindly adhere to it? Review-Url: https://codereview.chromium.org/1981403002
2016-05-17Fix DrMemory bot error by properly initializing the variableweili
The variable needs to be initialized before using. Review-Url: https://codereview.chromium.org/1984323002
2016-05-17Revert of Remove an unnecessary variable from CPDF_Creator (patchset #1 ↵weili
id:20001 of https://codereview.chromium.org/1988603002/ ) Reason for revert: The variable is still needed, will fix the other way. Original issue's description: > Remove an unnecessary variable from CPDF_Creator > > The variable may not be initialized before using, which caused > errors on DrMemory bot. Since it is not necessary, remove it. > > TBR=thestig@chromium.org > > Committed: https://pdfium.googlesource.com/pdfium/+/47b998b53edbb071bb55c909169be1070126fb22 TBR=dsinclair@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1987783002
2016-05-17Remove an unnecessary variable from CPDF_Creatorweili
The variable may not be initialized before using, which caused errors on DrMemory bot. Since it is not necessary, remove it. TBR=thestig@chromium.org Review-Url: https://codereview.chromium.org/1988603002
2016-05-16Fix a nullptr deref in CPDF_BookmarkTree::GetFirstChild().thestig
BUG=590927 Review-Url: https://codereview.chromium.org/1988443002
2016-05-16Fix the code that causes warningsweili
These are the left or newly added code which causes compilation warnings of "signed and unsigned comparison". Need to fix them before I re-enable the warning flag. BUG=pdfium:29 Review-Url: https://codereview.chromium.org/1986533002
2016-05-16Clean up CPDF_Creator.thestig
- Used unique_ptr and initializer list. - Remove variables that never change in value. Review-Url: https://codereview.chromium.org/1976003003
2016-05-16Fix binding of null pointer dereference to reference typechromium/2740chromium/2739hans
A new Clang warning complains about this, and especially for the function returning a reference, it seems like a bad idea. BUG=none Review-Url: https://codereview.chromium.org/1986453002
2016-05-16Convert border style defines to an enum class.dsinclair
There were two defines, BBS_ and PBS_ for the various border styles in the system. They were the same, except PBS_ had an extra SHADOW define which was never used. This CL combines both of those into a single BorderStyle enum class and updates the code as needed. Also, removes ADDBIT, GETBIT unused defines. Updates barcode code to use the util.h defines instead of redefinition. fsdk_baseannot names starting with _ were cleaned up and some #defines moved to constants. Review-Url: https://codereview.chromium.org/1980973002