Age | Commit message (Collapse) | Author |
|
Change the underlying type for FX_STRSIZE to size_t from int. This
will make the value unsigned and thus all values in the range of the
type will be valid. This allows for the final remove of negative
length strings, but also introduces a some casting and functional
errors, since many parts of the code base assume that FX_STRSIZE is
int or another signed type. This also CL fixes these errors.
BUG=pdfium:828
Change-Id: I231dca59e96fc9330cbb099eecbdfc41fcf86f5b
Reviewed-on: https://pdfium-review.googlesource.com/11830
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
isDevice is currently false in tests and fuzzers and true in real
usage. This CL changes it all to true.
Change-Id: Idea14795d7f0bb70031e04e5c58e248de72fd39e
Reviewed-on: https://pdfium-review.googlesource.com/13130
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the fx_basic.h header and fixes up includes as needed.
Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040
Reviewed-on: https://pdfium-review.googlesource.com/12670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Given a point, if there is an annotation at the point, give if focus if
it is not focus already. If there is no annotation at the point, then
remove the focus from the focused annotation.
BUG=chromium:754594
Change-Id: Iec3070472bbbfbad9d86e517f25da560f82efd4e
Reviewed-on: https://pdfium-review.googlesource.com/12530
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_WideTextBuf to its own files and updates includes as
needed.
Change-Id: Ibe66ecf3e66f8f01dd8e9eaf6b467588be86ad4f
Reviewed-on: https://pdfium-review.googlesource.com/12413
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the CFX_BitStream code out of fx_basic and into
cfx_bitstream.
Bug: pdfium:867
Change-Id: I5b7e6190a7db1fe1d24feb6bd676035a5c73ee92
Reviewed-on: https://pdfium-review.googlesource.com/12350
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
ReplaceIndirectObjectIfHigherGeneration() deletes replaced objects, but
those objects may be in use. So move them to the orphans list instead to
avoid potential dangling pointers.
BUG=chromium:757705
Change-Id: Ide83a1b85b754166d298fd50e655ca331ba4f942
Reviewed-on: https://pdfium-review.googlesource.com/11670
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:749610
Change-Id: Ia83558568293398c72b7215e9b3fe4e4df6f969a
Reviewed-on: https://pdfium-review.googlesource.com/11931
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:738711
Change-Id: I4a308694c3e6fcd17431515b7897969d54486071
Reviewed-on: https://pdfium-review.googlesource.com/11870
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a global font loader for use in XFA tests. This is
needed because the CFGAS_FontMangaer takes a linearly increasing amount
of time to load fonts each time it's loaded. This can get excessively
slow for test suites which run a lot of tests.
Change-Id: Ie389844b56598ce414f4f761654fa4ed465955fd
Reviewed-on: https://pdfium-review.googlesource.com/12090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia9738e14d90a813b6ec7abd72843248fd3a3bff0
Reviewed-on: https://pdfium-review.googlesource.com/11910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Add --no-color option.
- Fix exit code ambiguity (2 means bad usage)
Change-Id: I04be9c3f21b5a71857b7847b3cc32bf595084994
Reviewed-on: https://pdfium-review.googlesource.com/11490
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Also trying to get unicode filenames right again.
Change-Id: I501c94921b92b8a8cd6a10441aff1595fc6d878e
Reviewed-on: https://pdfium-review.googlesource.com/10630
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This applies the proper configuration rules the end HTML generation.
Bug:
Change-Id: Ica159131e574fd805a1363db5b26a6581ecc0ac6
Reviewed-on: https://pdfium-review.googlesource.com/10810
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
safetynet.job.py verifies if there were performance changes since
its last run. Its state is comprised only of the last checkpoint,
and is kept in a directory passed by argument. Results of runs are
written to this directory as well.
Change-Id: I94e0e176b10fd1d2b18d84f82427f63be107ae17
Reviewed-on: https://pdfium-review.googlesource.com/10370
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The previous fix (encoding on print) breaks when running compare.py
directly. The real problem was in writing the json.
Change-Id: Ie4cf926b5c6153731c1ae187ec6a7cffa74ce67b
Reviewed-on: https://pdfium-review.googlesource.com/10653
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I5475b37aad69361e2e7fae4ce69faf011e3b5c40
Reviewed-on: https://pdfium-review.googlesource.com/10030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
json.loads() reads non-ascii filenames to a non-unicode string and an
encode step is required before a format.
Change-Id: I3145c7aa41e947f78898e73484c3cb1655418689
Reviewed-on: https://pdfium-review.googlesource.com/10410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Icb1d85167a234c9862a4011dea5dfaa09299c71c
Reviewed-on: https://pdfium-review.googlesource.com/10431
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Added FPDFImageObj_GetImageFilterCount() and
FPDFImageObj_GetImageFilters() for retrieving image filters of image
objects.
* Added a corresponding embedder test.
* Changed the filter of an image object in embedded_image.pdf from
DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case
for images with more than one filter.
Bug=pdfium:677
Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962
Reviewed-on: https://pdfium-review.googlesource.com/10130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
The xfa/fde/css code has no other links into xfa/. This CL moves the css
code to core/fxcrt/css and sets to only build when pdf_enable_xfa is
enabled.
Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be
Reviewed-on: https://pdfium-review.googlesource.com/9251
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Run from the pdfium root:
$ testing/tools/safetynet_compare.py testing
This compares the current branch with and without local changes.
$ testing/tools/safetynet_compare.py testing/corpus --branch-before x
This compares the current branch + local changes against branch x.
It runs only the corpus tests.
$ testing/tools/safetynet_compare.py testing --branch-before x
--branch-after y --build-dir=~/output_compare
This compares branch x and branch y. x and y can be revision hashes.
The callgrind.out files of cases with significant changes will be
created in ~/output_compare.
$ testing/tools/safetynet_compare.py -h
Print all options.
Change-Id: I43aaf5fe890745db611fb3bc00a656ef799fdfef
Reviewed-on: https://pdfium-review.googlesource.com/7390
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
1. Added --save-images flag in pdfium_test to save embedded images using
FPDFImageObj_GetBitmap() API and the bitmap-to-png conversion tool.
* Added support for bitmaps of other common color spaces in the
bitmap-to-png conversion tool.
Bug=pdfium:677
Change-Id: Ide29f51021695af0a1afb5205355f4b78b918d35
Reviewed-on: https://pdfium-review.googlesource.com/9710
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
BUG=chromium:750558
Change-Id: I0d541c660c529b368f420d461a6eb1d81e42579a
Reviewed-on: https://pdfium-review.googlesource.com/9730
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This method replaces the selected text in a user-editable form text
area with another text string (which can be empty or non-empty). If
there is no selected text, FORM_ReplaceSelection() will append the
replacement text after the current caret position.
BUG=chromium:59266
Change-Id: I76448ef757d107888c33ebd5656457ebac93b952
Reviewed-on: https://pdfium-review.googlesource.com/8812
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Diana Gage <drgage@google.com>
|
|
This CL fixes FPDF_RenderPageBitmapWithMatrix and improves tests.
Bug: pdfium:837
Change-Id: I98f90b667cc9a50fb0e915b8a758603488b44d40
Reviewed-on: https://pdfium-review.googlesource.com/9010
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Run test XFA-Only, since that's where the issue occurs, and the
textual output is different for non-xfa. Fix a few lifetime issue
in pdfium_test.cc unearthed by this test (doc must outlive pages
now held in formfill info).
Bug: 735912
Change-Id: Icc9e6a967c32ece67d897117896c973bb16a1515
Reviewed-on: https://pdfium-review.googlesource.com/8510
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Move several blocks out of RenderPdf().
- Add an anonymous namespace.
- Check fwrite() results.
- Fix nits.
Change-Id: Ief0ddd5e49455d68b92d40674294dc9134adf86c
Reviewed-on: https://pdfium-review.googlesource.com/8650
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jane Liu <janeliulwq@google.com>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I35423437015ad9057ed862ab630c9a2f403a8e1f
Reviewed-on: https://pdfium-review.googlesource.com/8710
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is a script that measures the performance of pdfium when loading
and rendering a single pdf file. Supported profilers for now are
callgrind (default) and perfstat.
It will be used by the compare script, which will compare measurements
this script takes.
Change-Id: I9c78ec879a7f4839e60f217d5dd8ee35b1e9a051
Reviewed-on: https://pdfium-review.googlesource.com/7354
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Given an interactive form annotation, this method returns its annotation
flags. The flags returned are dependent upon the "Ff" field, and are
specific to interactive form annotations, such as
FPDF_FORMFLAG_MULTILINE, FPDF_FORMFLAG_COMBO, FPDF_FORMFLAG_EDIT, and
others.
To test this method more thoroughly, text_form_multiple.pdf has been
added, which is similar to text_form.pdf, but includes a read-only text
field.
BUG=chromium:59266
Change-Id: Ie66046de273f69a1be6f04a433351ebaa271f60c
Reviewed-on: https://pdfium-review.googlesource.com/7851
Commit-Queue: Diana Gage <drgage@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
1. Added --save-attachments flag in pdfium_test to save embedded
attachments using fpdf_attachment APIs.
Bug=pdfium:174
Change-Id: I62f09aeb0ab1431f6e127da389518878a7214423
Reviewed-on: https://pdfium-review.googlesource.com/7990
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
When Chrome renders PDF pages it uses the progressive renderer. The one
shot renderer is used to render print preview pages. This CL changes
pdfium_test to use the progressive renderer by default to better match
Chrome. This also adds a --render-oneshot flag which will use the
non-progressive renderer.
Bug: chromium:736695
Change-Id: If79333ae10a0ed1c9bce1290caad8d531e6709aa
Reviewed-on: https://pdfium-review.googlesource.com/8130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Re-work the previous fix to be even more particular
about the input.
Bug: chromium:740166
Change-Id: I6bea3b6a6dd320a83f830b07afd52951be7d1b63
Reviewed-on: https://pdfium-review.googlesource.com/7691
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL allows TestSaved to open password-protected and linearized
documents properly. It also adds a test with one such document.
BUG= pdfium:787
Change-Id: Ie0da7f290711505fb208794afdc737c36e84dd3c
Reviewed-on: https://pdfium-review.googlesource.com/7034
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes and invalid WRITE triggered by calling util.printf. We need to
verify that the integer format will be less then 260 characters.
Bug: chromium:740166
Change-Id: I1c9047101780582da5f39088568727e2c8b4c2d2
Reviewed-on: https://pdfium-review.googlesource.com/7630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
1. Added APIs for retrieving embedded attachment count and file name.
* Added an embedder test testing them.
Bug=pdfium:174
Change-Id: I181b8e0b81495d8a7fd8c3f79dbbc0f907f5e3fd
Reviewed-on: https://pdfium-review.googlesource.com/7490
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL switches void* to CLcmsCmm*, simplifies the ownership and
destruction of CLcmsCmm, and reduces unnecessary function calling in
fx_codec_icc.cpp.
Change-Id: Ifdbf59dcdaede497d1684b161dd066726cf08ee3
Reviewed-on: https://pdfium-review.googlesource.com/7590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Bug: chromium:738919
Change-Id: I2ea99a47f45e2e68650bd1fa9ad7554d8df79874
Reviewed-on: https://pdfium-review.googlesource.com/7351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
These tests pass under normal PDFium bug fail when Skia Paths is
enabled.
Bug: chromium:736695
Change-Id: I7e3e789ae25857060dd45940c313f5383c548d2c
Reviewed-on: https://pdfium-review.googlesource.com/7450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
|
|
This CL adds helper methods for EmbedderTest to save. This means that
TestSaver is no longer needed and all the methods it uses are moved to
the EmbedderTest.
Change-Id: I740f29699bfd8c6b570cb1fd85e7aab9bc1d3f6f
Reviewed-on: https://pdfium-review.googlesource.com/7171
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
For the external buffer use case, use a CFDE_CSSExtTextBuf instead. With
the split, both text buffer implementations are simpler now. As a
result, it becomes obvious where it never fails. Adjust callers
accordingly.
Change-Id: I7b53d36593172487b8c939e6a55af2437ea4ee5a
Reviewed-on: https://pdfium-review.googlesource.com/6932
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
1. Added APIs for retrieving existing annotation paths and setting
annotation paths.
* Added an embedder test testing all the new functions.
Bug=pdfium:737
Change-Id: Ic451bcd3be488261baf2182549c4238b887b219e
Reviewed-on: https://pdfium-review.googlesource.com/6676
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Remove handling of arbitrary function calls, and only allow supported
function calls. Issues with the lexer being overly permissive led to
large blobs of javascript being dropped into the output. Specifically
driver code was assuming that anything marked as a function would just
be an identifier that could be inserted into the javascript, but the
lexer marks things like ()()() as a function, which would lead to the
following JS being inserted as an identifier.
This change is intended to be a patch for the specific issue that was
being seen from the fuzzer test, and further work will be needed to
make the lexer more strict.
BUG=724913
TEST=Ran fuzzer test case. Ran unittests,embeddertests,corpustests.
Change-Id: Ib7d9239bf6fece853bea0f4915ee4ad72d3cd290
Reviewed-on: https://pdfium-review.googlesource.com/7032
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In this CL, the content generator sets some default graphics states
before processing the page objects. In particular, a default ExtGState
is now set before processing, and the last CTM is now stored right
after parsing finishes: the only command to change matrix is ctm, and
it concatenates, so inverting requires knowing the current value.
Bug: pdfium:779
Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6
Reviewed-on: https://pdfium-review.googlesource.com/7070
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
1. Modified some existing annotation APIs to take into account the
effect of annotation's appearance streams.
* Added an embedder test testing annotations with APs.
This CL is refactored out of
https://pdfium-review.googlesource.com/c/6676/.
Bug=pdfium:737
Change-Id: I27d5e66dfdb90038d147cab1a26e0bf86b324982
Reviewed-on: https://pdfium-review.googlesource.com/7030
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I957199b63f6049a586b8de2688501f5ae3449964
Reviewed-on: https://pdfium-review.googlesource.com/7038
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
It was not matching file names with characters like '-' and '&'.
Also suppressed tests that are now matched by the regex and were not
run.
Change-Id: I70c0c8bebf4726748574a9e3ab17db64f1033a13
Reviewed-on: https://pdfium-review.googlesource.com/6835
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|