Age | Commit message (Collapse) | Author |
|
Avoid casting willy-nill over uint8_t*s, since there's at
least one place where the wrong cast could be applied.
Use std::vector<> as well.
Use ByteRange struct to avoid the seg[i * 2 + 1] anti-pattern.
Change-Id: I9278ccc3a545b2640f0daf101a0c8b1d5c5564f8
Reviewed-on: https://pdfium-review.googlesource.com/5012
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up a bunch of nits and improves ownership in the CStretchEngine
class.
Change-Id: I6527f29c50dab329ef58d0724cd24b94fca50ee6
Reviewed-on: https://pdfium-review.googlesource.com/4970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:667
Change-Id: I811571c334ff28162905a65781ca14f03caf2966
Reviewed-on: https://pdfium-review.googlesource.com/4910
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If90483a8fee2e3a5cd90e7fe4600ff98b2703e5d
Reviewed-on: https://pdfium-review.googlesource.com/5010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use much longer descriptive identifiers while at it.
Pack a little tighter while at it, too.
Change-Id: I123025f6433a627b5e00ee225efa7dc843b07913
Reviewed-on: https://pdfium-review.googlesource.com/5011
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:666683
Change-Id: I1c633d82e9ef75dd99ef032b4fc46fe8d3651cd1
Reviewed-on: https://pdfium-review.googlesource.com/5050
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove IFX_Pause parameters which are passed but not used.
Change-Id: I51a491c7f9a429676d114a387390fac3ae65e187
Reviewed-on: https://pdfium-review.googlesource.com/4950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Using a ByteBuffer and an array of uint8_t's isn't how one
would represent an array of structured data. Packing uint16_t's
into a uint32_t via / and % isn't ideal, either.
Bug:
Change-Id: Ib09ae2659ba2f027724546bb7aef99bdfd2dea25
Reviewed-on: https://pdfium-review.googlesource.com/4951
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
- FXSYS_toDecimalDigit() becomes FXSYS_DecimalCharToInt().
- FXSYS_toHexDigit() becomes FXSYS_HexCharToInt().
Change-Id: If4683e8f85f05124b92ff075056cbc295442087d
Reviewed-on: https://pdfium-review.googlesource.com/4930
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Draw vertical 1D barcodes as segments of lines, instead of as individual
pixels.
Change-Id: Ic260118660994514ce9023aacf13b16adfc8d362
Reviewed-on: https://pdfium-review.googlesource.com/4595
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Add a comment to clarify and remove some unneeded checks.
Change-Id: I8b0492548b245abc45e161085047c9f36d6c8e2b
Reviewed-on: https://pdfium-review.googlesource.com/4871
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I5d452ea907f4d243645ddae3512776096a827522
Reviewed-on: https://pdfium-review.googlesource.com/4872
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The IFX_Pause param is stored but never used. Remove.
Change-Id: I9e5298fc05c6d408873b7bee307a76dcf3d2d4da
Reviewed-on: https://pdfium-review.googlesource.com/4931
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also give an example out directory name and fix a typo.
Change-Id: I2d7532ea8c5fcdbd3502fbafcc07fb59dfafe81c
Reviewed-on: https://pdfium-review.googlesource.com/4878
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The value 1u << (l_pdx + l_level_no) is only used to calculate a minimum,
so skip it when the shift doesn't even fit unsigned integer. Also use the uint
min version since all values being considered are unsigned anyways.
Bug: chromium:666892
Change-Id: I79c6e52022aa894033c5cdabec29c4b8313e293b
Reviewed-on: https://pdfium-review.googlesource.com/4891
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Move StartRender into the constructor, remove StopRender as it will be
handled by the destructor. Remove RenderOptions as they are always set
the same way.
Change-Id: Iddbd6849199cbe255a5e1694164de5556a34f57c
Reviewed-on: https://pdfium-review.googlesource.com/4876
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the CFX_CharMap class and moves the two static methods
into the files in which they're used.
Change-Id: I8ff7cbfd7f1ef3970e39c77ffa3439099f7fec02
Reviewed-on: https://pdfium-review.googlesource.com/4873
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It's only instantiated in one place, and then nothing is ever
put into the map.
Change-Id: I8ebee324e0ec63c139309275c8de115d38063dc6
Reviewed-on: https://pdfium-review.googlesource.com/4877
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Remove more IFX_Pause parameters which are not used.
Change-Id: I9d10bb6b28d6d4d94ec3c4241b1c5a8a0709264c
Reviewed-on: https://pdfium-review.googlesource.com/4875
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up more IFX_Pause parameters which are always null.
Change-Id: Ia48600f06216db64a2db8e6e97222a91bd4ba149
Reviewed-on: https://pdfium-review.googlesource.com/4890
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl removes IFX_Pause parameters which are always null.
Change-Id: I6d36e52380a8f688c5e20f5e19c671f3bcc12868
Reviewed-on: https://pdfium-review.googlesource.com/4874
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL does more cleanup in CFX_ScanlineCompositor:
- Use private initization methods instead of passing member refs to namespace.
- Own the m_pSrcPalette properly by getting rid of the raw pointer.
- Remove members that are unused.
- Fix some nits.
Change-Id: I2447032f8f92614dc026f62bd0cdcd2204ab37de
Reviewed-on: https://pdfium-review.googlesource.com/4851
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Not a good practice even with correct bounds checks.
Same idea for fpdf_edit_create.cpp
Change-Id: I90b869ae4a07eb60d59997b9c5afc14830efc076
Reviewed-on: https://pdfium-review.googlesource.com/4830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
No code needs this execpt one file.
Change-Id: Ibceb33259f5a3635de36a272ebd49ef572004cbc
Reviewed-on: https://pdfium-review.googlesource.com/4832
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I612d9eaa47f6e4b023a49ab9120372de3d73cdc7
Reviewed-on: https://pdfium-review.googlesource.com/4831
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add a unit test too.
Change-Id: I33bf1aea85aff3de50021462095b76edd4017f97
Reviewed-on: https://pdfium-review.googlesource.com/4870
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Icc6b62f92d1a82ec60d1dd463d93376088017827
Reviewed-on: https://pdfium-review.googlesource.com/4792
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic31d9cda5e919a754162e14e69cb63671a3fe8b9
Reviewed-on: https://pdfium-review.googlesource.com/4794
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL prevents arbitrary position setting which may cause integer overflows.
In the bug in question, the PDF says the xrefs are located in a huge position.
This then causes problems when calling CPDF_SyntaxParser methods.
Bug: chromium:603545
Change-Id: I5f94c38f46a0217e9f12f1bf8b2f3bee3b03cb35
Reviewed-on: https://pdfium-review.googlesource.com/4813
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: If37147f513a87bafb3299a493393a6bc44165dbe
Reviewed-on: https://pdfium-review.googlesource.com/4811
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL adds ToUnicode for CID fonts and adds a test to prove that using it
works as intended. The test uses a Linux font for Japanese characters, and
tests for other OS will be added in a followup.
The ToUnicode works by defining the PDF charcodes as equal to the glyph indices
and assuming that the freetype charcodes given by FXFT_Get_Next_Char are in
fact the unicode values.
Bug: pdfium:667
Change-Id: I419724b87c3936c730a05f771548ae4787a576eb
Reviewed-on: https://pdfium-review.googlesource.com/4810
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I2525684dd5662ef9cb95f63a68443faa97f4e25b
Reviewed-on: https://pdfium-review.googlesource.com/4812
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:686128
Change-Id: Iad3ebbfd304dc145af2e694818864c4d25ccf99a
Reviewed-on: https://pdfium-review.googlesource.com/4793
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Using vector<uint8_t> as a buffer.
Change-Id: I38a8a05e7ec1355980d17533a2c8336e733aa6f6
Reviewed-on: https://pdfium-review.googlesource.com/4791
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: 686128
Change-Id: Ie8d71d7c0b76abb3f39ea2ea5ce43c82994a047a
Reviewed-on: https://pdfium-review.googlesource.com/4750
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use std::vector<uint8_t> as buffer instead.
Change-Id: I710fe87f292b2c0f838410e9c7ff615c27c589a6
Reviewed-on: https://pdfium-review.googlesource.com/4790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This follows Chromium's FreeType DEPS roll. Potentially addresses Clang
on Windows LLP64 build failure.
Roll testing corpus to 5379e0a with updated expectations.
BUG=pdfium:705
Change-Id: Ie494b68a52f953436accf8fd1961244f70a92cab
Reviewed-on: https://pdfium-review.googlesource.com/4632
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The input wchar_t array is not NUL-terminated.
BUG=chromium:716706
Change-Id: I0a89324fa46a56a39cc3331fcdd1c26b1550828b
Reviewed-on: https://pdfium-review.googlesource.com/4631
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BarcodeTest renders to bitmaps verifies their checksums.
Add some commonly used checksumming code to testing/test_support.h, and
use it in tests that have duplicate code.
Change-Id: I4a440674ff1084685b5d89576d967333da458a8a
Reviewed-on: https://pdfium-review.googlesource.com/4618
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
There is already a method to add text from standard font, this CL adds
an option to add text using a loaded font. The font set into a text object
is ref counted and may be released, so call LoadFont on this new text obj,
and add a method to close the font. This CL also improves the SetText method
so that it now uses a WideString, in preparation for CID fonts with non-Latin
characters.
Bug: pdfium:667
Change-Id: I6829d702357d2a898a12f5297e4fd2ec993a9891
Reviewed-on: https://pdfium-review.googlesource.com/4770
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
There are two APIs to V8 from pdfium: FXJS and FXJSE (for XFA).
Previously, we put tags in internal fields for FXJS's objects.
Now do the same for FXJSE.
Bug: 713998
Change-Id: Ife4f616df3768db566b996dedc1da104f8d3fb93
Reviewed-on: https://pdfium-review.googlesource.com/4475
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I7d2d731b8b18d315b5587e1d0d9737c08cbcdead
Reviewed-on: https://pdfium-review.googlesource.com/4710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I0e3f4bd33e66fd48db8371a5cc2f8db964720d08
Reviewed-on: https://pdfium-review.googlesource.com/4731
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove some dead code along the way.
Move some getters to headers and make const.
Change-Id: I14280c247b0cfeff8ad7f606302bc8bba1960f1e
Reviewed-on: https://pdfium-review.googlesource.com/4730
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4adbeafa7ecfd509abca08d97be132fd709e1261
Reviewed-on: https://pdfium-review.googlesource.com/4691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Many of these are already unique_ptrs.
Change-Id: I3695d4ff5a8f7483ad994ac7657897fd55069cd5
Reviewed-on: https://pdfium-review.googlesource.com/4690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Only use code_end to finish the decoding. Remove ASSERT from DecodeString since
it may be triggered. The following if statement handles that case anyways.
Bug: pdfium:707
Change-Id: Id6ec3c66d0e43c46308b4c3416da6c482ceafc69
Reviewed-on: https://pdfium-review.googlesource.com/4670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I801f3cf11a27f91fa3e75518143f953050b2f607
Reviewed-on: https://pdfium-review.googlesource.com/4650
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Normalize rotations read from PDF documents. Make FPDFPage_GetRotation
always return a value 0 to 3 as specified in fpdf_edit.h instead of
returning the page rotation / 90 (page rotation may be negative for some
PDFs).
BUG=chromium:713197
Change-Id: Ie477803f7d298b777a3ace89b21cfda8b7f6808b
Reviewed-on: https://pdfium-review.googlesource.com/4532
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I0c33ec81ef9fd3ff7c22f33f5647a923aecd3e77
Reviewed-on: https://pdfium-review.googlesource.com/4594
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|