Age | Commit message (Collapse) | Author |
|
BUG=pdfium:1093
Change-Id: I05f32018841dfa8b1c4512fb6350fc2a2fe4c5e4
Reviewed-on: https://pdfium-review.googlesource.com/33250
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This checks in 2 identical looking PDFs. They both started out as
hello_world.pdf. They were then hand edited in different ways that
results in the same final rendering output.
Change-Id: Ib3b634a5119c0f2e4beb36844c3f2b8d58ab8a21
Reviewed-on: https://pdfium-review.googlesource.com/33232
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Per discussion for the "CS" entry in the PDF 1.7 spec table 7.13, several
types of colorspaces do not meet the requirements of this particular
colorspace entry. In terms of implementation, this avoids hitting a
NOTREACHED() in CPDF_PatternCS::GetRGB().
BUG=chromium:847346
Change-Id: If994a91cdcd84b8977196256ee6926e20c4b74aa
Reviewed-on: https://pdfium-review.googlesource.com/33210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added. This CL removes all remaining manual references
to exe_and_shlib_deps.
[1] https://chromium.googlesource.com/chromium/src.git/+/d7ed1f0a9c28c932fddc834ca5de44f28266c7f5
BUG=chromium:845700
R=thestig
Change-Id: I5708e7c662b24493d1216f9a802dfce3de5dbea6
Reviewed-on: https://pdfium-review.googlesource.com/33151
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Now that both are ref-counted, we can replace ifdef's with some
polymorphism.
Bug: pdfium:760
Change-Id: Ie22ea259c9af56fa569f0af268b8e7065789a3f2
Reviewed-on: https://pdfium-review.googlesource.com/32892
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL writes any JS exceptions to the console in XFA if running in
Debug mode. This makes it possible to see when an error happens in JS
execution.
Bug: pdfium:1097
Change-Id: Ida14050328c5e6e85ab2704bb5dddfec370dddf1
Reviewed-on: https://pdfium-review.googlesource.com/33154
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
We cache pages not by page number, which can bounce around as pages
are inserted or removed, but by page dictionary's object number.
Since the page may be created under one function and used under
another, we can't take the shortcut of not instantiating a render
cache nor not parsing the page.
Change-Id: I9a325cda8b3141153544ac53e78a51a44e6b411a
Reviewed-on: https://pdfium-review.googlesource.com/32830
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently the value passed in via the flag is ignored on Mac. This
implements the needed logic to use the given path instead of the
standard system font directories.
BUG=pdfium:1094
Change-Id: I2a0599ce8c784add75d36089dee5e4b5476c3d3d
Reviewed-on: https://pdfium-review.googlesource.com/33090
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
It was already possible to set the draw mode of a path object, this is
the other direction.
Change-Id: Id0ee98dd8dfe433edd0e4715fc009ad4d1625981
Reviewed-on: https://pdfium-review.googlesource.com/33010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
https://chromium.googlesource.com/chromium/src/build/+log/037f38ae..10a93c2c
https://chromium.googlesource.com/chromium/buildtools/+log/ab7b6a7b..893eb86b
https://chromium.googlesource.com/android_ndk/+log/e951c372..5cd86312
https://chromium.googlesource.com/chromium/src/tools/clang/+log/abe5e4f9..c893c7ee
https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+log/4f03e51f..8fbdf9f1
BUG=chromium:845700
R=thestig
Change-Id: I1496686af4336917f363297fb582b7f0483d3591
Reviewed-on: https://pdfium-review.googlesource.com/33231
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The callers always pass in a valid CFX_Matrix, so eliminate the
possibility of a nullptr.
Change-Id: Id7d8b731ed60d5f66517b50c56efeca343e897c4
Reviewed-on: https://pdfium-review.googlesource.com/33152
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL adds the necessary plumbing to propagate the change information
for a text widget from FWL out to JS and handle the returned value as
necessary.
Bug: pdfium:1066
Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc
Reviewed-on: https://pdfium-review.googlesource.com/33070
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
ArgbEncode() does the same thing.
Change-Id: Ibb05ed4aae720c0a5ba66771699c0d7e11230921
Reviewed-on: https://pdfium-review.googlesource.com/32230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is a manual revert of the CL at:
https://pdfium-review.googlesource.com/c/pdfium/+/32159
The only file manually changed was cpdf_renderstatus.cpp
Reason for revert: the bug below shows that sometimes the vector size
used is larger than the parameter given to CFX_FixedBufGrow. Thus, we
will revert, then add vectors using std::max unless it's clear from the
code that the code will never access indices outside.
Bug: chromium:847247
Change-Id: Iee54af023c8564824418a7d34a6385b0bc418ff0
Reviewed-on: https://pdfium-review.googlesource.com/33050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
GetObjectFor() and GetDirectObjectFor().
Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e
Reviewed-on: https://pdfium-review.googlesource.com/32991
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Always include a rect parameter. It is unused in the non-XFA case,
but there is no need for ifdefs.
Change-Id: If6229461d6b20ee8ea557a012f2dbf8ef9f6287e
Reviewed-on: https://pdfium-review.googlesource.com/32835
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Tidy some code encountered along the way in cpdfsdk_helpers.cpp
Remove one ifdef from xfa-only file.
Restore some option flag processing (probably wrong to remove).
Flip some #ifndef to #ifdef (#ifndef PDF_ENABLE_XFA is an
anti-pattern and should be treated with suspicion since XFA should
always be "additive").
Change-Id: I564a28401e20e6269c85ea610da8c96f8c8dd737
Reviewed-on: https://pdfium-review.googlesource.com/32834
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Abstract GetUserPermissions() differences via new virtual method.
Abstract GetPageCount() differences via existing virtual method.
Remove unused ReadHeader() form for non-xfa.
Remove unused FindSubstFontByUnicode() for xfa.
Remove unused FXFONT_EXACTMATCH
Change-Id: I0a3de01a9841db86fcbc96991d3fa2682393b9ad
Reviewed-on: https://pdfium-review.googlesource.com/32831
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Small step to reducing the differences between XFA and non-XFA. We
still use the RetainPtr pretty much as if it were an unique_ptr, in
that we're not yet caching pages and handing out multiple pointers
to the same page in the non-XFA case.
The one change is in page view cleanup, where we no longer need a
boolean and can take (sufficient) page ownership with a RetainPtr.
Tidy up some document.h -> page.h -> document.h circular inclusion
while we're at it.
NOTE: Wait for imminent branch to pass before landing. We'll want
this to bake a while.
Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34
Reviewed-on: https://pdfium-review.googlesource.com/32790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I5c900aa0547afef0c60de35422b4ee489daa6cfb
Reviewed-on: https://pdfium-review.googlesource.com/32913
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib5f4cdb9c7f9c33561028a85029649ba68f4a6e5
Reviewed-on: https://pdfium-review.googlesource.com/32912
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id37333ba61ad0d395055acffd75d4d8be5eb2b3e
Reviewed-on: https://pdfium-review.googlesource.com/32911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Move them out of testing/libfuzzer, to make it possible to pull
libfuzzer into that directory. Leave testing/libfuzzer/BUILD.gn there
for now as a transitional build file.
BUG=pdfium:1088
Change-Id: I4126d89dd3e075ac63477a4860e029c135866dbe
Reviewed-on: https://pdfium-review.googlesource.com/32896
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: Ia3e758bbe5c445c3856f5215e900e02a16b4d7d7
Reviewed-on: https://pdfium-review.googlesource.com/32910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It is not called anywhere.
Change-Id: Ic5af010300a20fdd3d05f55df481030a946bb8c4
Reviewed-on: https://pdfium-review.googlesource.com/32971
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
During encoding, the code is going to walk through every character in
m_msg and determine what values need to be added to m_codewords. The
ceiling on the number of characters being added to m_codewords is the
length of m_msg, so reserving enought space in advance. This prevents
thrash related to incrementing the string and thus resizing in a tight
loop.
BUG=chromium:846027
Change-Id: Icefd6955933f8068feeeee6243e430f60c50d747
Reviewed-on: https://pdfium-review.googlesource.com/32990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b
Reviewed-on: https://pdfium-review.googlesource.com/32187
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
When an xfa.event is sent it is possible to change the selStart, selEnd
and change values of the event. This should cause the value of newText
to be changed as needed.
This CL removes m_wsNewText from CXFA_EventParam and instead generates
the new text based on the previous text, the selection and the change.
Bug: 1066
Change-Id: I35d126fad9771c8980654a8af64d2b98989bff3f
Reviewed-on: https://pdfium-review.googlesource.com/32970
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds the missing cancleAction property from the xfa.event
object.
Bug: 1066
Change-Id: I7d38956e2985c1f6ac0eba6de090874f1f72003c
Reviewed-on: https://pdfium-review.googlesource.com/32950
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds bounds checking for the selStart and selEnd settings of the
event object. The selEnd is not allowed to be less then selStart. They
are also not allowed to be negative. This also clamps them to the length
of the prevText string.
Bug: 1066
Change-Id: Ifc9113c669c83a4a97655554affbbce30c2bfc64
Reviewed-on: https://pdfium-review.googlesource.com/32933
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
According to the XFA Spec only the cancelAction, selStart, selEnd and
change properties of xfa.event are editable. This CL adds checking to
early out if attempting to set any of the other properties.
Bug: 1066
Change-Id: Ie6129e1f65de7584f0b5f3072a1acf6e25d44a2c
Reviewed-on: https://pdfium-review.googlesource.com/32932
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL renames the pValue parameters to the CJX_EventPseudoModel
Property helpers. This makes it a little clearer that the thing we're
setting is _not_ pValue but wsValue.
Bug: 1066
Change-Id: I1f468659c4e241059da0bbe43c461be788cd62a0
Reviewed-on: https://pdfium-review.googlesource.com/32931
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL updates the CFXJSE_Engine code to access the defined properties
of a class if we fail to find the property in any other way. This fixes
up an issue where we were unable to read the 'change' property of the
CJX_EventPseudoModel because we could not find the 'change' property.
Bug: 1066
Change-Id: I4ad205bc527beeca1c3e24a36cdde0c21287d9fb
Reviewed-on: https://pdfium-review.googlesource.com/32930
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a bit of commented out code to CJX_LogPseudoModel to dump
any xfa.log.message() commands to the terminal. It's commented out as we
don't want it running normally but we can enable as needed.
Change-Id: Ia53759253391cbaa249a1801aa1541213020ad68
Reviewed-on: https://pdfium-review.googlesource.com/32915
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
CFX_BitStream::GetBits() got refactored recently, with an assert to not
read 0 bits. A fuzzer then discovered code that is trying to do that.
BUG=chromium:846394
Change-Id: Ib18b47200c82aab369109b5911540db724172690
Reviewed-on: https://pdfium-review.googlesource.com/32934
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up variables in CJBig2_Context. It moves some
declarations further, to when the variables are actually used. It also
caches huffman tables in a vector of unique_ptr.
Change-Id: Id3af96f9526b1000f681e4e2b174bba07b45ee55
Reviewed-on: https://pdfium-review.googlesource.com/32715
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The class modifies the tree, so stop pretending its const.
Change-Id: I1095239a728fc0999c84db37d5cb17f596b9c791
Reviewed-on: https://pdfium-review.googlesource.com/32185
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Most of them can be marked const. A couple are marked non-const because
eventually something inside gets modified.
Change-Id: I5415ca8d1efdac451cde340272436cd1e6ec433f
Reviewed-on: https://pdfium-review.googlesource.com/32184
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Replace it with CFX_BitStream.
Change-Id: Ib74657f888b8dec8b6fdad7b49e28d250991c590
Reviewed-on: https://pdfium-review.googlesource.com/32852
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icfb7c6933625436b9fcf6a9fdfd0e5f655108eca
Reviewed-on: https://pdfium-review.googlesource.com/32851
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I764196b9cc1d437313aac18ee9d5dbed642c7119
Reviewed-on: https://pdfium-review.googlesource.com/32850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL sets the text edit engine to skip the length check when doing an
insert if the engine is currently empty. This allows handling inserting
the formatted version of strings if they have a length longer then the
maximium length.
Bug: 1066
Change-Id: If9799334f889b8ae0f568f1f9d5457e2b504aa1d
Reviewed-on: https://pdfium-review.googlesource.com/32898
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Commit 86688dea moved some code out of a header, so now build targets
that used to only include the header need proper dependencies.
BUG=chromium:845771
Change-Id: I28603eea721b0ee19c2539ecf93fc3c22c3a8298
Reviewed-on: https://pdfium-review.googlesource.com/32895
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the pow10 definition inside the pdfium::skia namespace in
order to fix conflicts with the skia version of the same file. This
comes up due to the code coverage tools.
Bug: chromium:845505
Change-Id: Ief53a2bbd15cb9828be23417ff3442461347d146
Reviewed-on: https://pdfium-review.googlesource.com/32893
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also make destructors private for RetainPtr sub-classes, and add missing
destructors.
Change-Id: I451bf0aae2dae943b1f450d0aa4ca5124dc578fd
Reviewed-on: https://pdfium-review.googlesource.com/32853
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- Make parameter checking more consistent in a several places.
- Remove unnecessary parameter size checks.
- Get rid of new statements / FX_Free() calls.
Change-Id: I7bac8e678f590815a398a318cd62a2947e1dd973
Reviewed-on: https://pdfium-review.googlesource.com/32836
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix some nits in CPDF_ShadingPattern as well.
Change-Id: I6b4b73f99031733a113fe2ad1bdc1d1e565b7a7d
Reviewed-on: https://pdfium-review.googlesource.com/32738
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I5fda9b68309a8b1f0b1768c26a25c95d7dda8d3d
Reviewed-on: https://pdfium-review.googlesource.com/32745
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Commit 10e1f05a incorrectly removed a font weight sanitizing step in the
font substitution code.
BUG=chromium:820345
Change-Id: I876f65a5649270648616f561eaad17ee333b9a9e
Reviewed-on: https://pdfium-review.googlesource.com/32832
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|