Age | Commit message (Collapse) | Author |
|
This CL splits PNM_SETSCROLLPOS out of OnNotify and places into a
method which is called as needed.
Change-Id: Ic144bc30bca57869f0679bef40e07b6a130e944c
Reviewed-on: https://pdfium-review.googlesource.com/7252
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
This CL moves the SETSCROLLINFO from a OnNotify message to a method
which is called directly.
Change-Id: I5d793c1c7a54c0fa3bdadffac72aae934cb9da57
Reviewed-on: https://pdfium-review.googlesource.com/7251
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This OnNotify message is only handled in CPWL_Wnd and it is only emited
in CPWL_Wnd. This CL inlines the resulting calls into the original
OnNotify callsites and removes the messages.
Change-Id: If419f0f51db00dbecc960d80bb10b17ad8bec7e1
Reviewed-on: https://pdfium-review.googlesource.com/7232
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Cleanup of code I changed earlier last week, to match the style
recommended in later reviews and make it more readable.
BUG=pdfium:786
Change-Id: I2ff8b980a229718e389ad1a8063bd5059aedb66c
Reviewed-on: https://pdfium-review.googlesource.com/7212
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:786
Change-Id: I7a852566cdde301ee896c12d9d29043047c31ad4
Reviewed-on: https://pdfium-review.googlesource.com/7211
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These tests verify that CPWL_ComboBox::GetSelectedText() and
FORM_GetSelectedText() behave as expected when selecting text in form
combobox textfields. Text can be selected in both regular comboboxes and
user-editable comboboxes.
BUG=chromium:59266
Change-Id: I1a5e48baf8aa767283dc478b0872877a52c5b869
Reviewed-on: https://pdfium-review.googlesource.com/6971
Commit-Queue: Diana Gage <drgage@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
They are allocated with |opj_malloc| (which is just |malloc|), but we were
freeing them with |FX_Free|. But |FX_Free| recently changed to be
|PartitionFree|.
This is probably not the right ultimate fix, but it should solve the
high-occurence crash we're seeing in the short term.
BUG=chromium:737033
Change-Id: Ia162fe4e39731bd774d3eccb2357d9add26aa079
Reviewed-on: https://pdfium-review.googlesource.com/7230
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:786
Change-Id: I0779dccb6db0e6ea3933279914153ef7961d9a5b
Reviewed-on: https://pdfium-review.googlesource.com/7152
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
Also just call CFX_FloatRect() instead of explicitly writing out all
zeros.
Change-Id: I7574e64791d0c9ba613b14d0a613737dfbf39b12
Reviewed-on: https://pdfium-review.googlesource.com/7172
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib7062d46c74d1e2fcfa3699a9db50bc3c930b674
Reviewed-on: https://pdfium-review.googlesource.com/7192
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
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>
|