summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-12Move Script_Som_{Fill|Font}Color to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_{Fill|Font}Color from CJX_Node to CJX_Object. Change-Id: I681d2c09a7560eb96967bbbbcb050246f4b879c0 Reviewed-on: https://pdfium-review.googlesource.com/20991 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Som_Border{Width|Color} to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_Border{Width|Color} from CJX_Node to CJX_Object. Change-Id: I07ba9ef2af675993c9f4d14cb74f48252a907569 Reviewed-on: https://pdfium-review.googlesource.com/20990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Roll DEPS for Skia to 40ca2087.Lei Zhang
Routine roll, with update for a removed API call. https://chromium.googlesource.com/skia/+log/d6c04d9a..40ca2087 Change-Id: I938b214fbb79cea6fed99edb5ca7d90a779bb8e8 Reviewed-on: https://pdfium-review.googlesource.com/20930 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-12Combine WideString::operator< and Compare().Lei Zhang
Change-Id: I3ea13ace6290e8fab41a3f65c9ac047407a74e4d Reviewed-on: https://pdfium-review.googlesource.com/20852 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-12Move Script_Attribute_Integer to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_Integer from CJX_Node to CJX_Object. Change-Id: Iec9d38440756827fa52561cb5938af4041738ad5 Reviewed-on: https://pdfium-review.googlesource.com/20951 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Use early returns in pdf_parser_decode.cpp.Lei Zhang
Also add a GetUnicodeFromBytes() helper function and use FX_INVALID_OFFSET more often. Change-Id: I3b0954e0cad31a600b0a990360ab370186c792d6 Reviewed-on: https://pdfium-review.googlesource.com/20850 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-12Remove unused script attribute methodsDan Sinclair
This CL removes unused CJX_Node::Script_Attribute*Read methods. Change-Id: If85b6de881423fa826dec64cb63bb79e5e14f569 Reviewed-on: https://pdfium-review.googlesource.com/20971 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Attribute_BOOL to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_BOOL from CJX_Node to CJX_Object. Change-Id: I0e5509f49c77897cb17a01fb9fa3abf0cb6074ae Reviewed-on: https://pdfium-review.googlesource.com/20970 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Attribute_String to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_String from CJX_Node to CJX_Object. Change-Id: Icbf1cb3ea132e358fd53f00008c0b748ed4cc941 Reviewed-on: https://pdfium-review.googlesource.com/20950 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Remove non-const refs in CPDF_NameTree functions.Lei Zhang
Change-Id: Ic3dbc07ac80ad48fd670c090027cc151afc61e7f Reviewed-on: https://pdfium-review.googlesource.com/20890 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-12[js] Convert to using size instead of sentinelsDan Sinclair
This CL changes the DefineMethod, DefineProps and DefineConsts methods to pass a size instead of depending on a sentinel value in the definition arrays. Change-Id: Ie054544124290c0833a8b21af175a203ca99591a Reviewed-on: https://pdfium-review.googlesource.com/20551 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-12Roll DEPS for zlib to 91155b5d.Lei Zhang
Routine roll. https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/945bc9fb..91155b5d TBR=dsinclair@chromium.org Change-Id: I93a37bde12f44fa769abbef882ea04ebb8e05a8d Reviewed-on: https://pdfium-review.googlesource.com/20910 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-11[xfa] Move CJX code into fxjs/xfaDan Sinclair
This CL moves the remaining CJX clases into fxjs/xfa so they co-exist with the rest of the CJX classes. Change-Id: I2b1e5504ac23f73df177f309967a04ab27fb61d1 Reviewed-on: https://pdfium-review.googlesource.com/20550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-11Remove default arguments to CPDF_StreamAcc::LoadAllData().Lei Zhang
Add LoadAllDataFiltered() and LoadAllDataRaw() and update callers. Change-Id: I9b80ee34a358db204968acdc8b1adc9db0b6b83f Reviewed-on: https://pdfium-review.googlesource.com/20810 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-12-11Slightly simplify CPDF_StreamAcc::LoadAllData().Lei Zhang
Also initialize members in the header. Change-Id: Ic1cda7f9ef4c69e26604c706678aed24bf4e8ee3 Reviewed-on: https://pdfium-review.googlesource.com/20790 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-11[xfa] Refactor CJX method signatures.Dan Sinclair
This CL changes the CJX methods from void (*)(CFXJSE_Arguments*) to CJS_Return (*)(CJS_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) which is closer to how CJS works in practice. Change-Id: I3a3129268acfe4262dfeb04179919ed19f6c24e1 Reviewed-on: https://pdfium-review.googlesource.com/20491 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-12-11Move some GetDict() calls out of header files.Lei Zhang
Change-Id: I13b297ddb080b478a30a959889941b46feb363b3 Reviewed-on: https://pdfium-review.googlesource.com/20770 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-11Initialize FDE_TEXTEDITPIECE.chromium/3292Lei Zhang
BUG=pdfium:958 Change-Id: I7c17c327db974dacbeb3577d79c9522de348c78e Reviewed-on: https://pdfium-review.googlesource.com/20730 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-11Get rid of default ctors for CPDF_Action and CPDF_AAction.Lei Zhang
Change-Id: I45bac6e1b3fb9ae90feff1dc65c716beb2cab4c4 Reviewed-on: https://pdfium-review.googlesource.com/20771 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-11Clarify some function names in CPDF_NameTree.Lei Zhang
Change-Id: Ia7ab625bcf802d0f6b15985065b7e0c3584bb2f1 Reviewed-on: https://pdfium-review.googlesource.com/20750 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-09Roll DEPS for build to 891d9357.chromium/3291chromium/3290Lei Zhang
Routine roll. https://chromium.googlesource.com/chromium/src/build/+log/159ee37d..891d9357 TBR=dsinclair@chromium.org Change-Id: I45a61315694a7e55ed5a29c86303875a8436c3db Reviewed-on: https://pdfium-review.googlesource.com/20710 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for Skia to d6c04d9a.Lei Zhang
Routine roll. https://chromium.googlesource.com/skia/+log/e0e20755..d6c04d9a TBR=dsinclair@chromium.org Change-Id: I5ea78647f6fd52f660b446392b6507d8a097f453 Reviewed-on: https://pdfium-review.googlesource.com/20651 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for clang to 0235fed9.Lei Zhang
AKA roll Clang 313786:315613. https://chromium.googlesource.com/chromium/src/tools/clang/+log/1bc4a898..0235fed9 TBR=dsinclair@chromium.org Change-Id: I5077a699f51a91aa45868aa309454266cf8a31d6 Reviewed-on: https://pdfium-review.googlesource.com/20695 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for zlib to 945bc9fb.Lei Zhang
Routine roll. https://chromium.googlesource.com/chromium/src/third_party/zlib/+log/718f6864..945bc9fb TBR=dsinclair@chromium.org Change-Id: I723e336ce939c3ede9de3957cda86c4dd1d148e5 Reviewed-on: https://pdfium-review.googlesource.com/20694 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-09Roll V8 to ff3d8321.Lei Zhang
Just a routine roll. https://chromium.googlesource.com/v8/v8/+log/4931eb42..ff3d8321 TBR=dsinclair@chromium.org Change-Id: I99063efad0d7a7a9408d499a49c920a0a030e23d Reviewed-on: https://pdfium-review.googlesource.com/20690 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for build to 159ee37d.Lei Zhang
This makes MSVS 2017 the default on Windows. https://chromium.googlesource.com/chromium/src/build/+log/555b75b1..159ee37d TBR=dsinclair@chromium.org Change-Id: I2c533ad70c37309bf467b97788d24998bbd7c71a Reviewed-on: https://pdfium-review.googlesource.com/20693 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for clang and build.Lei Zhang
This is effectively roll clang 312679:313786. Upgrade build to match. https://chromium.googlesource.com/chromium/src/tools/clang/+log/4db58540..1bc4a898 https://chromium.googlesource.com/chromium/src/build/+log/fc826e6c..555b75b1 TBR=dsinclair@chromium.org Change-Id: Ic8a1fa4c565c4ed481ca8e565958b6aee7a89686 Reviewed-on: https://pdfium-review.googlesource.com/20692 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for buildtools to f6d165d9.Lei Zhang
Just a routine roll. https://chromium.googlesource.com/chromium/buildtools/+log/f90f6a5a..f6d165d9 TBR=dsinclair@chromium.org Change-Id: Ifaf4fc4ae9768a60de9cb4555e335c3ee56d1d7c Reviewed-on: https://pdfium-review.googlesource.com/20691 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for ICU to e3b480d3.Lei Zhang
Routine Roll. https://chromium.googlesource.com/chromium/deps/icu/+log/08cb9568..e3b480d3 TBR=dsinclair@chromium.org Change-Id: I509f822f02cec0ac17bf2199a699e1198f274a7f Reviewed-on: https://pdfium-review.googlesource.com/20670 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-09Roll DEPS for catapult and trace_event.Lei Zhang
Just a routine roll. Changelogs: https://chromium.googlesource.com/catapult/+log/0cf3924b..d624b3ce https://chromium.googlesource.com/chromium/src/base/trace_event/common/+log/06294c8a..0e9a47d7 TBR=dsinclair@chromium.org Change-Id: Ib3349d691a2f6c26ee57951604e8a82607e9a0f6 Reviewed-on: https://pdfium-review.googlesource.com/20650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-08Fix CPDF_AAction default constructor so it compiles in other environments.Andrew Weintraub
Bug: Change-Id: I4e25e96bbcade72115722ac7540d0d186cd2dc03 Reviewed-on: https://pdfium-review.googlesource.com/20631 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-08Fix an LLVM error caused by assigning a uint32_t to an int without a castAndrew Weintraub
Bug: Change-Id: I394fb3c6df95d5170302731fd33ef523a38f070c Reviewed-on: https://pdfium-review.googlesource.com/20630 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-08Fix build when using different sysroots.chromium/3289Andrew Weintraub
Bug: Change-Id: I86b4c72343288d83d51f493d3d888aad45baed5a Reviewed-on: https://pdfium-review.googlesource.com/20610 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-07[xfa] Move JS method information to files.chromium/3288Dan Sinclair
This CL moves the XFA SOM JS Method information out of the c-array and into individual CJX class files. Change-Id: I401046a06aacaf1f04e5a51eb899e479de012e15 Reviewed-on: https://pdfium-review.googlesource.com/20450 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-07Add WARN_UNUSED_RESULT to more static methods in (Byte|Wide)String.Henrique Nakashima
Also fixes some usages that were not working as intended after the conversion to static. Change-Id: I18c18369754f6ca165f98999b5b80eecf6c76973 Reviewed-on: https://pdfium-review.googlesource.com/20590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-12-07Add WARN_UNUSED_RESULT to ByteString::Format* methods.Henrique Nakashima
Change-Id: I0caba99cb8e99ea5af49d906b576f580275620bb Reviewed-on: https://pdfium-review.googlesource.com/20570 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-12-07Fix WideString::Format instances that should use %lsRyan Harrison
BUG=pdfium:951 Change-Id: I4b82ce81c8db3f00fa2341c6fb853ed84814e5e5 Reviewed-on: https://pdfium-review.googlesource.com/20510 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-12-07Change %s to %ls in calls to WideString::FormatRyan Harrison
This fixes the text in validation pop ups for XFA forms. BUG=pdfium:951,pdfium:950 Change-Id: Iad46a30cae3fafcf9f73a46cb204c2de54b62b68 Reviewed-on: https://pdfium-review.googlesource.com/20490 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-12-07Fix nits from previous CL.Dan Sinclair
This CL fixs up some nits from previous CL. Change-Id: I3d24d149d91b1290258291f5b79894496b195459 Reviewed-on: https://pdfium-review.googlesource.com/20290 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-06Move m_CharCodes to local for crash investigationBruce Dawson
m_CharCodes is getting corrupted and it's difficult to tell why. This moves it to a local variable before it is destroyed so that the corruption - which should be copied over - will be stored in the crash dump. Bug: 782215 Change-Id: Ifd09b21396bf28bca69f2b4082c61cbc4782e209 Reviewed-on: https://pdfium-review.googlesource.com/20530 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-06Fix ps rendering.chromium/3287Henrique Nakashima
Also fix other occurrences that were missed. Bug:pdfium:947 Change-Id: Ic7e909ff9ce3abdf91e8e9ba108c84ad28b2fd65 Reviewed-on: https://pdfium-review.googlesource.com/20472 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-12-06Fix nits on some font code.Lei Zhang
Change-Id: I80be0de1a7d9ba502b4468bc13a4595566f8fb30 Reviewed-on: https://pdfium-review.googlesource.com/20432 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-06Move V8 helper methods to their own class.Dan Sinclair
This CL extracts the V8 helper methods from the CFXJS_Engine and places them in a CJS_V8 class which the engine inherits from. This will allow inheriting the CJS_V8 class into CFXJSE_Engine to share the helper methods. Change-Id: I58a7cd7ebac3af303ecbeee84c6940186a0f1dc6 Reviewed-on: https://pdfium-review.googlesource.com/20470 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-12-05Replace uses of bsearch().chromium/3286Lei Zhang
Either switch to std::lower_bound(), or brute force when the search space is very small. Change-Id: I54db346aeb6f2e8000e95a6a9c8fbdd512df500a Reviewed-on: https://pdfium-review.googlesource.com/20431 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-05Replace bsearch() in FPDFAPI_CIDFromCharCode().Lei Zhang
Use std::lower_bound() instead. Change-Id: I0bed2a90f3aa427a283cd86a050a027ec7a64358 Reviewed-on: https://pdfium-review.googlesource.com/20430 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-05Remove redundant field in struct FXCMAP_CMap.Lei Zhang
Change-Id: Ibac6398b5849820562830bb8ed95c3428496f7ef Reviewed-on: https://pdfium-review.googlesource.com/20410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-05Fix CXFA_SimpleParser member destruction order.Lei Zhang
To avoid confusing UnownedPtr. BUG=chromium:791616 Change-Id: Ieb637f726049eee7c640b6de3b6ecd848ab40384 Reviewed-on: https://pdfium-review.googlesource.com/20391 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-05Avoid integer overflows in CPDF_FixedMatrix::Transform().Lei Zhang
Use floating point math and saturated_cast to calculate the transform. Refactor CFX_BilinearMatrix::Transform() to share common code, instead of using integer math and CheckedNumerics. BUG=chromium:791048 Change-Id: Ib3812b3b3b9373a8eb3b1dde12cb28d424e0bb3e Reviewed-on: https://pdfium-review.googlesource.com/20390 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-04Simplify some CFX_FloatRect methods.chromium/3285Lei Zhang
Also add a comment about the various CFX_FloatRect to FX_RECT conversion methods. Change-Id: Ia9984797dc513cdc487fe9972b32c216c9f99ec1 Reviewed-on: https://pdfium-review.googlesource.com/20217 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-12-04Simplify color calculations in CFX_ImageTransformer.Lei Zhang
Change-Id: I14e614dbd0b7c1187b686bf574d14b94f04a3e7e Reviewed-on: https://pdfium-review.googlesource.com/20271 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>