summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-06Merge to M46: Enforce input and output dimensionalities for CPDF_StitchFunc.chromium/2490Oliver Chang
Also cleans up some places in the relevant functions since we're here. BUG=551460 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1421783004 . (cherry picked from commit 4f85605cbc652a17bc833f883186e0a68af6006d) Review URL: https://codereview.chromium.org/1432833002 .
2015-10-19Merge to M46: upgrade openjpeg to commit# cf352afLei Zhang
BUG=457480,497355 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1338973005 . (cherry picked from commit c212b684cb028a5d98e57f711c9eed931b853a44) Review URL: https://codereview.chromium.org/1416783002 .
2015-10-19Merge to M46: Loosen checking on the bytes following 'stream'Lei Zhang
PDF specs say that end of line markers shall follow the keyword "stream". But a white space before end of line markers follows this keyword in the test pdf files. BUG=543018 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1401923005 . (cherry picked from commit b5cbfb4cd12b6499912367f9a1e11c666157acb8) Review URL: https://codereview.chromium.org/1417623002 .
2015-10-14Merge to M46: Fix a compiling error on MacLei Zhang
BUG=497357 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1395493003 . (cherry picked from commit 3ea79bbba24a1c0918ea42368e746097dab40663) Review URL: https://codereview.chromium.org/1405903002 .
2015-10-14Merge to M46: Fix heap-buffer-overflow in color_sycc_to_rgbLei Zhang
It's a bug existing in the conversion from YUV420 to RGB. For YUV 420 format, four pixels have 4 Y but only one U and one V. In some cases, there are odd columns or lines in some images. The pixels on last line or column may have Y but no U or V data. For this case, We shall extend U or V using the data on previous column or line. BUG=497357 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1342683002 . (cherry picked from commit f1f19f1fff801c9970af627e050becc2f13f82e7) Review URL: https://codereview.chromium.org/1399323006 .
2015-10-08Merge to M46: Relax the check on 0 length streams.Lei Zhang
CPDF_SyntaxParser::ReadStream() originally created stream objects when the length is 0. Commit 2526930 tightened the constraint and returned NULL. This has some adverse affects, as seen in Chromium's print preview of PDFs. Instead, relax the constraint a little so when the length is 0, return a CPDF_Stream with NULL data and size 0. BUG=531835 Review URL: https://codereview.chromium.org/1394743002 . (cherry picked from commit 4fa0e27ba39f49ba92fb4c160ab836a6f1dd2893) Review URL: https://codereview.chromium.org/1396883002 .
2015-10-05Fix v8 isolate initialization / release, M46 edition.Lei Zhang
BUG=531339,539106 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1384223002 .
2015-10-05Merge to M46: CJS_Timer should observe CJS_Runtime destruction.Lei Zhang
Also remove dead CJS_EmbedObj::{Begin,End}Timer code. BUG=539107 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1384883002 . (cherry picked from commit 794c9b67d3d519342aa7e15052766f7d4a99f551) Review URL: https://codereview.chromium.org/1385833002 .
2015-10-05Merge to M46: Do not call into formfiller code with a NULL PageView.Lei Zhang
BUG=537173 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1376093002 . (cherry picked from commit ac67d4765a8ac36cd00c9fc8b6f2b80a3e1cff72) Review URL: https://codereview.chromium.org/1383833003 .
2015-09-29Merge to M46: Fix blank page issue caused by too strict correction on bpcLei Zhang
For bit per component (bpc), PDF spec mentions that a RunLengthDecode or DCTDecode filter shall always deliver 8-bit samples. However, some PDF files don't follow this rule. We can find that filter is RunLengthDecode but bpc is 1 in the provided test file. In this case, pdfium will correct bpc to 8 but the actual bpc is 1. It causes a failure because the data is much more than the expected. To handle this case, pdfium doesn't correct bpc to 8 when the original bpc is 1. BUG=512557 R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328213002 . (cherry picked from commit 3500e90e9e42fa84dd6f07da16cfcf197ec98283) Review URL: https://codereview.chromium.org/1377943002 .
2015-09-28Merge to XFA: Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf filesLei Zhang
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 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1307353005 . (cherry picked from commit 9bd18183ba8210c91d71c3060146235750a4c71c) Review URL: https://codereview.chromium.org/1374783002 .
2015-09-21Merge to M46: Check for empty embedder data before using it in PDFium JS ↵Lei Zhang
bindings. This was guarded by an assert, but the path is hit. BUG=528015 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1345923002 . (cherry picked from commit 615d7aba0f7d53a78eb05fbd4ae0e1a7e1d3b103) Review URL: https://codereview.chromium.org/1357313002 .
2015-09-15Merge to M46: Fix JS_GetArrayElement to not return an empty handle on successLei Zhang
BUG=chromium:528376 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1337433002 . (cherry picked from commit 0d0935d3d6603dd7d851b1d5828635230f4c43ca) Review URL: https://codereview.chromium.org/1342333002 .
2015-09-15Merge to M46: Resolve bad cast to CJS_EventHandlerLei Zhang
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 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1325753007 . (cherry picked from commit 4ea0e6b972b0c6f6c9ad3f45a66a733d8dc3ca96) Review URL: https://codereview.chromium.org/1342223003 .
2015-09-15Merge to M46: Fix heap use after free in CPDFSDK_Annot::GetPDFAnnot.Lei Zhang
Use two seperate loops to kill current focus annot and to release annots in current page. Loop to kill current focus annot is run first, so it will not access deleted annots. BUG=507316 TBR=tsepez@chromium.org TEST=Reproduction steps mentioned in issue 507316 should not crash chrome. Unit test added to pdfium. Run pdfium_embeddertests.exe. Review URL: https://codereview.chromium.org/1312313006 . (cherry picked from commit 9241e5a43990859f6f9a94aaa2c488d0451039e3) Review URL: https://codereview.chromium.org/1348433003 .
2015-09-15Merge to M46: Test files for issue 507316 Upload pdf test files for ↵Lei Zhang
codereview 1312313006. BUG=507316 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1325533004 . (cherry picked from commit 343dbb841f4c12e819932e2b66dd70f817337d97) Review URL: https://codereview.chromium.org/1344273002 .
2015-09-08Merge to M46: 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/1310333007 .
2015-08-31Merge to M46: 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/1321633003 .
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-18Remove unused code warnings found by clang.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297593005 .
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-17Fix fix fix fix of breakage on mac.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1296383004 .
2015-08-17Fix fix fix of mac build breakage at 9cf44c2eTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1296403002 .
2015-08-17Fix fix of mac build breakage at 2a2a6aaTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1293153003 .
2015-08-17Fix mac build breakage at ce4ffb8.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1287053006 .
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-17js_global_data and global_alternate violate naming rules.Tom Sepez
They look too much like locals; use JSGlobalData and JSGlobalAlternate instead. Kill some commented out code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1289903004 .
2015-08-16Suppress -Wswitch for pdfium's fxge target for now.chromium/2487chromium/2486Nico Weber
BUG=pdfium:188 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1301473003 .
2015-08-16Fix -Wunused-function warnings on Windows.Nico Weber
BUG=505316 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1293033002 .
2015-08-14Fix a incorrectly placed comment from 0f6b51cLei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1288053005 .
2015-08-14Clean: Fix some unneeded semi-colons and bad spacing.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1284193005 .
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-13Fix build after commit 22ece1a. Too many if's.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1294723002 .
2015-08-13Remove last uses of FOXIT_CHROME_BUILD.Lei Zhang
BUG=pdfium:46 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1294693002 .
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-13Tidy up JS_Object.h and JS_Object.cpp.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1293673003 .
2015-08-13Kill JS_TIMER_MAPARRAYTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1286383004 .
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-13Make standalone PDFium DEPS pull clang-format.Tom Sepez
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1297453002 .