summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-12Roll testing/corpus/ e1005e0e7..6cd71979b (1 commit)Lei Zhang
https://pdfium.googlesource.com/pdfium_tests/+log/e1005e0e7857..6cd71979b56e $ git log e1005e0e7..6cd71979b --date=short --no-merges --format='%ad %ae %s' 2018-09-12 thestig Add more test PDFs to the corpus. Created with: roll-dep testing/corpus TBR=hnakashima@chromium.org BUG=chromium:880920,chromium:883026 Change-Id: I9298f3da42b6682c1aab7f0d43cc3a1e2d935573 Reviewed-on: https://pdfium-review.googlesource.com/42354 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-12Optimize CPDF_CMapParserRyan Harrison
In this parser, a vector of CodeRange values are built up during operations that need to be sync'd with the CPDF_CMap that is being initialized. In the existing implementation, the vector being built as a member var for the parser, and copying the values over to the cmap whenever there is a change. When profiling, this copy is where the code spends most of its time. The code has been rewritten to have the parser reference/modify the instance of the vector in the cmap instead of having its own copy. This removes all of the copies and significantly speeds things up. BUG=chromium:881678 Change-Id: Ib8e75962507ca3d3b1ed066fd1faa4fbb7141122 Reviewed-on: https://pdfium-review.googlesource.com/42350 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-12Avoid out of bound access in ClipAngledGradient().chromium/3551Lei Zhang
BUG=chromium:835667 Change-Id: I3b9fd04d26f1baa30d48f938616b187410134b5f Reviewed-on: https://pdfium-review.googlesource.com/42311 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-12Fix pdf_use_skia_paths build after commit 048d7f7c.Lei Zhang
There is missing build coverage, apparently. Change-Id: Ibaf3a8d3f478eca6ab683bdcf0d7a91eeddafde3 Reviewed-on: https://pdfium-review.googlesource.com/42290 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-12Set correct stream index when parsing is done in several steps.Henrique Nakashima
When parsing happens in several steps (in pages with > 100 page objects), the position is reset to 0 and the start pointer is advanced. This breaks the calculation of which stream an object belongs to. Passing in the base pointer separately from the start offset allows the correct position to be calculated and the correct stream to be identified. Change-Id: Ic0d5f59f437609158aa97b3c8a18dbd48cd3b0d4 Reviewed-on: https://pdfium-review.googlesource.com/42270 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-11Small optimizations for CBC_HighLevelEncoder::lookAheadTestchromium/3550Ryan Harrison
Currently ClusterFuzz is timing out when running cases that cause a large number of calls to this method. Looking at the cases, I believe these to be valid calls, so this CL attempts to lower the cost of making each individual call. Adds in pre-allocation of a vector that has a fixed size and uses a const-ref for passing in |msg| to avoid copying. BUG=chromium:881678 Change-Id: I61ec4dc96e79c84def5b10102cc58a96773ce07f Reviewed-on: https://pdfium-review.googlesource.com/42230 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-11Fix a regression in CJBig2_Context::HuffmanAssignCode().Lei Zhang
An assignment statement accidentally got removed in https://pdfium-review.googlesource.com/c/pdfium/+/31538. BUG=chromium:880920 Change-Id: Iaff20bd2484cd8bf6dc6a13cbf444cefbd605b25 Reviewed-on: https://pdfium-review.googlesource.com/42250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-11Do not copy data in DecodeAllScanlines().Lei Zhang
The copy will never be read. Change-Id: I129859ed7569e054e66f00314f8ecf20e2c67715 Reviewed-on: https://pdfium-review.googlesource.com/41854 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-11Make flate decode functions' buffer out parameter unique_ptrs.Lei Zhang
Change-Id: Idb14846e87a8287dd911b0a2f7a32146e86c2af7 Reviewed-on: https://pdfium-review.googlesource.com/41853 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-11Make RunLengthDecode()'s buffer out parameter a unique_ptr.Lei Zhang
Change-Id: I1dc99831a564e88035c317455411f1eba9aa41c4 Reviewed-on: https://pdfium-review.googlesource.com/41852 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-11Make HexDecode()'s buffer out parameter a unique_ptr.Lei Zhang
Do the same for A85Decode(). Change-Id: Ic6a0e5e8a63defa104e35e97eb9ce4223aac23a7 Reviewed-on: https://pdfium-review.googlesource.com/41851 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-10Remove check for clean branch from safetynet_job.py.chromium/3549Henrique Nakashima
Branches can be dirty when a library sync'ed with gclient sync is removed from DEPS and from .gitignore. The library will be removed by "gclient sync --force". Change-Id: I19fa4a3f13989edb41cd671fd412cc67e67819eb Reviewed-on: https://pdfium-review.googlesource.com/42211 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-10Save and reload document in RemoveMarkedObjectsPrime test.Henrique Nakashima
Change-Id: I3a09188e5d63906c92718ae7568659d2f3ec75a5 Reviewed-on: https://pdfium-review.googlesource.com/42210 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-07Force gclient sync in safetynet_compare.py.chromium/3548chromium/3547chromium/3546Henrique Nakashima
This overwrites deps that are dirty, fixing an issue with deps that are removed in the "after" branch but not in the "before" branch. Change-Id: I1c905dc46522455ad160a6fd57fbab979c42162e Reviewed-on: https://pdfium-review.googlesource.com/42191 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-07Revert "Discard deps that are not sync'ed anymore in safetynet_compare.py."Henrique Nakashima
This reverts commit aaff8f8b902ac3058b44b0f11a236df606082383. Reason for revert: does not fix the problem, I'll fix in another way Original change's description: > Discard deps that are not sync'ed anymore in safetynet_compare.py. > > The job is currently blocked by the tools/gyp directory, which is being > downloaded in the "before" branch, but is not ignored anymore in the > "after" branch, making it an uncommited change. > > Change-Id: I9aca33e2046fbbe2626431febcbbdbebe1937f3b > Reviewed-on: https://pdfium-review.googlesource.com/42110 > Reviewed-by: Ryan Harrison <rharrison@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: I840004d0d9c8d83340fdd0b4d701859cc628f9e6 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/42190 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-06Rename CFX_GifContext::ReadData() to ReadAllOrNone()Tom Sepez
The whole point of this wrapper method is to disallow partial reads, so name it accordingly. No functional change. Change-Id: Ia2e7ee756192615f399369d5b077b836438befb2 Reviewed-on: https://pdfium-review.googlesource.com/42150 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-06Discard deps that are not sync'ed anymore in safetynet_compare.py.chromium/3545Henrique Nakashima
The job is currently blocked by the tools/gyp directory, which is being downloaded in the "before" branch, but is not ignored anymore in the "after" branch, making it an uncommited change. Change-Id: I9aca33e2046fbbe2626431febcbbdbebe1937f3b Reviewed-on: https://pdfium-review.googlesource.com/42110 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-06Fix integer overflow in LoadCryptInfo.Henrique Nakashima
Bug: 847283 Change-Id: I7951103a5a425407b5375460a5556e8765430740 Reviewed-on: https://pdfium-review.googlesource.com/42090 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-05Roll third_party/freetype/src/ 2c8e6279a..f8af8fba7 (34 commits)chromium/3544Nicolas Pena
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/2c8e6279a7bf..f8af8fba78ac $ git log 2c8e6279a..f8af8fba7 --date=short --no-merges --format='%ad %ae %s' 2018-09-05 wl Synchronize `ftdebug.c' files. 2018-09-05 wl Synchronize `ftconfig' files. 2018-09-05 ramakrishnan.nikhil * docs/DOCGUIDE: Minor. 2018-09-05 ramakrishnan.nikhil Add documentation guidelines file. 2018-09-04 wl * devel/ftoption.h: Synchronize with master `ftoption.h'. 2018-09-04 wl Typo (#54618). 2018-09-04 wl More '...' vs. `...` fixes in API documentation. 2018-09-04 wl Make `/****...' comments in public headers uniformly end on column 77. 2018-09-03 apodtele * docs/DEBUG: s/trace_//. 2018-09-03 ramakrishnan.nikhil [docwriter] Don't break code snippets accross lines. 2018-09-03 wl include/freettype/config:*.*: Convert comments to Markdown syntax. 2018-09-03 wl */*: s/PSNames/psnames/. 2018-09-03 wl [sfnt] Fix heap buffer overflow in CPAL handling. 2018-09-01 wl Remove `FT_Outline_{New,Done}_Internal'. 2018-08-31 apodtele * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format. 2018-08-31 prince.cherusker [errors] Refine the macro logic surrounding `FT_Error_String'. 2018-08-31 wl Whitespace. 2018-08-31 wl * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls. 2018-08-31 wl * src/base/ftdebug.c (FT_Throw): Reduce chattiness. 2018-08-31 wl Minor comments. 2018-08-31 wl Whitespace. 2018-08-31 wl Add link to OpenType's composite glyph description. 2018-08-31 wl * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization. 2018-08-30 apodtele Consolidate bitmap presetting and size assessment. 2018-08-30 apodtele * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono. 2018-08-30 prince.cherusker [errors] Introduce a macro to control `FT_Error_String'. 2018-08-30 prince.cherusker [errors] Introduce `FT_Error_String'. 2018-08-30 wl [autofit] Trace `before' and `after' edges of strong points. 2018-08-30 wl Minor. 2018-08-30 apodtele [base] Overflow-resistant bitmap presetting. 2018-08-29 wl Doc fix. 2018-08-29 prince.cherusker Fix numeric overflows. 2018-08-29 wl ftoption.h: s/precendence/precedence/ in documentation (#54586). 2018-08-29 wl [cff] Fix handling of `roll' op in old engine. Created with: roll-dep third_party/freetype/src R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org Bug: pdfium:1145 Change-Id: Ia24f04cd28e050bd2879f0d7a1edfa5096dc57bd Reviewed-on: https://pdfium-review.googlesource.com/42050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-09-05Update libpng from 1.6.22 -> 1.6.34Ryan Harrison
Updates third_party/libpng16 to Chromium's third_party/libpng @ a0e5c6a798a45a0dca175e2774ae0edc6aafc696 and applies PDFium specific patches. Originally landed as https://pdfium-review.googlesource.com/41910, but reverted. Bug=chromium:880322 Change-Id: Ib8249cb156135d028c02f67f9559bdd8695c04f5 Reviewed-on: https://pdfium-review.googlesource.com/42030 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-09-04Revert "Update libpng from 1.6.22 -> 1.6.34"chromium/3543Lei Zhang
This reverts commit 6b2e2f0ec7c5f629c5270d14c2339197af7392d8. Reason for revert: Broke Chromium integration. Original change's description: > Update libpng from 1.6.22 -> 1.6.34 > > Updates third_party/libpng16 to Chromium's third_party/libpng @ > e87a02987101e2dbe319a4aba6b52470f7624b4a and applies PDFium specific > patches. > > BUG=chromium:880322 > > Change-Id: I6724f55099c70a79da6d6e4863b9c6c9157ec571 > Reviewed-on: https://pdfium-review.googlesource.com/41910 > Reviewed-by: Lei Zhang <thestig@chromium.org> > Commit-Queue: Ryan Harrison <rharrison@chromium.org> TBR=thestig@chromium.org,rharrison@chromium.org Change-Id: I2fd1f78e5d07ca983b2430bf078544185292ee1d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:880322 Reviewed-on: https://pdfium-review.googlesource.com/41970 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-04Consolidate some common code in ccoded_progressivedecoder.Tom Sepez
Small consolidation before trying to fix a memory issue. Unfortunately, this involves converting a switch -> ifs, since we no longer dispatch exactly the same. Change-Id: I7ef61db98cdfbbc983adf21e7b3fe4ef1d2ce869 Reviewed-on: https://pdfium-review.googlesource.com/41830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-04Fix some more span/memcpy interactions.Tom Sepez
Use the preferred idiom of creating a subspan, which makes the proper checks prior to the copy. Change-Id: Ia7f25b5760dea5707df66cf421195b23a1ce0ad0 Reviewed-on: https://pdfium-review.googlesource.com/41911 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-04Avoid CHECK in fpdf_parser_decode.cpp (memcpy empty span)Tom Sepez
Given a span of size N, memcpy(dest, &span[N], 0) ought to be a no-op, but since we compute span[N] before checking for zero length, we hit an assert. The correct idiom should be to create a sub-span, which allows specifying N, but only when the size is 0. Bug: 879910 Change-Id: Ic6f368109a5c2f1e13a5f638c6a233769e2ad41b Reviewed-on: https://pdfium-review.googlesource.com/41930 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-04Update libpng from 1.6.22 -> 1.6.34Ryan Harrison
Updates third_party/libpng16 to Chromium's third_party/libpng @ e87a02987101e2dbe319a4aba6b52470f7624b4a and applies PDFium specific patches. BUG=chromium:880322 Change-Id: I6724f55099c70a79da6d6e4863b9c6c9157ec571 Reviewed-on: https://pdfium-review.googlesource.com/41910 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-09-04Remove unneeded fpdf_parser_decode.h #includes.Lei Zhang
Change-Id: I2c52828c25b4941669503328517c12a0a1dd770e Reviewed-on: https://pdfium-review.googlesource.com/41850 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-31Remove avail_buf out argument from GetAvailInput() methods.chromium/3542chromium/3541chromium/3540chromium/3539Tom Sepez
It's always passed as nullptr. It's a good thing, too, since it looks like some of the implementations are returning a wrong pointer. Add some missing |const|s. Change-Id: I768048fdfe4cdd1dc838fee26fec18e024e39920 Reviewed-on: https://pdfium-review.googlesource.com/41810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-31Simplify radial shading.Henrique Nakashima
Change-Id: I3b6a386cf376a418ad64514313c791437ea54cf6 Reviewed-on: https://pdfium-review.googlesource.com/41610 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-31Use more UnownedPtrs in CFXJSE_Engine.Lei Zhang
Change-Id: If577500905f5bc5bb631718e9c87aa03ee6bee5a Reviewed-on: https://pdfium-review.googlesource.com/41571 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-31Roll third_party/freetype/src/ 96b5e5009..2c8e6279a7b (38 commits)Nicolas Pena
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/96b5e500909c..2c8e6279a7b $ git log 96b5e5009..2c8e6279a7b --date=short --no-merges --format='%ad %ae %s' 2018-08-28 wl Minor doc fix. 2018-08-26 wl * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values. 2018-08-26 wl ChangeLog*: s/\t/ /. 2018-08-26 ramakrishnan.nikhil * configure: Copy assets required by docwriter. 2018-08-26 wl * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow. 2018-08-26 wl Minor tracing adjustments. 2018-08-26 wl [truetype] Avoid nested frames. 2018-08-26 wl Various minor clean-ups. 2018-08-25 wl Add missing ChangeLog entry for the last four commits. 2018-08-25 ramakrishnan.nikhil * builds/*/*: Prepare build system for docwriter. 2018-08-25 ramakrishnan.nikhil * src/tools/docmaker: Remove `docmaker'. 2018-08-25 ramakrishnan.nikhil * docs/reference: Add resources for `docwriter'. 2018-08-24 ramakrishnan.nikhil * include/*.*: Convert comments to markdown. 2018-08-23 wl Add macros for handling over-/underflowing `FT_Int64' values. 2018-08-23 wl ftbitmap.h: Improve documentation. 2018-08-22 wl [truetype] Improve legibility of `glyf' parsing. 2018-08-22 wl Minor formatting and documentation fixes. 2018-08-21 wl * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check. 2018-08-19 wl Update `CHANGES' file. 2018-08-18 wl [psaux] Avoid slow PS font parsing in case of error. 2018-08-18 wl [cff] Fix heap buffer overflow in old engine. 2018-08-16 yangx92 * builds/mac/ftmac.c (parse_fond): Fix buffer overrun. 2018-08-16 wl * builds/*/ftsystem.c (FT_COMPONENT): Updated also. 2018-08-15 apodtele Revert BDF copyright years. 2018-08-15 apodtele Ouch. BDF copyright year. 2018-08-15 apodtele [bdf] Don't track duplicate encodings. 2018-08-15 wl Don't use `trace_' prefix for FT_COMPONENT arguments. 2018-08-14 wl Use formatting string in FT_TRACEX calls for non-simple arguments. 2018-08-14 apodtele [bdf] Remove unused fields. 2018-08-14 wl [cff] Fix another segv in old engine. 2018-08-14 wl [cff] Fix missing error handling. 2018-08-13 apodtele [bdf] Remove unused overflow storage. 2018-08-14 wl [cff] Fix segv. 2018-08-13 apodtele [bdf] Use unsigned types. 2018-08-13 wl * src/type42/t42parse.c (t42_parse_sfnts): One more format check. 2018-08-12 prince.cherusker Remove deprecated constant in documentation. 2018-08-11 wl * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow. 2018-08-10 apodtele * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs. Created with: roll-dep third_party/freetype/src R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org Bug: pdfium:1142 Change-Id: If608007688939c06a0734c71457c137419911ad3 Reviewed-on: https://pdfium-review.googlesource.com/41790 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-08-31Test for radial shading when start is a point on border of end circle.Henrique Nakashima
Bug: pdfium:1140 Change-Id: I306b7be5ea2732742e90e416f58c11bcaf8cbaf6 Reviewed-on: https://pdfium-review.googlesource.com/41770 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-31Roll third_party/icu/ e4194dc7b..c56c67199 (8 commits)Lei Zhang
https://chromium.googlesource.com/chromium/deps/icu.git/+log/e4194dc7bbb3..c56c67199890 Created with: roll-dep third_party/icu TBR=rharrison@chromium.org Change-Id: I31266b9546d1e6b760e8dddec8cbc9c9647d29b3 Reviewed-on: https://pdfium-review.googlesource.com/41750 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-31Fix radial shading when start circle is a point in the center of end circle.Henrique Nakashima
The bug also requires end circle to be tiny (radius of < 0.01). Bug: pdfium:1140 Change-Id: I2b355f44f0383334b8988fe41f82cb3f587e9909 Reviewed-on: https://pdfium-review.googlesource.com/41672 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-31Stop checking out GYP.Lei Zhang
BUG=pdfium:559 Change-Id: I0e837281e0949b778fca73680b2257e49678c817 Reviewed-on: https://pdfium-review.googlesource.com/41730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-30Add unit test for AutoRestorer<> on smart pointer types.Tom Sepez
Test UnownedPtr<> and RetainPtr<>. We cannot operate against std::unique_ptr<> because we need a copyable type. Add test for self-reassignment on going out of scope. Move one test helper class to testing/ so it can be shared among unit tests. Allow it to recognize if it ever gets "destroyed", otherwise we can't be sure Retain/Release applied in the correct order. Change-Id: I13056094c70079f7283cbc7600948f81a64874b4 Reviewed-on: https://pdfium-review.googlesource.com/41690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-30Use pdfium::span<> arg in A85 and RLE encoder methodsTom Sepez
Change-Id: Iff900bc3e1cd9c9dd6b023230c1feba78759581c Reviewed-on: https://pdfium-review.googlesource.com/41710 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-30Use span<> in CFX_FontMgrTom Sepez
Change-Id: I3f811b20399efac1b511e75d950699eee7192c65 Reviewed-on: https://pdfium-review.googlesource.com/41650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-30Roll v8 to 19afaa14Lei Zhang
https://chromium.googlesource.com/v8/v8/+log/ff6b34b4..19afaa14 This updates V8 to version 7.0.292. In order to do this, build and buildtools must be rolled at the same time: https://chromium.googlesource.com/chromium/src/build/+log/7ac29343..4755315a https://chromium.googlesource.com/chromium/buildtools.git/+log/4ae75c1f..2dff9c9c TBR=rharrison@chromium.org Change-Id: Iaaf2023df8758bfb3cd2eef5d0a4f024a5d7c178 Reviewed-on: https://pdfium-review.googlesource.com/41270 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-30Stop using deprecated V8 APIs in CFXJSE_Value.Lei Zhang
Change-Id: I11772d2826ca23e8a07fef43a4fa50ead83292be Reviewed-on: https://pdfium-review.googlesource.com/41430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-30Add check on CGATS memory allocation in littlecms.Lei Zhang
This pull in the relevant bits from upstream commit 768f70ca. BUG=chromium:872189 Change-Id: I6a970a00ff322768cddc2825e4b6e3e12400d43d Reviewed-on: https://pdfium-review.googlesource.com/41671 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-30Fix lifetime issue in CCodec_ProgressiveDecoder.Tom Sepez
The associated bug is caused by failure to clean up context before returing at line 740 or so. But cleanups are fragile, so instead do not move context out of a local until success. This in turn means passing the local to one helper rather that using the stored value and confirming this is the only helper method invoked during the time in which the context is not yet stored. Bug: 879025 Change-Id: I1acb438edc28f7f4dd8acccc2461fe3a5ea7f5c8 Reviewed-on: https://pdfium-review.googlesource.com/41670 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-30Stop using deprecated V8 APIs in CFXJSE_Context.Lei Zhang
Change-Id: Ib93972d3162c37995dfc215d1043e0e1b4220610 Reviewed-on: https://pdfium-review.googlesource.com/41410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-29Use pdfium::span<>/UnownedPtr in CFX_Font.Tom Sepez
Move some platform-specific ifdefs so the come last in each section as it is easier to read, perhaps. Change-Id: Ic1c2652c46ecebc63b66213735ed6d94737a7f32 Reviewed-on: https://pdfium-review.googlesource.com/41630 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-29Stop using deprecated V8 APIs in CFXJSE_Class.Lei Zhang
Change-Id: I15b191114a0c464264deccf60f3ae5da287e5a0b Reviewed-on: https://pdfium-review.googlesource.com/41390 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-29Change explicit suppression of warning 4267 to a config based suppression.Will Harris
Remove two unneeded suppressions from pdfium's skia, as these are already covered by the //build/config/compiler:no_chromium_code config. BUG=588506 Change-Id: I347f2c98c6fd13679660fb25df2d2141e9b56e55 Reviewed-on: https://pdfium-review.googlesource.com/41611 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-29Stop using deprecated V8 APIs in CJS_Runtime.Lei Zhang
Also for CFXJSE_Arguments. Change-Id: I15bfa4e09675bb48aecfa0c55539bf8dc50675e6 Reviewed-on: https://pdfium-review.googlesource.com/41370 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-29Fix radial shading when center of start point is on the border of an end circle.Henrique Nakashima
Radial shading is done between two circles with their own centers and radii. When one has a radius of 0 and is located on or very close to the border of the other circle, a should be 0, but is not due to rounding errors unless the circles are aligned in x or y. Bug: pdfium:1140 Change-Id: Ief2efa91f3f16f7bed439aa471b258fa4d680acf Reviewed-on: https://pdfium-review.googlesource.com/41590 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-29Remove FPDFDOC_ prefix from non-public functionsTom Sepez
Second CL for naming consistency. Bug: pdfium:1141 Change-Id: Idf0a0da52abd68648ab709997e0523ee3240c247 Reviewed-on: https://pdfium-review.googlesource.com/41531 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-29Use pdfium::span<> in fpdf_parser_decode.h helper functions.Tom Sepez
Change-Id: Ib0a2bd21fe4304163cf9c080e07475e7c033c299 Reviewed-on: https://pdfium-review.googlesource.com/41570 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-29Stop using deprecated V8 APIs in CJS_GlobalArrays.Lei Zhang
Change-Id: I7ed3037d8d8862787ad7364eb5f55cd22eb879ad Reviewed-on: https://pdfium-review.googlesource.com/41357 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>