summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-02Refactoring of cross refs availability check.Artem Strygin
Use CPDF_CrossRefAvail to check crossrefs. Change-Id: Ia333cff4e86eaab5bad17424c1bb8ef9bdbca8ff Reviewed-on: https://pdfium-review.googlesource.com/15510 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Rename Transparency to iTransparency.Lei Zhang
Fix a mismatched parameter name in cpdf_renderstatus.h too. Change-Id: I9765838e6ab93db37791fc282e553b6cb9c51ec5 Reviewed-on: https://pdfium-review.googlesource.com/17050 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-02Remove default values from Set{UserData|Object} and GetUserData.Dan Sinclair
This CL removes the default values and inlines at the call sites. Change-Id: I47ff04a01c30af89949e9c8dd5d51f7ffaef1f98 Reviewed-on: https://pdfium-review.googlesource.com/17610 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove some C-style const char* casts.Lei Zhang
Change-Id: I4785dd277b9da072ee3c55e2aaeb688bbf02852e Reviewed-on: https://pdfium-review.googlesource.com/17391 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-02Remove default value from CJX_Node::{Set|Try}MeasureDan Sinclair
This CL removes the default values from {Set|Try}Measure and inlines into the call sites. Change-Id: I2356b92d419203cc1cdbea865b6e04b728430f5a Reviewed-on: https://pdfium-review.googlesource.com/17551 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default values from CJX_Node::{Set|Try}BooleanDan Sinclair
This CL removes the default values and inlines into the call sites. Change-Id: I922d40550384196b4288a648043d267538a66095 Reviewed-on: https://pdfium-review.googlesource.com/17590 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default values from CJX_Node::{Set|Try}EnumDan Sinclair
This CL removes the default value and inlines into the call sites. Change-Id: Ib6bc2b27189be3596e83a8b29b7a6a744278ed34 Reviewed-on: https://pdfium-review.googlesource.com/17570 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default values from CJX_Node::TryContentDan Sinclair
This CL removes the default values from TryContent and inlines into the call sites. Change-Id: I2d3f41f77364a0b923931479a60e07eae98dd5a9 Reviewed-on: https://pdfium-review.googlesource.com/17550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default values from CJX_Node::SetCDataDan Sinclair
This CL removes the default values from SetCData and inlines at the call sites. Change-Id: I664338a8c7fec2ee9ec0c9ed9f892e57ea1ced43 Reviewed-on: https://pdfium-review.googlesource.com/17534 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Cleanup params to CJX_Node::TryCDataDan Sinclair
This CL removes the bProto param as it was never set and inlines the value where needed in the methods. The default value was removed from bUseDefault and inlined into callsites as needed. Change-Id: I773261d19aa3799bc607e7df482b5f5e5217bee6 Reviewed-on: https://pdfium-review.googlesource.com/17533 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove CJX_Node::SetInteger default valueDan Sinclair
This CL removes the CJX_Node::SetInteger default value. All callsites already passed in a value. Change-Id: Ic3a1c3e3d896ca93ba0d5a3fe869d1273dd71dc7 Reviewed-on: https://pdfium-review.googlesource.com/17532 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default value from CJX_Node::TryIntegerDan Sinclair
This CL removes the default param from TryInteger and inlines into the call sites. Change-Id: If3325c717a1127d4dcf665a12980925877988a9c Reviewed-on: https://pdfium-review.googlesource.com/17531 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Remove some redundent code in CPDF_DIBSource::StartLoadDIBSource().Lei Zhang
Do the same for CPDF_DIBSource::ContinueLoadDIBSource(). Change-Id: I5c826967bf2595e2dcadfa6cae7edfe07ab17012 Reviewed-on: https://pdfium-review.googlesource.com/5252 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-02Remove default values for CJX_Node::SetContentDan Sinclair
This CL removes the default values from CJX_Node::SetContent and inlines at the call sites. Change-Id: I9daf3c3e0010540773c276aa4c4e5c357e91b3b2 Reviewed-on: https://pdfium-review.googlesource.com/17530 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Remove default value from CJX_Node::GetPropertyDan Sinclair
This CL removes the GetProperty default value and inlines into the callers. Change-Id: I0e18f27b51046fdf37ddc57f34a31154729c8db0 Reviewed-on: https://pdfium-review.googlesource.com/17510 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-02Simplify some CMap code.Lei Zhang
Change-Id: Ie7eb2605a789d2c841cb1dc123509f473c4c5a5e Reviewed-on: https://pdfium-review.googlesource.com/17410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-02CMemFile's buffer should be const uint8_t* const.Lei Zhang
Change-Id: I1c34886a9e33fb16ef121c0aa0b16c139517a940 Reviewed-on: https://pdfium-review.googlesource.com/17392 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-02Remove default values from CJX_Node::SetAttributeValueDan Sinclair
This CL removes the default parameters from SetAttributeValue and inlines into the call sites as needed. Change-Id: Ibb4e4747141a49c2367743421254c251aff71eeb Reviewed-on: https://pdfium-review.googlesource.com/17490 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Remove default params from CJX_Node::SetScriptContentDan Sinclair
This CL removes the default values and adds them to the call sites as needed. Change-Id: I7c9654a7b6320f1c81a129808b3afa3eed9d4159 Reviewed-on: https://pdfium-review.googlesource.com/17471 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Remove default value from CJX_Node::GetAttributeDan Sinclair
This CL moves the default value to CJX_Node::GetAttribute to the call sites and removes the default. Change-Id: I2b875e3c612b91ca67af106e271b040cc51c56ef Reviewed-on: https://pdfium-review.googlesource.com/17470 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Remove default value to CJX_Node::SetAttributeDan Sinclair
The bNotify value has been moved into the call sites and the default removed. Change-Id: Ifd2c0252b0f1421f7fc244d69e6f6bddc80e5591 Reviewed-on: https://pdfium-review.googlesource.com/17450 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Move CJX_Node definitions to cpp fileDan Sinclair
This CL moves some method bodies from the .h to the .cpp file. This makes the .h file a lot easier to read. Change-Id: Ia6366d3b8dcfdb1b626814577fd93b027250474c Reviewed-on: https://pdfium-review.googlesource.com/17430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-02Unify CPDF_DataAvail::Check[Header/End].chromium/3257Artem Strygin
Use CPDF_Parser instead of CPDF_SyntaxParser for parse File Header and tail. Change-Id: I9ca22b927519a6ea280e249ef43721c230faa6ab Bug: Reviewed-on: https://pdfium-review.googlesource.com/13970 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Improve readability for CPDF_Parser::StartParseInternalArtem Strygin
Change-Id: Id250aeeb131d344d79f41c93d4c71b42e266195d Reviewed-on: https://pdfium-review.googlesource.com/13930 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Unify parsing of linearized header.Artem Strygin
Change-Id: I3b55b1331ee97af254c248d4ac91b627c9603b59 Reviewed-on: https://pdfium-review.googlesource.com/13831 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Only use the yield instruction on architectures that support it.Andrew Weintraub
This is a downstream patch of https://crrev.com/502028. Change-Id: Ib78784093332a81a7afd6959c66f5e266540f6d3 Reviewed-on: https://pdfium-review.googlesource.com/17350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Remove use of deprecated 'register' keywordHans Wennborg
Bug: chromium:780692 Change-Id: I16e7d071b1375e8a31e785141a8af5b4c103f81b Reviewed-on: https://pdfium-review.googlesource.com/17390 Commit-Queue: Lei Zhang <thestig@chromium.org> Commit-Queue: Hans Wennborg <hans@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-11-01Remove default value from CJX_Node::HasAttributechromium/3256Dan Sinclair
The attribute is always false, removed and simplified the code. Change-Id: Ic20ffe8d91fc3fcd66835e1bc2b1bce3da69be16 Reviewed-on: https://pdfium-review.googlesource.com/17316 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-01Add GetDocument() helper to CJX_ObjectDan Sinclair
Change-Id: I710ea0baa1befb093d7174d4fc61a5ab28e9f92a Reviewed-on: https://pdfium-review.googlesource.com/17315 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-01Add CJX_ThisProxyDan Sinclair
This CL creates a CJX_ThisProxy which is created by CXFA_ThisProxy. This allows CJX_Object constructor to be protected. Change-Id: Ie6865c82c29cd1d129faa487c9021a63310c78a6 Reviewed-on: https://pdfium-review.googlesource.com/17314 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-01Convert CScript classes to have CJX objectsDan Sinclair
This CL moves the JS methods from the CScript classes into CJX representations. The methods are proxied to the CJX versions. Change-Id: Ic5f380228614a60238fbcf9e0d04d942fae395be Reviewed-on: https://pdfium-review.googlesource.com/17313 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-01Move CXFA_NodeList JS to CJX_NodeListDan Sinclair
This CL moves the JS from CXFA_NodeList to CJX_NodeList and proxies the JS calls. Change-Id: Ic2295ce2140321748bfe5f851e00da32d4332ce0 Reviewed-on: https://pdfium-review.googlesource.com/17312 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-01Move the item methods into CXFA_Node propertlyDan Sinclair
When CreateInstance, GetCount, GetItem, RemoveItem and InsertItem were moved out of the anonymous namespace they were not updated to remove the first parameter. This Cl removes the first parameter and uses the CXFA_Node as the thing to operate on. Change-Id: I1b6dc956844786c8ba88ae508547c9cf6e91242a Reviewed-on: https://pdfium-review.googlesource.com/17311 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-01Split JS methods out of CXFA_ObjectDan Sinclair
This CL moves the javascript code from CXFA_Object to CJX_Object. The Script_* methods are proxied to CJX_Object. The ownership of the CJX_ object was removed from CXFA_Node and moved up to CXFA_Object. Change-Id: I58d286e6bb0151aa88d4f673bc7729987417bde6 Reviewed-on: https://pdfium-review.googlesource.com/17310 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-01Split JS code out of CXFA_Node.Dan Sinclair
This CL moves JS code out of CXFA_Node and places it into fxjs/cjx_node. The CXFA_Node then has a CJX_Node as a member and, currently, proxies JS calls to the CJX_Node member. Change-Id: Ic5b95184c8fd2347f0bdcfbccfa89bb6b52835b6 Reviewed-on: https://pdfium-review.googlesource.com/17290 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-01Move some XFA JS code into fxjs/Dan Sinclair
This CL renames cxfa_scriptcontext to cfxjse_engine and cxfa_fm2jscontext to cfxjse_formcalc_context. From reading the code, the script context appears to handle the v8 setup and object code. The formcalc context code is related to handling the JS code generated from the transpiler. I, think, these new names make the intended usage clearer. They also move the code into fxjs/ to keep along side the rest of the JS code. Change-Id: I50619fbe48ca1f553a44cf0e0cb0210be8e45e4f Reviewed-on: https://pdfium-review.googlesource.com/17130 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-31Fix FPE in XFACodecFuzzerchromium/3255Ryan Harrison
This is a div by 0 issue BUG=chromium:779890 Change-Id: I91ca2969ffe52fb486b1fab32abc8609cd6567a2 Reviewed-on: https://pdfium-review.googlesource.com/17250 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-10-31Add FS_RECTF conversion functions.Lei Zhang
Change-Id: I87fb109fdd121716a170df15c4762496c1ccb88c Reviewed-on: https://pdfium-review.googlesource.com/17210 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-31Simplify code in fpdf_transformpage.cpp.Artem Strygin
Change-Id: I4a33ad52bf5d0710a44f784da9f50123771b8416 Reviewed-on: https://pdfium-review.googlesource.com/17150 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30Convert JS resource into enum classchromium/3254Dan Sinclair
This CL converts the #defines into an enum class. Change-Id: I895e29e1d46a7a82d7be896f5776eb00d28559f5 Reviewed-on: https://pdfium-review.googlesource.com/17091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Remove useless code.Artem Strygin
Change-Id: I5fa9472eecc176d25213fd446a4abc06e815a48b Reviewed-on: https://pdfium-review.googlesource.com/15592 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Deduplicate md5s in fpdfannot_embeddertest.cpp for Windows and others.Henrique Nakashima
Change-Id: I521be6b6548518487ba4eef93d72f29b26809cb5 Reviewed-on: https://pdfium-review.googlesource.com/17110 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check page availability.Artem Strygin
Change-Id: Iad67de5881481684fee605f48f9349a3be21f70b Reviewed-on: https://pdfium-review.googlesource.com/15591 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Rename global data files to match contentsDan Sinclair
This CL renames the files related to Javascript global data to match their file contents. Change-Id: I65a6191968656b5e89c9eb6edb2ea9f9db92875a Reviewed-on: https://pdfium-review.googlesource.com/17090 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Move fpdfsdk/javascript to fxjs/Dan Sinclair
This CL moves all of the CJS files into fxjs. The :javascript build rule is removed and :fxjs is used instead. Change-Id: I1701b308f51317d0346c7401b43812c3f43a27bf Reviewed-on: https://pdfium-review.googlesource.com/17047 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Combine common code in fpdf_transformpage.cpp.Lei Zhang
Change-Id: I50311794b6fb4ef3c38420838ec6c3bb157b06a7 Reviewed-on: https://pdfium-review.googlesource.com/17071 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check page resources availability.Artem Strygin
Change-Id: Idbb30122c113ffce421c8d471551f619f4ab7576 Reviewed-on: https://pdfium-review.googlesource.com/15590 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30Rename util to cjs_utilDan Sinclair
This CL renames util.{cpp|h} to cjs_util.{cpp|h} to match the file contents. Change-Id: Ia1bcbced0d817e2334310a25b09f9ec56822d600 Reviewed-on: https://pdfium-review.googlesource.com/17046 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check form availability.Artem Strygin
Change-Id: I31c0a74322a2299f2d0cd1f42669b1bf447a9958 Reviewed-on: https://pdfium-review.googlesource.com/13530 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30More safe ints in CJBig2_TRDProcNicolas Pena
Bug: chromium:778961 Change-Id: I1d08b3282304931276c24e50392c10b21780dcde Reviewed-on: https://pdfium-review.googlesource.com/16971 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>