summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-02Remove third_party/build/build_config.h.Lei Zhang
Use build/build_config.h instead. Having two build_config.h files is confusing. Change-Id: I4bd9c76ab6d913ee0aaa8b2f9c17b94bfba2d128 Reviewed-on: https://pdfium-review.googlesource.com/25111 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-02-02Small tidy of fxjsTom Sepez
Use correct include style for v8 headers. Use incomplete type to avoid including header. Change-Id: Ibd58aa25b2a17fbd1cf6a20643b6f25ca008974f Reviewed-on: https://pdfium-review.googlesource.com/25230 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-02Remove V8 context from CJS_V8Tom Sepez
Makes CFXJS_Engine and CFXJSE_Engine consistent with each other in that both have a V8 context to themselves, and not one inheritted from the CJS_V8 (which is now more per-isolate than per-context). Consolidate NewLocalContext() and GetPersistentContext(), which both did the exact same thing under the covers once inside v8 land. Rename a few things to make it simpler. Change-Id: I68905db9ad44253063da235fcb276a75627a2dbc Reviewed-on: https://pdfium-review.googlesource.com/25170 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-02Make global object function names clearer.Tom Sepez
Also tidy some sub-expressions. Change-Id: Ieabd5f6cea60e8ec03c8ce5ebe372fc80b05a7bb Reviewed-on: https://pdfium-review.googlesource.com/25150 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-02Add asm.js to third_party/build/build_config.h.Henrique Nakashima
This reflects changes in the build_config.h from chromium/build/src. Bug: chromium:804907 Change-Id: I892bcf3bbf5d260c904f40536fa1f3c9e49a5ac6 Reviewed-on: https://pdfium-review.googlesource.com/25130 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-02-02Fix IWYU errors in fpdfppo.cpp.Lei Zhang
Also rename the file to fpdf_ppo.cpp so it is consistent with the public header file name. This makes the linter happy. Change-Id: Ib3608c78111842579898c55f1399982ab2549310 Reviewed-on: https://pdfium-review.googlesource.com/24970 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-01Make CFXJSE-created contexts refer to their CFXJS counteparts.chromium/3337Tom Sepez
Bug: 773229 Change-Id: Ic3774c7f6abe3a195bbe09b91d91c549d4d7ac46 Reviewed-on: https://pdfium-review.googlesource.com/25110 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-01Change internal usages of GetPageIndexDeprecated() to new method.Henrique Nakashima
The new GetDestPageIndex() method does the same thing, but has a consistent form of returning an error (returns -1). Bug: pdfium:938 Change-Id: I31583e1c544d9173a28582b849edd5f73c40e174 Reviewed-on: https://pdfium-review.googlesource.com/25070 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-02-01Introduce CXFJS_Engine::EngineFromContext/SetEngineInContext helpersTom Sepez
No functional change, but expose helpers likely to be needed by next steps. Rename CXFJS_Engine::CurrentEngineFromIsolate to be more accurately named along the way. Change-Id: Iaf2d15a09cfed85705d24ee056e78edf0660ce59 Reviewed-on: https://pdfium-review.googlesource.com/25090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-01Make FXJSE_Engine constructed from FXJS_Engine.Tom Sepez
No change in functionality yet, just passing higher level object. Precursor to maybe sharing v8 context between fxjs / fxjse. Mark unimplemented ctors / assignment operator as "delete". Change-Id: I100de7755909eec2eed96f6f51216d85923ffbb2 Reviewed-on: https://pdfium-review.googlesource.com/25050 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-01Change return of FPDFDest_GetDestPageIndex to int.Henrique Nakashima
Bug: pdfium:938 Change-Id: Ic530788313157ce2513f91217705401da7a05ef8 Reviewed-on: https://pdfium-review.googlesource.com/25030 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-02-01Convert CFX_CSSPropertyTable to CFX_CSSDataRyan Harrison
This converts the existing class naming and references. The ::Entry struct is converted to ::Property. The GetBy* methods are renamed to GetPropertyBy*. Free functions from other parts of the CSS code base are merged into the class. GetCSSPropertyValueByName becomes ::GetPropertyValueByName with a return value of ::PropertyValue*. GetCSSLengthUnitByName becomes ::GetLengthUnitByName with a return value of ::LengthUnit*. GetCSSColorByName becomes ::GetColorByName with a return value of ::Color*. BUG=pdfium:998 Change-Id: I5b78c69d0fe53ad714ac3545cfdda8c26b95e4d5 Reviewed-on: https://pdfium-review.googlesource.com/25010 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-01Deprecate FPDFDest_GetPageIndex and create a fixed version.Henrique Nakashima
FPDFDest_GetDestPageIndex() has a well defined return value for errors (-1). Keeping FPDFDest_GetPageIndex() to avoid changing behavior of the old API for whoever relies on it. Bug: pdfium:938 Change-Id: Iad528923cb156e957a419540c262a65f45cb777d Reviewed-on: https://pdfium-review.googlesource.com/24811 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-01[jumbo] Compile fix: Move a GetPageContent to a more limited scopeDaniel Bratell
There is a GetPageContent in pdfsdk/fpdfppo.cpp and one in fpdfsdk/fpdf_transformpage.cpp, both in the anonymous namespace. In jumbo builds those two files compile in the same translation unit and then they share the same anonymous namespace and clash. Given that the function is small and that I saw no natural place to share it, this patch moves one instance into the class that is using it. Change-Id: Icbdf69bd83887c6e5cf31d2080a5b12b5710691e Reviewed-on: https://pdfium-review.googlesource.com/24990 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-01Rename some CJS / IJS names for clarity.Tom Sepez
Prior cleanup before making FXJS/FXJSE share one v8 context. Return CJS object rather than isolate in one place. Use unique_ptr in one place. Change-Id: I837ae4880368a6d72e59b38f37e06908e05c34bd Reviewed-on: https://pdfium-review.googlesource.com/24950 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-01Test more context overlap in fxjs/fxjs_v8_embeddertest.cppTom Sepez
Change-Id: If9ab65019f12244938116e19f717e2092ccae4ff Reviewed-on: https://pdfium-review.googlesource.com/24931 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Experimental API for N-up feature support for printxlou
FPDF_ImportNPagesToOne function is added to support N-up feature for print. If numPagesOnXAxis * numPagesOnYAxis == 0 Returns a nullptr. If numPagesOnXAxis * numPagesOnYAxis == 1 Creates a new PDF document, and import one page to each output page of the PDF document If numPagesOnXAxis * numPagesOnYAxis > 1, FPDF_ImportNPagesToOne imports multiple pages onto the same page. This feature is intended for print pipeline to use. Change-Id: Iec1afffe377ff9b7fef3cb33414b29b324154fa4 Reviewed-on: https://pdfium-review.googlesource.com/22050 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Roll android_ndk, build, buildtools.Henrique Nakashima
Roll DEPS for android_ndk to e951c37287c7d8cd915bf8d4149fd4a06d808b55. https://chromium.googlesource.com/android_ndk/+log/d5752321..e951c372 Roll DEPS for build to b1bf4b84cb5db309fda657ebd19a6c3d2ebdcb66. https://chromium.googlesource.com/chromium/src/build/+log/097c79ba..b1bf4b84 Roll DEPS for buildtools to f115f4786771afdfacb18a2299541b23e21f4792. https://chromium.googlesource.com/chromium/buildtools/+log/b36c7b60..f115f478 The android_ndk version needs to be updated to r16. android_ndk and build cannot be rolled separately. build depends on the buildtools changes. This enables pdfium to be built with emscripten. Bug: chromium:804907 Change-Id: If442e92f2f608ae20b476b9b077111e2596187cf Reviewed-on: https://pdfium-review.googlesource.com/24890 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-31Remove handrolled bsearch from FGAS_GetUnicodeBitFieldRyan Harrison
BUG=pdfium:798 Change-Id: I054db94b53fbfabdf5dd860e951bef9c53177ad1 Reviewed-on: https://pdfium-review.googlesource.com/24830 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-31Move initializers to header for CXFA_ItemLayoutProcessDan Sinclair
This CL moves the static construction values from the cpp to the h file. Change-Id: I04ff6513be2287582b90453390e5bd44c5b47d68 Reviewed-on: https://pdfium-review.googlesource.com/24870 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-31Remove handrolled bsearch from XFA_GetScriptAttributeByNameRyan Harrison
BUG=pdfium:798 Change-Id: Ie680eff06fdee49d843e0cb847ee9c919975cfb5 Reviewed-on: https://pdfium-review.googlesource.com/24779 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-31Cleanup visibility in CXFA_ItemLayoutProcessorDan Sinclair
This CL moves anonymous namespace methods in CXFA_ItemLayoutProcessor to be private methods and then fixes the visibility on most of the methods/data to be private. Change-Id: Idfccbc53b94628b18bc3576e4466391b0f704b44 Reviewed-on: https://pdfium-review.googlesource.com/24851 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-31Create CXFA_Node::PresenceRequiresSpaceDan Sinclair
This CL replaces XFA_ItemLayoutProcessor_IsTakingSpace with a PresenceRequiresSpace call on CXFA_Node. Change-Id: Ibf570f25eeb3404d72e87cb62e06a7ad70f0916f Reviewed-on: https://pdfium-review.googlesource.com/24850 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-31Roll pdfium/third_party/freetype/src/ 2c048a8a6..036bdc0c9 (53 commits)Nicolas Pena
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/2c048a8a622e..036bdc0c9a4f $ git log 2c048a8a6..036bdc0c9 --date=short --no-merges --format='%ad %ae %s' 2018-01-28 wl [truetype] Minor typo. 2018-01-27 wl [truetype] Better protection against invalid VF data. 2018-01-27 wl * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference. 2018-01-27 wl * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor. 2018-01-27 wl [truetype] Better trace VF instances. 2018-01-27 wl Fix comment. 2018-01-27 wl [truetype] Beautify tracing of VF axis records. 2018-01-26 wl [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955). 2018-01-23 apodtele [apinames] Anonymous version map for GNU linker. 2018-01-21 apodtele [unix] Call libtool to clean up. 2018-01-18 apodtele * src/base/ftver.rc: Fix mingw-w64 compilation. 2018-01-18 apodtele [build] Enable VERSIONINFO resource for Cygwin/MinGW. 2018-01-18 apodtele [build] Move VERSIONINFO resource. 2018-01-12 apodtele [build] Expand dllexport/dllimport to Cygwin/MinGW. 2018-01-12 apodtele [build] Improve and document MSVC build. 2018-01-10 ssrobins * CMakeLists.txt [win32]: Suppress warnings for POSIX functions. 2018-01-10 ewaldhew [psaux] Correctly handle Flex features (#52846). 2018-01-09 apodtele * builds/windows/vc2010/freetype.sln: Synchronize with the project. 2018-01-08 wl * Version 2.9 released. ======================= 2018-01-08 wl Next release will be 2.9. 2018-01-07 wl Add check for librt, needed for `ftbench' (#52824). 2018-01-07 ewaldhew [psaux] Fix Type 1 glyphs with too many stem hints. 2018-01-06 wl Add `FT_Done_MM_Var'. 2018-01-06 wl Minor doc fixes. 2018-01-03 wl [truetype] Round offsets of glyph components only if hinting is on. 2018-01-03 wl * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code. 2018-01-02 apodtele Move internal LCD-related declarations. 2018-01-02 apodtele * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_MSC_VER]: Limit Visual C++ attributes. 2018-01-03 wl [truetype] Make blend/design coordinate round-tripping work. 2018-01-02 wl Update copyright year. 2017-12-31 wl Update `CHANGES' file with demo program news. 2017-12-31 wl * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. 2017-12-31 wl Synchronize other Windows project files. 2017-12-31 wl Update Visual C 2010 project files. 2017-12-30 wl Updated `CHANGES' file. 2017-12-30 wl * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file. 2017-12-28 wl * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file. 2017-12-27 wl Fix compiler warnings. 2017-12-27 wl Fixes for `make multi'. 2017-12-27 wl Provide support for intra-module callback functions. 2017-12-27 wl Add missing ChangeLog entry, copyright notices, whitespace, formatting. 2017-12-25 ewaldhew Move PostScript drivers' property handlers to `base' 2017-12-20 wl Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new. 2017-12-18 wl Update incorrect ChangeLog entry. 2017-12-18 wl [sfnt] Fix charmap type 2 iterator (#52646). 2017-12-18 matthias.clasen [truetype] Minor code beautification. 2017-12-18 wl * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. 2017-12-18 wl * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688). 2017-12-18 wl [truetype] Fix previous commit. 2017-12-18 wl [truetype] Don't apply HVAR and VVAR deltas twice (#52683). 2017-12-17 jfkthame [truetype] Correctly handle variation font phantom points (#52683). 2017-12-17 jfkthame Fix incorrect advance width scaling (#52683). 2017-12-16 apodtele * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. * objs/.gitignore: Ignore almost everything. Created with: roll-dep pdfium/third_party/freetype/src R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org Bug: pdfium:995 Change-Id: I70cdf674d66390d4600a5438640b51f6b39c4d84 Reviewed-on: https://pdfium-review.googlesource.com/24370 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Remove handrolled search from GetCSSColorByNamechromium/3336Ryan Harrison
BUG=pdfium:798 Change-Id: I9f0cc6fa095f111d6c43034b55f5e12e2bcab059 Reviewed-on: https://pdfium-review.googlesource.com/24716 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-31Remove handrolled search from GetCSSLengthUnitByNameRyan Harrison
BUG=pdfium:798 Change-Id: I97d0dc566f95736ef12eda90ee0bf336cba42098 Reviewed-on: https://pdfium-review.googlesource.com/24715 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-31Remove handrolled search from GetCodePageFromCharsetRyan Harrison
BUG=pdfium:798 Change-Id: If89c162f8a6c15a8a0f4313fbf4713ee2fde5357 Reviewed-on: https://pdfium-review.googlesource.com/24719 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Remove handrolled search from GetEventParaInfoByNameRyan Harrison
BUG=pdfium:798 Change-Id: If6219f06303c78ecc8ddda52dd0095d658148e91 Reviewed-on: https://pdfium-review.googlesource.com/24718 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Remove handrolled search from GetCSSPropertyValueByNameRyan Harrison
BUG=pdfium:798 Change-Id: I1e50aeffa439063bc9eb2640af457e33c4e3c46c Reviewed-on: https://pdfium-review.googlesource.com/24713 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Explicitly suppress -Wimplicit-fallthrough for pdfium.Nico Weber
No behavior change since that warning isn't enabled anywhere yet, and it's opt-in. This is a prerequisite for https://chromium-review.googlesource.com/c/chromium/src/+/895726 Bug: chromium:177475 Change-Id: I844455a19ed76b5deb0201a878576ab0d5418a71 Reviewed-on: https://pdfium-review.googlesource.com/24790 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
2018-01-31Clean up CSS property tableRyan Harrison
Reorganizes the free functions to be static methods on a class. Converts the Table struct to be an Entry struct defined in the class. Change-Id: I9eca0dfb15187af10cbe2dc4b4c2756d55d957be Reviewed-on: https://pdfium-review.googlesource.com/24712 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Clean up FPDFPage_New() documentation.Lei Zhang
Change-Id: I3ee754c2875b6ea28750803dbd8e4d9fe6dd1d41 Reviewed-on: https://pdfium-review.googlesource.com/24570 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-31Remove NumericLimit params which are always the sameDan Sinclair
This CL removes the two params from NumericLmits which are always set to the same value and retrieves the values in the method itself. Change-Id: Ibeabdc7187faa58e93ffbe00063171fec0842256 Reviewed-on: https://pdfium-review.googlesource.com/24717 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Use unsigned for char widthchromium/3335Nicolas Pena
Bug: 806612 Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1 Reviewed-on: https://pdfium-review.googlesource.com/24410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-01-30Shuffle more code out of CXFA_NodeDan Sinclair
This CL moves more code out of the CXFA_Node class and into specific subclasses. Change-Id: Idca36f251431bf7efd4da045aeabf097ab23f0ce Reviewed-on: https://pdfium-review.googlesource.com/24714 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Move CheckButton code from CXFA_Node to CXFA_CheckButtonDan Sinclair
This CL moves some of the code specific to CheckButtons out of CXFA_Node and into the CXFA_CheckButton class. The CheckButton is passed as a parameter to the CXFA_FFCheckButton class. Change-Id: I3344c484d90e3b8d1024024a2851685044113a23 Reviewed-on: https://pdfium-review.googlesource.com/24711 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Clean up CSS Data Table entries and accessRyan Harrison
This cleans up the entries in the table to no longer have a marker for size, and also removes a hand rolled search. This prevents an out of bounds issue that had been reported and addresses another potential out of bounds issue. BUG=chromium:807214 Change-Id: I3d3ab5a3a174dd4dcec56fa7ee7a0e6c2805bfaa Reviewed-on: https://pdfium-review.googlesource.com/24690 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-30Remove bare new from JS_Define.hTom Sepez
Change-Id: Ic734c7141e52b8ca332ca9dc78118b84904c41b0 Reviewed-on: https://pdfium-review.googlesource.com/24470 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Check if opj_image_data_alloc returned null.Henrique Nakashima
Bug: chromium:797726 Change-Id: Ib13d5a4a78de462f1257f1103728f2a4111cb916 Reviewed-on: https://pdfium-review.googlesource.com/24510 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-30Cleanup some param passing codeDan Sinclair
This CL cleans up some of the code around passing input information around. Change-Id: Id3c1ffa93c9e50c3b6312b15533ccc32c7406264 Reviewed-on: https://pdfium-review.googlesource.com/24710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Guard usages of tellp(). It may return -1 in error cases.Henrique Nakashima
Change-Id: I064ddcad8671b9ade2c02142a6c2c2983846e3a9 Reviewed-on: https://pdfium-review.googlesource.com/24650 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-30Cleanup duplicate RunScript codeDan Sinclair
This CL consolidates the duplicate RunScript code in CPDFSDK_ActionHandler. Change-Id: I08beb7644b6cbaa7906e5bb302372fd8a670f32a Reviewed-on: https://pdfium-review.googlesource.com/24630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Remove not reachable branch in fxge code.Lei Zhang
BUG=chromium:805881 Change-Id: I5f920649f425d0cfc47c780b36ed70f23cbe1299 Reviewed-on: https://pdfium-review.googlesource.com/24191 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-30Use anonymous namespace in gdiplus code.Lei Zhang
Fix some nits as well. Change-Id: Ia52f4550c39d8072004679d764243ca9a9f7db0d Reviewed-on: https://pdfium-review.googlesource.com/24190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-30Cleanup some SDK codeDan Sinclair
This CL cleans up nits in some SDK code. Change-Id: Id8dc5face65230e607119a65c821fcde01483ad2 Reviewed-on: https://pdfium-review.googlesource.com/24610 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Revert "Revert "Use UnownedPtr instead of T* in MaybeOwned.""Tom Sepez
This reverts commit 77d8ed02c7e97471ceccee5abbabeb2fdea413c7. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Use UnownedPtr instead of T* in MaybeOwned." > > This reverts commit e563e8352139e4852a955e319023b09f2844aee9. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Use UnownedPtr instead of T* in MaybeOwned. > > > > Always check the liftime in the unowned case. Doing so unearthed > > the following issues: > > > > Transient lifetime issue in jbig2_image when doing realloc(). > > Stale (but unused) dictionary pointer in CPDF_Image. > > Destruction order in error branch in cpdf_dibsource.cpp > > > > Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f > > Reviewed-on: https://pdfium-review.googlesource.com/24552 > > Commit-Queue: Tom Sepez <tsepez@chromium.org> > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org > > Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/24670 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org Change-Id: I0ccbbeab8be6cadc9b3a5bfefe2aca733654342f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/24671 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Revert "Use UnownedPtr instead of T* in MaybeOwned."Tom Sepez
This reverts commit e563e8352139e4852a955e319023b09f2844aee9. Reason for revert: <INSERT REASONING HERE> Original change's description: > Use UnownedPtr instead of T* in MaybeOwned. > > Always check the liftime in the unowned case. Doing so unearthed > the following issues: > > Transient lifetime issue in jbig2_image when doing realloc(). > Stale (but unused) dictionary pointer in CPDF_Image. > Destruction order in error branch in cpdf_dibsource.cpp > > Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f > Reviewed-on: https://pdfium-review.googlesource.com/24552 > Commit-Queue: Tom Sepez <tsepez@chromium.org> > Reviewed-by: dsinclair <dsinclair@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/24670 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Use UnownedPtr instead of T* in MaybeOwned.Tom Sepez
Always check the liftime in the unowned case. Doing so unearthed the following issues: Transient lifetime issue in jbig2_image when doing realloc(). Stale (but unused) dictionary pointer in CPDF_Image. Destruction order in error branch in cpdf_dibsource.cpp Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f Reviewed-on: https://pdfium-review.googlesource.com/24552 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-30Cleanup some CPDFSDK_Widget XFA code.Dan Sinclair
This CL removes unused Synchronization methods and makes methods private which are not used externally. Change-Id: Icd7106e20adc957b7ced45d8fc5014d84ac8a154 Reviewed-on: https://pdfium-review.googlesource.com/24590 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-30Combine more combo and list codeDan Sinclair
This CL combines more code where the loops for combo and list were almost identical. Change-Id: Id2ab9e2cb093e78d6922813ff18d7c6736032a03 Reviewed-on: https://pdfium-review.googlesource.com/24553 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>