summaryrefslogtreecommitdiff
path: root/core/include
AgeCommit message (Collapse)Author
2015-10-20Add type cast definitions for CPDF_Boolean.Dan Sinclair
This CL adds ToBoolean, CPDF_Object::AsBoolean and CPDF_Object::IsBoolean and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1417623005 .
2015-10-20Revert "Revert "Add type cast definitions for CPDF_Dictionary.""Dan Sinclair
This reverts commit 937840e1722d1f2b77d80575d6e710d760662c9c. Add type cast definitions for CPDF_Dictionary. This CL adds ToCPDFDictionary type definitions and updates one file to use instead of straight casts. I had to fix two places where we'd casted off the constness of the original pointer. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1420583003 .
2015-10-20Revert "Make CFX_FontMgr member variables private."Lei Zhang
This reverts commit c29bee029cd5fe3f8a4ceb580235ac2d0e5ce8fd. because it broke corpus tests. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410733005 .
2015-10-20Revert "Add type cast definitions for CPDF_Dictionary."Dan Sinclair
This reverts commit 4816432671eef6467354aa252f22bb80acc315b7. Reason, broke the javascript_test Rendering PDF file /mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf. Non-linearized path... FAILURE: document_methods.in; Command '['/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/pdfium_test', '/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf']' returned non-zero exit status -11 BUG=pdfium:201 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1412413002 .
2015-10-20Make CFX_FontMgr member variables private.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1405213003 .
2015-10-20Add type cast definitions for CPDF_Dictionary.Dan Sinclair
This CL adds ToCPDFDictionary type definitions and updates one file to use instead of straight casts. I had to fix two places where we'd casted off the constness of the original pointer. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1399233003 .
2015-10-19Remove duplicate core/include/thirdparties headers.Tom Sepez
These are unused in favor of the ones under the top-level third_party/ directory. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1417483004 .
2015-10-19Sanity check the values of TRUE and FALSE.Lei Zhang
Get rid of cond ? TRUE : FALSE. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1405723003 .
2015-10-19Remove some checks for object creation failures. They cannot fail.Lei Zhang
Also reduce nesting in if statements, remove CFX_SmartPointer, and use more unique_ptrs. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1393303004 .
2015-10-19Add FPDFAPIJPEG_ prefix to more libjpeg functionsTom Sepez
Original patch by Evangelos Foutras. Chromium built with use_system_libjpeg=1 can mistakenly try to use symbols exported by the libjpeg library that's bundled with pdfium. These name conflicts result in failure to encode the contents of a canvas element using toDataURL('image/jpeg'). BUG=505226 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1409243004 .
2015-10-16Declare PDF_GetStandardFontName() in the header.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410043003 .
2015-10-15Fix layering violation in CPDF_Document::FromFPDFDocument().Tom Sepez
Make this a function in the fpdfsdk/ layer, rather than a method in the core/ layer. Nothing in core should know about public FPDF types. BUG=pdfium:217 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1396283006 .
2015-10-14Introduce CPDF_Document::FromFPDFDocument().Tom Sepez
This will be used to abstract one major difference between master and XFA, namely that the CPDF_Document is not a direct cast in XFA. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1395493007 .
2015-10-08Fix a bunch of sign mismatch warnings.Lei Zhang
Also remove some gotos and move code into an anonymous namespace. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1356373003 .
2015-10-09Various changes to JBig2 cache:David Lattimore
- Makes the cache be per-document - Keys the cache on ObjNum and stream offset instead of keying on a pointer to the data (which can result in false cache hits). - Makes it so the cache is only used for the globals stream. - Reenable the cache. R=thestig@chromium.org BUG=pdfium:207 Review URL: https://codereview.chromium.org/1380243004 .
2015-10-05Original patch by forshaw.Tom Sepez
Added a fallback Win32 font information class for win32k lockdown. This is to support running PDFIUM within the Win32k lockdown by removing dependancies on USER32/GDI for the font information code. It falls back to using a freetype/directory enumeration implementation if it detects the win32k system calls have been disabled by policy. BUG=523278 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1306883002 .
2015-10-03Fix NULL pointer dereference in CPDF_InterForm.Lei Zhang
BUG=537772 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1387703002 .
2015-10-02Get rid of gotos in CPDF_SyntaxParser and FlateUncompress().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1360103002 .
2015-10-02Turn a couple functions that always return true to return void.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1386463003 .
2015-10-01Clean up some image decoder classes:Lei Zhang
- Use std::vector<uint8_t> instead of raw uint8_t* - Make ICodec_ScanlineDecoder::GetScanline() return const uint8_t* - Add FxFreeDeleter, use it in CCodec_ImageDataCache. - Make CCodec_ImageDataCache encapsulate its data members. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1361053002 .
2015-09-28Cleanup some fx_codec_fax.cpp code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1367633005 .
2015-09-25Revert "Revert "Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf ↵Jun Fang
files"" This reverts commit fa9756f77ad6145940d3dc697814b84f5755ae17. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1307353005/
2015-09-25Revert "Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf files"Jun Fang
This reverts commit 9bd18183ba8210c91d71c3060146235750a4c71c.
2015-09-25Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf filesJun Fang
Pdfium swallows 'fi' or 'ff' in some tested files because it doesn't load the embedded font file correctly. The root cause is that there is incorrect keyword like 'ngendstream' in the stream of the embedded font file. Pdfium tries to find another correct keyword but uses wrong offset rather than accumulated offset. BUG=524043 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1307353005 .
2015-09-22Change nonstd::unique_ptr to take a custom deleter.Lei Zhang
Code is mostly stolen from Chromium's scoped_ptr. - Add unit tests. - Use this to fix a leak. BUG=chromium:531408 R=jyasskin@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1351383004 .
2015-09-15Implement FPDFAction_GetFilePath().Lei Zhang
The API is the same as the Foxit version, except the encoding is specified as UTF-8 instead of local encoding. Also remove CPDF_LWinParam since it's unused. BUG=chromium:517713 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1335373002 .
2015-09-04Fix typos, nits and remove dead code in fpdf_text_int.cpp.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1316643004 .
2015-09-02Remove dead JBig2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328643002 .
2015-09-01Cleanup dead code in CPDF_DIBSource::LoadJpxBitmap() and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1310603006 .
2015-08-19Extern in .cpp file is a code smell, part 2.Tom Sepez
Fixes the remaining issues, except for JBIG2/Skia ... R=thestig@chromium.org Review URL: https://codereview.chromium.org/1298393003 .
2015-08-19Extern in .cpp files is a code smell.Tom Sepez
Part 1. Move to headers so compiler can type check against the definitions. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1299963002 .
2015-08-18Fix mac build after commit e1ce94e.chromium/2497chromium/2496chromium/2495chromium/2494chromium/2493chromium/2492chromium/2491chromium/2489chromium/2488Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297303002 .
2015-08-18Cleanup CFX_Font a bit.Lei Zhang
- Make methods const. - Make variables non-public. - Remove LoadFile() method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1293973002 .
2015-08-18FX_CMapDwordToDword considered harmful.Tom Sepez
Lookups are log(n), but random insertions could result in n^2 behaviour. Replace with maps and sets. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1289703003 .
2015-08-18Remove more dead code from fx_basic.hTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1294683003 .
2015-08-17Clean up IFX_BidiCharLei Zhang
- Replace IFX_BidiChar with just CFX_BidiChar - Document implementation - Change out parameters to pointers - Remove dead code - Add an enum for bidi directions - Move several externs to a header - Add unit tests R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1197643002 .
2015-08-17CFX_MapByteStringToPtr considered harmful.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1297723002 .
2015-08-17Cleanup CFX_UnicodeEncoding and remove IFX_FontEncoding.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1296753003 .
2015-08-17Fix more sign comparison errors.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1290383003 .
2015-08-14Add new public APIs to find the z-order for links and widgets.chromium/2485chromium/2484Lei Zhang
- Implement FPDFLink_GetLinkZOrderAtPoint(). - Implement FPDFPage_FormFieldZOrderAtPoint(). - Mark FPDPage_HasFormFieldAtPoint() as deprecated. - Modify CPDF_LinkList and CPDF_InterForm to support new APIs. - Clean up dead code in CPDF_LinkList and CPDF_InterForm. BUG=chromium:515837 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1278053004 .
2015-08-14Don't bother checking pointers before delete[] and FX_Free().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 .
2015-08-14Use override in more classes in fpdfsdk/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287193005 .
2015-08-14Use override in more classes in core/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1292613003 .
2015-08-14Cleanup: Remove unused CPDF_Metadata::m_pDoc.Lei Zhang
Also remove unused kAddinNameCJK variable. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1296513003 .
2015-08-14CPDF_ModuleMgr::m_SecurityHandlerMap only used by dead code.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1289693008 .
2015-08-13Cleanup: s/Torelance/Tolerance/Lei Zhang
R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1294713002 .
2015-08-13OutputText() is dead code.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1291213003 .
2015-08-13Cleanup: Remove unused CPDF_Stream::Clone().Lei Zhang
Cloning a CPDF_Stream actually happens via CPDF_Object::Clone(). Transitively, remove: - GetStreamFilter() -- all the filters. R=jam@chromium.org Review URL: https://codereview.chromium.org/1288543002 .
2015-08-13Allow external font-path configuration from pdfium_test.Tom Sepez
R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/d8b5e73d8609b74e6a995ee1768d20d47bd4b089 Review URL: https://codereview.chromium.org/1268323004 .
2015-08-13Revert "Allow external font-path configuration from pdfium_test."Tom Sepez
This reverts commit d8b5e73d8609b74e6a995ee1768d20d47bd4b089. Broke corpus tests TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1292153002 .