summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-23Merge to XFA: Fix a couple potential file handle leaks in pdfium_test.Lei Zhang
Fix lint issues / git cl format. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1357423006 . (cherry picked from commit 155345e2c47188fa65da1603b7f06c986707bb69) Review URL: https://codereview.chromium.org/1367633004 .
2015-09-22Merge to XFA: Change 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 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1351383004 . (cherry picked from commit cef2a9c51bee4b987fc813013d45dad6535a9a46) Review URL: https://codereview.chromium.org/1358163003 .
2015-09-22Merge to XFA: Add missing 'return' keyword.Lei Zhang
Discovered with experimental Clang plugin that flags temporary objects that are immediately destroyed. patch from issue 1359063003 at patchset 1 (http://crrev.com/1359063003#ps1) A=mdempsky@chromium.org TBR=mdempsky@chromium.org Review URL: https://codereview.chromium.org/1359103002 . (cherry picked from commit f316bfe37e2fc977376e18f7534aae9824da240a) Review URL: https://codereview.chromium.org/1362863002 .
2015-09-22Merge to XFA: Use std::set<> to track active event handlers.Tom Sepez
Merge conflicts in JS_Runtime.cpp (cherry picked from commit d8d223127d706aa4961b2c9b0037ab256fce9a8f) Original Review URL: https://codereview.chromium.org/1352393003 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1365503003 .
2015-09-22Merge to XFA: Add nonstd::unique_ptr move assigment operator.Tom Sepez
(cherry picked from commit dd7a7f012424ec8505830710ac0dd0183203c189) Original Review URL: https://codereview.chromium.org/1358163002 . TBR=jyasskin@chromium.org Review URL: https://codereview.chromium.org/1362763002 .
2015-09-22Merge to XFA: [Docs] Add wiki content to Markdown docsTom Sepez
(cherry picked from commit 61327fe3c46b73141b4c885a98e97cd5d1412aba) Original Review URL: https://codereview.chromium.org/1356323002 . TBR=andybons@chromium.org Review URL: https://codereview.chromium.org/1359813003 .
2015-09-22XFA: contention between FXJSE and FXJS over isolate data slotsTom Sepez
This probably broke at 06b60021e when the FXJS slot moved to 0 from 1 unless explicitly overriden by the embedder, which conflicted with the FXJSE_ usage of slot 0. Also simplify some logic used to track global intialization of the underling JS. TEST=run_javascript_tests.py on XFA branch doesn't segv. R=jochen@chromium.org Review URL: https://codereview.chromium.org/1351173002 .
2015-09-21Merge to XFA: Remove CJS_RuntimeFactoryTom Sepez
New edits in: fpdfsdk/include/fpdfxfa/fpdfxfa_app.h fpdfsdk/include/javascript/IJavaScript.h fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp (cherry picked from commit bca779d0957965eb2ebfad5479e0894844749626) Original Review URL: https://codereview.chromium.org/1360523004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1348393007 .
2015-09-21Merge to XFA:More tidy of CJS_Object, kill implicit cast operatorTom Sepez
(cherry picked from commit 270fc65d5824eeedbb2ed17516a72721bde9c9ef) Original Review URL: https://codereview.chromium.org/1349423006 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1357243002 .
2015-09-17Merge to XFA: Fix a #include in fpdf_page_func.cpp.Lei Zhang
Not sure why building with gyp was working despite the missing '../' but it wasn't working in stricter build systems. TBR=dml@google.com Review URL: https://codereview.chromium.org/1321293003. (cherry picked from commit fa31d9630aadfe101d3b35e26ce0fc926ec1505b) Review URL: https://codereview.chromium.org/1345313003 .
2015-09-17Merge to XFA: Add a missing #include that's needed for call to FXSYS_tolower.Lei Zhang
TBR=dml@google.com Review URL: https://codereview.chromium.org/1329343002. (cherry picked from commit 8ad46d3d6829d879cd342caec4c6f7eaae43cba0) Review URL: https://codereview.chromium.org/1346843005 .
2015-09-17Merge to XFA: Don't pass null isolates to FXJS_ when we have a real isolate.Tom Sepez
(cherry picked from commit 34b39e1d4fa0b16d47770b823230344356cc451a) Original Review URL: https://codereview.chromium.org/1350703003 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1342403005 .
2015-09-17Merge to XFA: Ensure functions in FXJS_V8 are prefixed by FXJS_.Tom Sepez
Manual edits: fpdfsdk/include/javascript/JS_Define.h fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp fpdfsdk/src/javascript/Document.cpp fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp (cherry picked from commit 506df426d5d64d68e9dc27ffebcf56f6c6a1bccf) Original Review URL: https://codereview.chromium.org/1347833002 . (cherry picked from commit 455019ca48f60bd285e043986471f51f17c69a0d) Original Review URL: https://codereview.chromium.org/1349783003 . (cherry picked from commit 1af240cc45480520b447be767686e73a29c48f9e) Original Review URL: https://codereview.chromium.org/1348693003 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1356563003 .
2015-09-17Merge to XFA: Convert some unneeded gotos into returns.Lei Zhang
R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332193002 . (cherry picked from commit da0938f8671958aba0522a69fc687a7bbb01b435) Review URL: https://codereview.chromium.org/1350453002 .
2015-09-17Merge to XFA: Implement 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=tsepez@chromium.org Review URL: https://codereview.chromium.org/1335373002 . (cherry picked from commit 0b3c8f742613da294f812e2f6e908f4026499f96) (cherry picked from commit a9d4bc541179ec0436adc4b2e18b7fdecc5952dc) (cherry picked from commit 4ffd89ed556e32a6527d0e88952fe20ec1e2f362) Review URL: https://codereview.chromium.org/1345953002 .
2015-09-15Merge to XFA: gyp_pdfium should use ninja by default.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1330173002 . (cherry picked from commit 8b1cb99abd4dcff132367fe338df38e48971bd1d) Review URL: https://codereview.chromium.org/1345973002 .
2015-09-15Merge to XFA: Cleanup JBig2_GeneralDecoder.cpp.Lei Zhang
- FX_Alloc() can't fail and return. - Use unique_ptr / remove gotos. - NULL -> nullptr. - Combine common code. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1337823003 . (cherry picked from commit d15cda90f598ce52fa601552577ef7fd8a89fce3) Review URL: https://codereview.chromium.org/1349463002 .
2015-09-15Merge to XFA: Cleanup: Fix a typo. s/Processive/Processing/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1338573002 . (cherry picked from commit a5fde67ea3c9d20d3f19354ec9e7e1be600d7589) Review URL: https://codereview.chromium.org/1350463002 .
2015-09-15Merge to XFA: Cleanup casting of FX_Alloc() return values.Lei Zhang
Also convert some FX_AllocOrDie() calls to FX_Alloc(). TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332173002 . (cherry picked from commit 6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba) Review URL: https://codereview.chromium.org/1344233002 .
2015-09-15Merge to XFA: Refactor fxjs_v8 and add embeddertests for it.Tom Sepez
(cherry picked from commit b17d62601b21dfce85718e08cfd0ffce3a45d74e) (cherry picked from commit 09ed30750282bf56a92d0e646ab22c64bea81a36) Manual edits: fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp - add lockers. fppdfsdk/src/javascript/JS_Runtime.cpp - rework XFA init path. Original Review URL: https://codereview.chromium.org/1338073002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1348433002 .
2015-09-15Merge to XFA: Add move ctor to nonstd::unique_ptr.Tom Sepez
(cherry picked from commit ac8fda05418b7c96255d320fdec296935c552187) (cherry picked from commit 72d51871ae152163eeb9b005fd0a74d5c1651cd2) Original Review URL: https://codereview.chromium.org/1338383002 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1344873002 .
2015-09-14Merge to XFA: Get CJS_RuntimeFactory out of CJS_GlobalData management.Tom Sepez
(cherry picked from commit 9a817f092e6800e9338b41acf4ea0416b6ad4467) Original Review URL: https://codereview.chromium.org/1338993005 . Small manual merge in fpdfsdk/src/javascript/JS_GlobalData.cpp fpdfsdk/src/javascript/global.cpp TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1341913002 .
2015-09-11Merge to XFA: Fix strings, ..., void return types for Consts.h.Tom Sepez
(cherry picked from commit f9e40aec10263f9445d69598657f42550294d653) Orignal Review URL: https://codereview.chromium.org/1342433002 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1338003004 .
2015-09-11Merge to XFA: Rename Init methods to more accurately describe purposeTom Sepez
(cherry picked from commit df4de98c06075b0e491ac645f2d118a6813cedc9) Trivial manual merges in fpdfsdk/include/javascript/JS_Runtime.h fpdfsdk/src/javascript/JS_Runtime.cpp Original Review URL: https://codereview.chromium.org/1335763002 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1334313002 .
2015-09-10Merge to XFA: Guard against null image data in CJBig2_GRRDProc.Lei Zhang
Credit to karl at skomski.com for the initial version of the CL. BUG=527174 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1305033006 . (cherry picked from commit 89d8b4681ce98894a1ee1a6cf4bae77e00d28797) Review URL: https://codereview.chromium.org/1331303002 .
2015-09-10Merge to XFA: Remove CJBig2_Object, CJBig2_Module, and friends.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1326953006 . (cherry picked from commit 70f4404e9a9e69afdfdd07715aa946f6561ce0cb) Review URL: https://codereview.chromium.org/1336783002 .
2015-09-10Merge to XFA: Remove CJBig2_Module::JBig2_Error and friends.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1327983003 . (cherry picked from commit 6087a2f18e0c779c1bae62812801cee98fe8a09d) Review URL: https://codereview.chromium.org/1335793003 .
2015-09-10Merge to XFA: Make a bunch of JBig2 classes independent of CJBig2_Object.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1319713003 . (cherry picked from commit 800bf5ac07305ccf9c9522c8c76f728a4fd99da5) Review URL: https://codereview.chromium.org/1332153002 .
2015-09-10Merge to XFA: Remove some abstractions in fxjs_v8.h.Tom Sepez
Conflicts: fpdfsdk/src/javascript/Document.cpp fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp New: fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp (cherry picked from commit 6df59849472958e7de96da6d9fc7b223b7c1f1c3) Original Review URL: https://codereview.chromium.org/1332973002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1334833003 .
2015-09-10Merge to XFA: Fix JS_GetArrayElement to not return an empty handle on successJochen Eisinger
BUG=chromium:528376 TBR=ulan@chromium.org, tsepez@chromium.org Original Review URL: https://codereview.chromium.org/1337433002 . (cherry picked from commit 0d0935d3d6603dd7d851b1d5828635230f4c43ca) Review URL: https://codereview.chromium.org/1334633004 .
2015-09-10Merge to XFA: Resolve bad cast to CJS_EventHandlerfoxit
At line 2026 in pdfsdk/src/javascript/PublicMethods.cpp, the writer wants to perform type cast like line 2027 but he made a mistake to make type conversion on m_pValue. Even at line 2027, it's redundant to make type conversion. The returned type of pContext->GetEventHandler() is CJS_EventHandler*. BUG=529310 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1325753007 .
2015-09-09Merge to XFA: Remove existing generated images before running a test.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1314443007 . (cherry picked from commit 8ead9036aab18d45498e310866210dfff20da188) Review URL: https://codereview.chromium.org/1331643004 .
2015-09-09Merge to XFA:Fix heap use after free in CPDFSDK_Annot::GetPDFAnnot.Tom Sepez
(cherry picked from commit 9241e5a43990859f6f9a94aaa2c488d0451039e3) Original Review URL: https://codereview.chromium.org/1312313006 . (cherry picked from commit 343dbb841f4c12e819932e2b66dd70f817337d97) Original Review URL: https://codereview.chromium.org/1325533004 . BUG=507316 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1332653002 .
2015-09-08Merge to XFA: Beef up app_props.in and tidy app.cpp.Tom Sepez
Small manual edit in fpdfsdk/src/javascript/app.cpp (cherry picked from commit b830fbc03a6d12d8b5be50e85499c281a4c5da7f) Original Review URL: https://codereview.chromium.org/1317393003 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1302423008 .
2015-09-08Merge to XFA: Change the JS app.viewerType() return value to "pdfium"Lei Zhang
BUG=pdfium:181 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1331633002 . (cherry picked from commit 4bc64cabc561d5df211ed02dc75c85e41fa91312) Review URL: https://codereview.chromium.org/1327523007 .
2015-09-08Merge to XFA: Remove unneeded checks for CPDF_Object::GetDict() return values.Lei Zhang
CPDF_Object::GetDict() always returns a valid pointer for dictionaries. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1317733007 . (cherry picked from commit 2f740a8bd61c1c198796dd5e2124d007267f9c1a) Review URL: https://codereview.chromium.org/1323263006 .
2015-09-03XFA: Move configs out of targets in GN build files.Lei Zhang
XFA version of https://codereview.chromium.org/1328443003 R=brettw@chromium.org Review URL: https://codereview.chromium.org/1323343002 .
2015-09-03Merge to XFA: Turn a failing assert into an actual check.Lei Zhang
BUG=522131 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1327913002 . (cherry picked from commit 640c395fa9b76552383ccd0c5f4668ea698089f6) Review URL: https://codereview.chromium.org/1309263006 .
2015-09-03Merge to XFA: Change fixup_pdf_template.py to open files in binary mode.Lei Zhang
Fix for the pixel test failure on Windows from commit 870b5b6793fa. Seems to work for me on Windows. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1312493006 . (cherry picked from commit 7c9e4529f63cc2ba47dd9585058c8ee8e546bc1a) Review URL: https://codereview.chromium.org/1319183004 .
2015-09-03Merge to XFA: Remove dead JBig2 code.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328643002 . (cherry picked from commit 9df5d9701ddf75f8050566132694bf435efb3ca0) Review URL: https://codereview.chromium.org/1319563003 .
2015-09-03Merge to XFA: Reapply Foxit's libopenjpeg modifications.Lei Zhang
They were lost in commit d53e6fd. BUG=pdfium:168 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1196523002 . (cherry picked from commit 870b5b6793fa261f0c6f31f026010d2d715968bf) Review URL: https://codereview.chromium.org/1301323007 .
2015-09-03Merge to XFA: Cleanup dead code in CPDF_DIBSource::LoadJpxBitmap() and friends.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1310603006 . (cherry picked from commit 097297325e0d3d00556d67885547750a2e9d4b32) Review URL: https://codereview.chromium.org/1305223010 .
2015-09-01Merge to XFA: CPDFSDK_MediaActionHandler is unused.Tom Sepez
(cherry picked from commit 23213b2750e33dfe96b091b78ec8b10fe4d73a67) Original Review URL: https://codereview.chromium.org/1329583004 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1325823006 .
2015-09-01Merge to XFA: CJS_Context::compile unusedTom Sepez
Manual merge in fpdfsdk/src/javascript/JS_Context.cpp (cherry picked from commit 6e945a1ebbacde3ed2a4fc83ccb7215ccbc46931) Original Review URL: https://codereview.chromium.org/1318543012 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1318343004 .
2015-08-31Merge to XFA: Fix two issues shown by bug 489995Tom Sepez
(cherry picked from commit 6e369c2ebb4769a42736b32154c0de12b73df45d) Original Review URL: https://codereview.chromium.org/1327473002 . BUG=489995 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1325743002 .
2015-08-30Merge to XFA: Fix infinite loop for objects that reference themselves.Lei Zhang
BUG=pdfium:193 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1306793002 . (cherry picked from commit 0c9f1d8f6dd6bb8b9c3eba73e4ffd0bb2ca4fd97) Review URL: https://codereview.chromium.org/1314573004 .
2015-08-28Merge to XFA: Replace signed char with int8_t. Fix Linux ARM build after ↵Lei Zhang
r7830e9e. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1321883002 . (cherry picked from commit 5e4a5cc9ad76dc08d62fb1e10bdfb811f3720c43) Review URL: https://codereview.chromium.org/1308163005 .
2015-08-28Merge to XFA: Check array bounds for opj_dwt_decode_1() and friends.Lei Zhang
Based on an earlier patch by jun_fang@foxitsoftware.com. BUG=450844 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1320443003 . (cherry picked from commit 463b77b4f1e4257cd89f3460b5a6fdb102f44265) Review URL: https://codereview.chromium.org/1319303003 .
2015-08-20Merge to XFA: Remove a bunch of dead JBIG2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1293393002 . (cherry picked from commit 7830e9e38d4155335b7287f8edb2b3a6cece5b01) Review URL: https://codereview.chromium.org/1303013004 .
2015-08-20Merge to XFA: Remove unused code warnings found by clang.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297593005 . (cherry picked from commit bcfcc4619017b7f70c84a582196763894cc72d24) Review URL: https://codereview.chromium.org/1306673002 .