summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-05Fix testing.cpp build with v8_use_external_startup_data=false.Lei Zhang
Also change the InitializeV8ForPDFium() for use with startup data to InitializeV8ForPDFiumWithStartupData(). Change-Id: I594c2bf9470b6549195b7361bb7fcb45def50c61 Reviewed-on: https://pdfium-review.googlesource.com/25371 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-02-05Use unique pointer in CFXJS_PerObjectData.Tom Sepez
Also use the actual type information, not void* and remove casts. Template function not required to wrap virtual dtors. Change-Id: I9397cae136c3c395a368a1ef0ce8162d9b586076 Reviewed-on: https://pdfium-review.googlesource.com/25290 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-05Fix some formcalc constant naming.Lei Zhang
Mark one constant as actually constant. Change-Id: Icf046dbd6751d07d6652ce24e4217a717a58b699 Reviewed-on: https://pdfium-review.googlesource.com/25310 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-05[v8-platform] Store the platform in a unique_ptrAndreas Haas
We want to change the signature of {CreateDefaultPlatform} in the V8 API to return a unique_ptr instead of a raw pointer to indicate that the caller owns the platform. With this change we prepare pdfium for this change. R=thestig@chromium.org Change-Id: I4a0a466dfc37b28387a91543623a7a481ca8035a Reviewed-on: https://pdfium-review.googlesource.com/18191 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-05Add FPDFAnnotationDeleter for use with std::unique_ptr.Lei Zhang
Use it in existing code where appropriate. BUG=chromium:808269 Change-Id: I55b67db05267f4f05a98c9bf8bbd43f6524cbc65 Reviewed-on: https://pdfium-review.googlesource.com/25210 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-02-05[XFA] dot_accessor may not provide a valid object.Dan Sinclair
If the object being accessed through the dot_accessor does not exist it's possible to receive a nullptr in ResolveObject. Instead of ASSERTing just return false and let the caller handle the failure. Bug: chromium::778904 Change-Id: I918c1c5dcb23b86082793c5037d58e0ab043559e Reviewed-on: https://pdfium-review.googlesource.com/25350 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-05Include time.h on wasm.chromium/3342chromium/3341Henrique Nakashima
Bug: chromium:804907 Change-Id: Id9b496f14134631d3308c073b8780bf18c2305c8 Reviewed-on: https://pdfium-review.googlesource.com/25270 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-02-05Move const arrays to CFXJS_Engine from CJS_V8Tom Sepez
CJS_V8 is shared by both the non-xfa and xfa-side JS engines, but the const arrays are only used by the non-xfa side. Change-Id: Ic5ed8238df1a14dde8a4463b2388b4a7a923e392 Reviewed-on: https://pdfium-review.googlesource.com/25250 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-02Teach the presubmit check to look for checkdeps in other places.chromium/3340chromium/3339chromium/3338Lei Zhang
When PDFium source is not part of a standalone checkout, uploading CLs fail because the presubmit check cannot find the checkdeps tool. Detect the common case where PDFium is in third_party/pdfium, and look in the embedder source tree for checkdeps. BUG=pdfium:999 Change-Id: I972282aef9e62f99dce282d556ca2e68de3acbb0 Reviewed-on: https://pdfium-review.googlesource.com/24910 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org>
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>