Age | Commit message (Collapse) | Author |
|
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>
|
|
BUG=chromium:716526
Change-Id: Idbe4624ab2193cee2931c69ed023dd2c1679d124
Reviewed-on: https://pdfium-review.googlesource.com/4615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Otherwise the destruction can stack overflow.
BUG=pdfium:716525
Change-Id: I415176a361a0fc2310d3671c1c0e804d11a98261
Reviewed-on: https://pdfium-review.googlesource.com/4613
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Limit recursion depth, just like in CountFieldsInternal().
BUG=chromium:716523
Change-Id: I70c052347a1d8fb9a4dbc065a1c9af55c02818f2
Reviewed-on: https://pdfium-review.googlesource.com/4612
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Same for CPDF_DocPageData.
Change-Id: I8f2f559123dbb2f3623d957e4074d5f9d191797f
Reviewed-on: https://pdfium-review.googlesource.com/4501
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Otherwise, the top byte will be unitialized. We later mask it off,
but MSAN isn't clever enough to realize this.
Bug: 716207
Change-Id: Ic4513bbaee6a47654392580d5f404195da4a6509
Reviewed-on: https://pdfium-review.googlesource.com/4591
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I13b43ceafc6a35bcc1e366546a4a408ea01fe4ab
Reviewed-on: https://pdfium-review.googlesource.com/4534
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I8a50ed680c1e101f855644fca8d282dd21470577
Reviewed-on: https://pdfium-review.googlesource.com/4533
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
See discussion at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/rdxOHKzQmRY
Change-Id: I1803ae97c39b592001835814e2f6674b2c7cb3ea
Reviewed-on: https://pdfium-review.googlesource.com/4531
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
If any of the values in the matrix used to initialize the
CFX_BilinearMatrix are close to INT_MAX then the numbers can overflow
when multipled causing undefined behaviour.
This Cl uses a pdfium::CheckedNumeric to handle the multiplications and
then assigns back to the int value if valid.
Bug: chromium:702041
Change-Id: Ia1895e2e39c0ac2bf099d45f97e33209cb50d134
Reviewed-on: https://pdfium-review.googlesource.com/4495
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It is always NULL.
Change-Id: Iebfb3bc645aebe05335f88d536164a55a7140539
Reviewed-on: https://pdfium-review.googlesource.com/4510
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The chain of destructors may attempt to use m_pDocPage
after it has been set to null by the unique_ptr destructor.
Verify it is still present before using it from any code
that may be called from some other CPDF_ destructor.
Change-Id: I007160231d73feed85d90efc687d6da993653f96
Reviewed-on: https://pdfium-review.googlesource.com/4499
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Regressed at https://pdfium.googlesource.com/pdfium/+/7d4f6a89d7e2c5d13b7d630d6348950044a5465e
TBR=thestig@chromium.org
Change-Id: I25b8d6b4847090af18c9f36e4cea07a1eeb2a99a
Reviewed-on: https://pdfium-review.googlesource.com/4500
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ie50deca34dd3c122efb483ef210f96798abe9e4e
Reviewed-on: https://pdfium-review.googlesource.com/4498
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I656e8028001fadd7869a08593f10b0b8e25fe01c
Reviewed-on: https://pdfium-review.googlesource.com/4497
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
They are only implemented in one way, and the layering does not
required an interface here.
Change-Id: Id87591ca237fb66dbfc5aa62b4cc11c2464f5ffa
Reviewed-on: https://pdfium-review.googlesource.com/4496
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl adds some unit tests for the CFX_Matrix Reverse method.
Bug: chromium:702041
Change-Id: I9598d3eb48d6b86a3e192d313fe1091bd29a4701
Reviewed-on: https://pdfium-review.googlesource.com/4492
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl adds a simple comment to CFX_Matrix to record which positions in
the 3x3 matrix each of the letters denotes.
Change-Id: Ie733657e6072e2148406d43f06fbd883b34bf573
Reviewed-on: https://pdfium-review.googlesource.com/4490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I769d7f2c52b0a0db36be6145bfb626c126a58be9
Reviewed-on: https://pdfium-review.googlesource.com/4480
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Its contents are delcared in fx_coordinates.h
Remove unused GetIntersection().
Move FXSYS_round to fx_system.cpp.
Change-Id: I70749581d1321dd919e35fa2daab9591098f68e9
Reviewed-on: https://pdfium-review.googlesource.com/4479
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Prevent implicit construction of CFX_WideString from non-wchar_t
variables. Similarly prevent implicit construction of CFX_ByteString
from non-char variables.
Fix up CBC_OnedCodaBarWriter which tries to do the above, and simplify
code there using pdfium::ContainsValue(). Same for CPDF_FileSpec.
Change-Id: I3db7125a68ef3f64c2f235d38e974767cd083dc3
Reviewed-on: https://pdfium-review.googlesource.com/4478
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Iba1aa793567e69acc3cc1acbd5b9a9f531c80b7a
Reviewed-on: https://pdfium-review.googlesource.com/4453
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: 712725
Change-Id: I3384385176410964a87b12c2587f68247ea80cc9
Reviewed-on: https://pdfium-review.googlesource.com/4454
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
We must initialize our partition allocator before calling into
any test cases.
We can then remove the FPDF_Test class, which did the same thing.
Change-Id: I614480fa474b2032052857a02e94781f15a27a4e
Reviewed-on: https://pdfium-review.googlesource.com/4473
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Fix illegal leading underscore in class name while at it.
Change-Id: Idd138eb42f4a0676552aa02d7dda4c29d1877348
Reviewed-on: https://pdfium-review.googlesource.com/4438
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The colour values returned from the ColorSpace GetRBG methods may not
have set a value. This CL updates the CPDF_MeshStream to always
initialize the values to 0 so they can't be used uninitialized.
Bug: chromium:714074
Change-Id: Id2db5eabe31d2ff19f9330b2bc5c681680cf461d
Reviewed-on: https://pdfium-review.googlesource.com/4450
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Avoid a string duplication along the way.
Change-Id: I866c34ad1afb20b9578aeb7cabeb8a185674c884
Reviewed-on: https://pdfium-review.googlesource.com/4437
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ie34942e6e577dfa270417b17c59a51813f310d27
Reviewed-on: https://pdfium-review.googlesource.com/4436
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Avoid cleanup on every return path.
Change-Id: I6978adb6f31020d812ac88c5d46c703d1461d373
Reviewed-on: https://pdfium-review.googlesource.com/4435
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I0701c6e5a9c1789f5fe929778df0e2aa55d8bf00
Reviewed-on: https://pdfium-review.googlesource.com/4434
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Tidy a few nits along the way.
Change-Id: Ia330464e787dc584004896d2b09c228dc2d6bbc3
Reviewed-on: https://pdfium-review.googlesource.com/4433
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit fbd9ea1db2f1bb7fa006e7304a1202afc683c142.
Reason for revert: This check seems too strict
BUG=chromium:714187
Original change's description:
> Compare to epsilon instead of 0 in CFX_Matrix::SetReverse
>
> Since we are going to divide i by 0, it is better to compare it to epsilon
> and avoid wonkiness from division by something too close to 0.
>
> BUG=chromium:702041
>
> Change-Id: I8136d6063f8debd41cef37eaab7e4097b3f32f4b
> Reviewed-on: https://pdfium-review.googlesource.com/3090
> Commit-Queue: Nicolás Peña <npm@chromium.org>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=chromium:702041
Change-Id: Ia7d933fd3d8ce4957788341463866a04679d7f2b
Reviewed-on: https://pdfium-review.googlesource.com/4432
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Replace other one-off implementations as well.
Change-Id: I2878f3fae479c12b7de5234ee3a26477d602d14d
Reviewed-on: https://pdfium-review.googlesource.com/4398
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Convert IsXMLNameChar() to static method for easier testing
without namespace pollution.
Change-Id: I004557e74fde94d3582b0a2326e5e68b907b9690
Reviewed-on: https://pdfium-review.googlesource.com/4397
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic4e766d9417f9a9ece5f9e4269d0f96e1e91639b
Reviewed-on: https://pdfium-review.googlesource.com/4392
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 36c5b170e722362d4b5f7cb6e4e0099ed227a307.
Reason for revert: This appears to be blocking the roll into Chromium.
https://chromium-review.googlesource.com/c/476165/
Original change's description:
> core: allow building against system zlib
>
> In a way similar to the existing USE_SYSTEM_LIBJPEG. The default is of
> course still the DEPS-based zlib checkout.
>
> Change-Id: I649e75beb1a19c4cf7abda42fa10ebe5babfe946
> Reviewed-on: https://pdfium-review.googlesource.com/4070
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Lei Zhang <thestig@chromium.org>
>
TBR=thestig@chromium.org,dsinclair@chromium.org,npm@chromium.org,vmiklos@collabora.co.uk,pdfium-reviews@googlegroups.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I1ee6fb002f444ff9b559ce6a69679e63de7ff9cc
Reviewed-on: https://pdfium-review.googlesource.com/4393
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_MemoryStream is the only implementation of IFX_MemoryStream.
This CL removes the interfaces and uses CFX_MemoryStream directly.
Change-Id: I2f43fa39e82dafa7673517d214ae15fd2d0df331
Reviewed-on: https://pdfium-review.googlesource.com/4391
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl consolidates the stream code into fx_stream.
Change-Id: I22a250b4ca6e342592b81260d2a918ebab7f60a2
Reviewed-on: https://pdfium-review.googlesource.com/4373
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL cleans up the fx_extension file. The stream code was moved to
fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its
own file. Code shuffled from header to cpp file.
Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf
Reviewed-on: https://pdfium-review.googlesource.com/4371
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5b78fe4238a68bb6ba56aa76b53b315ef6f8574c
Reviewed-on: https://pdfium-review.googlesource.com/3730
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Added some public methods so that CPDF_FormField has no friends.
Change-Id: I179537e3c6ea64cedaca5365010c34c1ad702c40
Reviewed-on: https://pdfium-review.googlesource.com/4370
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The code is completely separated into CMYK vs RGB cases, so having two
separate private methods is better.
Change-Id: I67f885ee2f4393b722c6d6e770b230a5aa6b0cb1
Reviewed-on: https://pdfium-review.googlesource.com/4372
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
|
|
This Cl converts the Clone method of IFX_CharIter to return a
unique_ptr. The usages were all converting to a unique_ptr already.
Change-Id: I1ca5ddd03eca8f21d616efb2b92fb27899c43c23
Reviewed-on: https://pdfium-review.googlesource.com/4351
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Rename arrays to use code page names to make it clearer what they
represent.
Change-Id: Ia7d74353f6bae5fd7f030c05675664dafda03a7a
Reviewed-on: https://pdfium-review.googlesource.com/4350
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up the unused defines in fx_codepage.h. The
FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this
moves fx_codepage into core instead of xfa only. Static asserts are
added to verify the public/ charsets match the fx_codepage charsets.
Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96
Reviewed-on: https://pdfium-review.googlesource.com/4316
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL moves the XML parser from FDE into FXCRT and renames to CFX_
from CFDE_.
Change-Id: I21a9590bf74daf5517df630d7e7a5de89da99ea4
Reviewed-on: https://pdfium-review.googlesource.com/4312
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL moves the FGAS stream code into core/fxcrt and renames to
CFX_SeekableStreamProxy.
Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387
Reviewed-on: https://pdfium-review.googlesource.com/4311
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|