Age | Commit message (Collapse) | Author |
|
BUG=pdfium:786
Change-Id: I84f4012b5225f81df604fcc6e0836ac5d19f1414
Reviewed-on: https://pdfium-review.googlesource.com/7153
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
- Simplify if (cond) return true; return false; pattern.
- Use size_t in CXFA_FFDocView::RunCalculateRecursive().
Change-Id: I1c426556bc927a118cb062999812ab06bbfcfec7
Reviewed-on: https://pdfium-review.googlesource.com/7130
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This picks up the right test expectations for Oneof3.pdf.
BUG=pdfium:781
TBR=npm@chromium.org
Change-Id: Ic95fca31c98874b1d09226eff9ca7335a921fb65
Reviewed-on: https://pdfium-review.googlesource.com/7191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6296928a1dbd5a8dffaf949ac4c8d7e8336c4448
Reviewed-on: https://pdfium-review.googlesource.com/7170
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
The bool returned by Start was not being used and the method was always
called right after the constructor, so it should be in the constructor.
Change-Id: I98abf9f7c11fbe42b3aa15ec5e46731198aa23d5
Reviewed-on: https://pdfium-review.googlesource.com/7151
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Removing hand rolled hash table and binrary search.
BUG=pdfium:786
Change-Id: Iac18f02c9f560f484b974762474dbb51597d2353
Reviewed-on: https://pdfium-review.googlesource.com/7092
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
CFX_Matrix::GetInverse is much clearer.
Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834
Reviewed-on: https://pdfium-review.googlesource.com/7090
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Added an API for removing annotation and an embedder test for it.
Bug=pdfium:737
Change-Id: I6f01625e8103078b83967a57a5c1a7a26bc0c70a
Reviewed-on: https://pdfium-review.googlesource.com/7039
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I3faf5a4ec4b2af6145348e526f39ccbc2055e62e
Reviewed-on: https://pdfium-review.googlesource.com/7050
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The saving testing is used in multiple methods. This CL adds a helper
to reduce duplicated code.
Change-Id: I5a36d41b5fc03a63092eaf642c3461695b5b9805
Reviewed-on: https://pdfium-review.googlesource.com/7091
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@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>
|
|
The new embedder test shows Oneof() works, whereas the corpus test does
not. It turns out the corpus test was bad, and trying to fix it exposed
a different bug. So roll DEPS for the testing corpus anyway to get
improved tests, but keep the suppression for now.
BUG=pdfium:781
Change-Id: I3cc6b9a414384c917f205eff064c5dd2175d09fe
Reviewed-on: https://pdfium-review.googlesource.com/6973
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:790
Change-Id: I4a3623dc0daac6ff8407c09cd00e9f2e4e5dd2d7
Reviewed-on: https://pdfium-review.googlesource.com/7051
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
This CL removes m_pTrailer in favor of having them all in a vector, and
having an index that points to the position of the previous m_pTrailer
in the vector.
Bug: pdfium:787
Change-Id: Ieebbf4849f7ea78f8f74d188e3adb3446a53482e
Reviewed-on: https://pdfium-review.googlesource.com/7040
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
https://pdfium-review.googlesource.com/c/7033/ contains the changes
in the corpus tests expected pngs. They are imperceptible and due to
a difference in float rounding when writing the appearance stream.
Bug: pdfium:731
Change-Id: I815ca5b9ddd02382b74285a32bfde8bd3e8eeaae
Reviewed-on: https://pdfium-review.googlesource.com/7010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:788
Change-Id: I9f211d42e60c0d8b7b3c508d340036a3b26542dd
Reviewed-on: https://pdfium-review.googlesource.com/7041
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I92077971aec6bada061ed101cb48abe1611050d7
Reviewed-on: https://pdfium-review.googlesource.com/7042
Commit-Queue: dsinclair <dsinclair@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>
|
|
Bug: pdfium:731
Change-Id: I52165fda5f94a4d29e707ea1619b1ad80423b436
Reviewed-on: https://pdfium-review.googlesource.com/7036
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:731
Change-Id: Ie65bafc644cff076b0d7aadcc5d0b0e33e2c199b
Reviewed-on: https://pdfium-review.googlesource.com/7035
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
Change-Id: I1f3933709ad4a4f251a634dbe6d87a541994f02e
Reviewed-on: https://pdfium-review.googlesource.com/7037
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I64e37ee1673d46e6e550d44503c0ccc1015243e1
Reviewed-on: https://pdfium-review.googlesource.com/7012
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I9453f28a17dd34908e6dcc97ea27e5ee84eda2d1
Reviewed-on: https://pdfium-review.googlesource.com/7011
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Before:
When returning FPDF_ANNOTATION, the APIs would take in a
FPDF_ANNTOATION* and write the handle of the annotation to it, while
returning a boolean as status.
This CL:
This CL changes the APIs to directly return FPDF_ANNOTATION, which
would be null on failure.
Also adds more null checks within the annotation APIs.
Bug=pdfium:737
Change-Id: I4f77dd1b16d43eab3f16c303598b76591da0dcab
Reviewed-on: https://pdfium-review.googlesource.com/6952
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
CPDF_PageContentGenerator currently only works for CPDF_Page objects.
However, CPDF_Form is also a CPDF_PageObjectHolder like CPDF_Page, and
content streams can be generated for form objects too.
This CL modifies the content generator to work with both forms and
pages. The content generator will later be used on annotation objects'
CPDF_Form to simplify the code for annotation AP stream generation.
Change-Id: I1c50bdf0329d1f5788db23286ac72750355a10ed
Reviewed-on: https://pdfium-review.googlesource.com/6837
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@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>
|
|
Change-Id: Ief7bd0f2d0f4edbcb7331b0e78c01b86a9dc0621
Reviewed-on: https://pdfium-review.googlesource.com/7031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I285332c8f9d988327e8633cb0746af2b76c401e5
Reviewed-on: https://pdfium-review.googlesource.com/6911
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also showing stats on number of failures, successes, suppressions,
etc.
Change-Id: Id12faf504ea8d6b1c343d7a8b412d03dc787ca3a
Reviewed-on: https://pdfium-review.googlesource.com/6834
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL improves the PNG presubmit check by using ideas from the corpus
repository check.
Change-Id: I3809da4cca69c867335ff28eea6cfcb025efbb4b
Reviewed-on: https://pdfium-review.googlesource.com/6991
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If6d2cce6a4185c6726df7d6b9d44d74efe0be11d
Reviewed-on: https://pdfium-review.googlesource.com/6931
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I8230c2d5e5450ea36ff6d2a4fefc1619a13e9c44
Reviewed-on: https://pdfium-review.googlesource.com/6930
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1
Reviewed-on: https://pdfium-review.googlesource.com/6850
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds a comment to point to the upstream bug of a patch fixing
an OOM. The fix is fine for us but not accepted upstream so it should
be ignored once upstream fixes the bug.
Bug: chromium:681311
Change-Id: I6986fb7c851e260e84f764449ff1ee46441e71b4
Reviewed-on: https://pdfium-review.googlesource.com/6953
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This fixes building PDFium as part of another project like Chromium.
Change-Id: Ide4d04072135345c0b2d2cfe6a1ab2246f5d3418
Reviewed-on: https://pdfium-review.googlesource.com/6970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds a presubmit check for png files so that they are in the form
_expected{,_mac,_win}.pdf.BLA.png and updates the corpus test repository hash.
Change-Id: I5397a091b77a339eba7d370b291b7a6e61754744
Reviewed-on: https://pdfium-review.googlesource.com/6951
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I23fe37139ed06a7e09f6a39ea833a6a984add49e
Reviewed-on: https://pdfium-review.googlesource.com/6913
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is unused except for being a pathway for indirect deps.
Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:781
Change-Id: I51c5ed9e582376f11f75f7512f36c33720e71bac
Reviewed-on: https://pdfium-review.googlesource.com/6890
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Bug: pdfium:664
Change-Id: Iae8dab8c27d087c66b4e883a17e9fe55fe975e30
Reviewed-on: https://pdfium-review.googlesource.com/6836
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It is not actually a sample program to demonstrate how to use PDFium
APIs. It is more of a test utility program.
Remove header include dependency from samples/ to core/, to set a good
example.
Change-Id: Idd5d567c82314bcf0e4a7bec8a3210e7d57226ee
Reviewed-on: https://pdfium-review.googlesource.com/6871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL replaces raw pointers with vector and unique_ptr. It also fixes
other nits.
Change-Id: I45c99c9aa658681ec3f0b48fc4f407b278b250f5
Reviewed-on: https://pdfium-review.googlesource.com/6830
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Since cpdfsdk_widget.cpp already generates it, we can expect that
FPDF_GenerateAP will not be called. That implementation does not
work with widgets with a shared field.
Bug: chromium:733528
Change-Id: Ia436b4e8bc87ca86b67a02cf7301ac2328339128
Reviewed-on: https://pdfium-review.googlesource.com/6752
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:690
Change-Id: I922279e4bdc8b411f47f49798155e8f9118c1396
Reviewed-on: https://pdfium-review.googlesource.com/6552
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Id558c36d10501ce488717045bbf00bfed32e4b92
Reviewed-on: https://pdfium-review.googlesource.com/6870
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Current behavior:
Our CPVT_GenerateAP::Generate*AP() functions do not get called as
long as the annotation dictionary has an "AP" entry.
Problem:
We always need the "N" entry in AP dictionary to display an
annotation. Even though the spec requires "AP" dictionary to have an
"N" entry for normal mode appearance, in case of a malformed pdf
with "AP" but without "N" in "AP", we won't be able to display the
annotation at all.
Fix:
Always check if "AP" has "N" entry to decide whether AP needs to be
generated. If not, then we still need to generate AP, and add to the
AP dictionary under the key "N".
Bug=pdfium:778
Change-Id: Icf0c6a681b3c8c22b0b67bf8d16ce6fefdc2c45b
Reviewed-on: https://pdfium-review.googlesource.com/6692
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Bug: chromium:727938
Change-Id: I85fe329c9d19c1dd1303279b0a9aade2fcc3211c
Reviewed-on: https://pdfium-review.googlesource.com/6814
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|