summaryrefslogtreecommitdiff
path: root/fpdfsdk
AgeCommit message (Collapse)Author
2016-01-11Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject()Wei Li
CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1575833004 .
2016-01-11Fix an uninitalized read in FPDFText_GetFontSize().Lei Zhang
BUG=pdfium:346 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1578543002 .
2016-01-11Use std::map as CPDF_Dictionary's underlying store.Oliver Chang
Replaces CFX_CMapByteStringToPtr. XFA still uses CFX_CMapByteStringToPtr so it's not completely removed just yet. Adds begin()/end() to CPDF_Dictionary and removes the GetStartPos()/GetNextElement() functions to traverse the dictionary. Callers are changed accordingly. AddValue() is also removed. R=tsepez@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1541703003 .
2016-01-08Switch most min/max macros to std::min/max.Lei Zhang
Fix lint errors along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 .
2016-01-08Remove a bunch of dead code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567333003 .
2016-01-08Fix infinite loop caused by parsing same indirect objectsWei Li
BUG=pdfium:343 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 .
2016-01-08Clean up misc nits found while fixing bugs.Lei Zhang
Some bits regressed in commit 338805f. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1544963002 .
2016-01-07Disentangle fpdfsave_embeddertest's FPDF_FILEWRITE, use gmock matchers.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1561303002 .
2016-01-06Return const-ref object in a few CPWL_Wnd getters.Lei Zhang
Also remove a bunch of dead code. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1565803003 .
2016-01-06Invalidate IPWL_FocusHandler and IPWL_Provider on destruction.Lei Zhang
BUG=572871 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1564773003 .
2016-01-06Return unique_ptrs from test_support functionsTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1563513002 .
2016-01-06Add fpdf_edit basic creation embedder test.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1554133003 .
2016-01-05Document::DoAnnotDelay and m_DelayAnnotData member unused.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1565613002 .
2016-01-05Remove header files that only have includes.Lei Zhang
Also do some cleanups in affected files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1552583002 .
2016-01-05Replace IconTree class with std::list.Tom Sepez
Remove some O(n^2) behaviour when iterating across the thing. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1566433003 .
2016-01-05Make more CPDF_Parser method const.Lei Zhang
R=weili@chromium.org Review URL: https://codereview.chromium.org/1549103002 .
2016-01-05Add embedder test for fpdfsave.cpp and bug 342Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1556033002 .
2016-01-05Exit infinite loops for cross reference loadingWei Li
When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 .
2016-01-05Make FPDF_WIDESTRING work regardless of endianness.Tom Sepez
Given the helper routines, use it in the find bookmark test instead of just trusting another bookmarks title. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1554363002 .
2016-01-04Cover FPDFBookmark_Find() with embedder tests.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1559043006 .
2016-01-04Add FPDFDoc_GetPageMode() embeddertestTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1557173002 .
2015-12-29Fix partial information printed with blank window covering the centerchromium/2612chromium/2611chromium/2610chromium/2609chromium/2608chromium/2607Jun Fang
BUG=482206 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1551563002 .
2015-12-28Take care fall-through cases of switch in pdfiumLei Zhang
Found with Clang's -Wimplicit-fallthrough option by tzik@chromium.org. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1549283002 .
2015-12-25Speculative IWYU fix for failing Chromium DEPS roll.chromium/2606chromium/2605chromium/2604chromium/2603Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1546133002 .
2015-12-24Fix a bad virtual keyword removal from commit 0f6b51c.Lei Zhang
BUG=546744 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1542373002 .
2015-12-24Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 .
2015-12-22Cleanup: Remove some dead code in CPWL_Note.Lei Zhang
TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1544953002 .
2015-12-22Add ContainsKey() and ContainsValue() and use them where appropriate.Lei Zhang
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1540263003 .
2015-12-21Cleanup CJS_PublicMethods:Lei Zhang
- Use FXSYS_iswdigit() instead of CJS_PublicMethods::IsDigit(). - Ditto for FXSYS_iswalpha() and FXSYS_iswalnum(). - Change CJS_PublicMethods::ParseNormalDate() and CJS_PublicMethods::MakeRegularDate() to take an out parameter by ptr. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1539113002 .
2015-12-21Fix JS seconds since epoch to date conversions.Lei Zhang
BUG=515137,564736 R=ochang@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1533233002 .
2015-12-18Get rid of a few CPDF_Object Create() methods and just use new instead.Lei Zhang
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1540693002 .
2015-12-17Tidy CPDF_RenderContextTom Sepez
- Remove unused Clear() method. - Replace Create() with actual ctors. - Avoid const casts. - Protect members. - Add missing const in adjacent code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1536623004 .
2015-12-14Get rid of most instance of 'foo == NULL'Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 .
2015-12-14Get rid of most instance of 'foo != NULL'Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 .
2015-12-14Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 .
2015-12-10Remove CFX_AffineMatrix/CPDF_MatrixTom Sepez
These are synonyms for CFX_Matrix. Nothing but sed and manual deletion of 2 #defines in fpdf_parser.h and fx_coordinates.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1513363002 .
2015-12-09Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().Lei Zhang
BUG=pdfium:298 R=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 .
2015-12-08Revert "Merge to master: Take Jun's UTF16LE patches."chromium/2587chromium/2586Oliver Chang
Broke chrome bindings. This reverts commit c3e4ae5fe5067723b58a2029a95c6411c92bed15. R=thestig@chromium.org, tsepez@chromium.org BUG=567485 Review URL: https://codereview.chromium.org/1511773002 .
2015-12-08Make app.cpp match XFATom Sepez
Master side change for https://codereview.chromium.org/1504413002 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1508133003 .
2015-11-25Merge to master: Take Jun's UTF16LE patches.Tom Sepez
(cherry picked from commit 8d89e65897d8b6cf7899e7a82d9d381c3ad327cb) (cherry picked from commit c70b19aad245fb1ed39bf8c264d991555f4c5a58) BUG=pdfium:275 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1473753004 .
2015-11-25master: more underlying typesTom Sepez
Precursor to https://codereview.chromium.org/1477583002/ Also: merge where possible. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1481523004 .
2015-11-25CFXJS_ObjDefinition's lifetime must match isolate.chromium/2585chromium/2584chromium/2583chromium/2582chromium/2581chromium/2580chromium/2579chromium/2578chromium/2577chromium/2576Tom Sepez
Introduced at https://codereview.chromium.org/1424933013/ The v8 objects are 1:1 with the context being destroyed in FXJS_ReleaseRuntime, but the CFXJS_ObjDefinitions are still 1:1 with the isolate, so they can't be destroyed until the refcounts hit zero. BUG=561184 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1468423004 .
2015-11-24Add "Underlying types" to master.Tom Sepez
Change some master code to line up better with XFA, so that the XFA changes are additive when possible, rather than replacements. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1468253005 .
2015-11-20Add constant CPDFSDK_InterForm::kNumFieldTypesTom Sepez
Bumping this one line from 6 to 7 in XFA saves a bunch of diffs. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1458363005 .
2015-11-20Replace |CPWL_ComboBox::operator CPWL_Edit()| with explicit method.Tom Sepez
More casts go away. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1467653002 .
2015-11-20Update master fpdfsdk to match XFATom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1458853005 .
2015-11-19Add more overrides.Lei Zhang
Using Chromium's clang + build options, there's more override warnings. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1453643002 .
2015-11-16Reland "Cleanup some numeric code.""chromium/2567Dan 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 .
2015-11-12Remove relative includes.Lei Zhang
That refer to parent directories. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 .
2015-11-11Replace CJS_Parameters with std::vector<CJS_Value>.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437713003 .