Age | Commit message (Collapse) | Author |
|
This CL converts CPDF_Metadata to use the CFX_XML classes instead of
CXML classes. This also moves the CFX_XML classes from being XFA only to
being used everywhere.
Change-Id: Idb784f8aaa0bc843d8a3415ba5262ccf4949308a
Reviewed-on: https://pdfium-review.googlesource.com/30650
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:830221
Change-Id: Ia96086a1b930600a4fb9054123c867d1c8b301eb
Reviewed-on: https://pdfium-review.googlesource.com/30671
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the CFX_XMLDoc and calls the CFX_XMLParser directly from
CXFA_DocumentParser.
Change-Id: I4d715cca90cd15b5e1d79827e0bb2781e873e371
Reviewed-on: https://pdfium-review.googlesource.com/30251
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL allows the CXFA_SimpleParser to retrieve the XML tree from the
CFX_XMLDoc. This way, we don't have to keep the doc around and can store
the pointer to the tree in the CXFA_SimpleParser.
Change-Id: I5b478acbe61e6f1ca5fa04d03133a2b327a0cb1c
Reviewed-on: https://pdfium-review.googlesource.com/30210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up minor nits in the CFX_XMLParser code.
Change-Id: Ie19d12d3dcce16c9ce6088160ecdec3d9855c11f
Reviewed-on: https://pdfium-review.googlesource.com/30170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the code for verifying and creating checksums associated
with form elements in XFA documents. This was the only code requiring
the SAXReader which has also been removed.
According to the XFA spec and application can decide which parts of the
signatures are supported. This feature is being removed until we
determine if/when it is needed.
Bug: pdfium:1063
Change-Id: Iec2261282340f8fc72a1225d2e0d3e6ddf05edcb
Reviewed-on: https://pdfium-review.googlesource.com/30150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also fixes any problems with cycles between colorspaces.
Past fixes have solved problems with CPDF_DocPageData::GetColorSpace()
calling itself and CPDF_DocPageData::GetColorSpace() calling
CPDF_ColorSpace::Load() and vice versa. They have not solved
CPDF_ColorSpace::Load() calling itself.
This CL repurposes the |pVisited| set to ensure CPDF_ColorSpace::Load()
does not try to load a colorspace as a dependency of itself and
creates |pVisitedLocal| to ensure CPDF_DocPageData::GetColorSpace()
does not create a similar circular dependency not involving
CPDF_ColorSpace::Load().
Bug: chromium:828206
Change-Id: Ib2d0ec494be169135607f3651e0f70627b26ebd7
Reviewed-on: https://pdfium-review.googlesource.com/29810
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Get bounds checks in parsers automatically when using spans.
Change-Id: I71fbe7b838435d455376db2f89817d807a9cdcfd
Reviewed-on: https://pdfium-review.googlesource.com/29830
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Allow them to run a bit more consistently.
Change-Id: I6b0f528a73f2c872813f4644aeae886ec04879f4
Reviewed-on: https://pdfium-review.googlesource.com/29930
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes the CFX_XMLParser from CXFA_SimpleParser and constructs
it in the CFX_XMLDoc.
Change-Id: Id69b396f091892170a4c4654ac1d0fd65d1efbb6
Reviewed-on: https://pdfium-review.googlesource.com/29970
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Allows indexing with better bounds-checking to occur. Some small
modifications are required to deal with PDFium being intentionally
held at C++11 compliance, not C++14.
Use in one place as check on correctness.
Change-Id: Id2875cf0a93980112bc536a93c4f9ec5306c0dac
Reviewed-on: https://pdfium-review.googlesource.com/29671
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently this is being treated as a case of "data not available" which
leads to an infinite loop.
BUG=pdfium:1055
Change-Id: I2722a5b364d56a4ad5b7cca2a4b42e6b13a933f4
Reviewed-on: https://pdfium-review.googlesource.com/29831
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Limit the token to 255 bytes + NUL. Also, shuffle fields in
cpdf_streamparser to allow memory tools to better check this
inline array.
Bug: 828049
Change-Id: I444f2b4c6958167577d9cd76c06805baf7d5c26c
Reviewed-on: https://pdfium-review.googlesource.com/29530
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Fixup API check filename after fpdf_view_c_api_test was moved.
TBR: hnakashima@chromium.org
Change-Id: I49f1015616cb8c8a5d6a9f0646f1e19e8ed94779
Reviewed-on: https://pdfium-review.googlesource.com/29470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes the fpdfsdk/fpdf* files to be consistently prefixed with
fpdf_ instead of randomly dropping the _.
Change-Id: I23e3c8a0831b56bcd17c788d9fe874b2ab8b24fc
Reviewed-on: https://pdfium-review.googlesource.com/29390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL renames fsdk_common and fsdk_define to cpdfsdk_common and
cpdfsdk_helpers respectively.
Change-Id: I8ee7a308561f1ff2f510954444f953b0c8fed788
Reviewed-on: https://pdfium-review.googlesource.com/29371
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the CPDF_SimpleParser to accept a ByteStringView.
Several of the callers of SimpleParser are also updated to use a
ByteStringView instead of <char*,size>.
Change-Id: Ic2df3a06f92e77b53745a0419b44368142f9d8e6
Reviewed-on: https://pdfium-review.googlesource.com/29351
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Initially it contains:
- FPDFPageObj_CountMarks
- FPDFPageObj_GetMark
- FPDFPageObjMark_GetName
This allows reading the content marks from a page object.
Bug: pdfium:1037
Change-Id: I3d7554b71f938778890fdb44088e0d45dd2718d9
Reviewed-on: https://pdfium-review.googlesource.com/28710
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:823586
TBR=dsinclair@chromium.org
Change-Id: Ifee58db77a19c9143b8773e78d102114f08143ae
Reviewed-on: https://pdfium-review.googlesource.com/29030
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This applies parts of https://crrev.com/469551 and
https://crrev.com/471303 to PDFium.
Change-Id: Ifbb8e4c300bd276fe3c6fe60d19ebb1618be8936
Reviewed-on: https://pdfium-review.googlesource.com/28791
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This will help facilitate the transition for these two directories from
DEPS checkouts to part of the parent git repo. Without any files in
these directories, gclient will delete them when they are no longer in
DEPS.
BUG=chromium:823586
TBR=dsinclair@chromium.org
Change-Id: I1841db87fddcb0b6a2ed9300a86349e09bda3160
Reviewed-on: https://pdfium-review.googlesource.com/29011
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Destination variables usually have "dest" or "dst" as the prefix.
Change-Id: If5bb01a5eafe1e4b42d1a6d653abb1b444b1b2fa
Reviewed-on: https://pdfium-review.googlesource.com/28970
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
WideString::Compare() went bad but no embedder test failed. Improve
coverage by hand crafting a PDF similar to the sample PDF in the bug
report.
BUG=chromium:823369
Change-Id: I267f53ba3ef7612bf54771a85f8305b2cbc3cfcb
Reviewed-on: https://pdfium-review.googlesource.com/28910
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Currently, when constructing AP for multi-line markup annotations, we
only take into account the first set of quadpoints, resulting in only
the first line of the annotation being displayed if the annotation spans
multiple lines.
This CL, initially written by Jane Liu <janeliulwq@google.com>
(https://pdfium-review.googlesource.com/12010) takes into account all
the quadpoints, so multi-line annotations can be displayed correctly.
BUG=pdfium:876
Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7
Reviewed-on: https://pdfium-review.googlesource.com/28590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This causes a scrollbar to appear. We need a test case that contains
an AcroForm combobox with a popup that is large enough to create a
scrollbar.
Bug: chromium:823378, chromium:820278
Change-Id: I6e93bda5b938f9f7c08ceeef7989794ea7764532
Reviewed-on: https://pdfium-review.googlesource.com/28750
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
In this doc there is a hyphen followed a fi ligature. Older versions of
PDFium were not inserting the appropriate soft hyphen marker (0x0002)
at this point, since they were only checking for ASCII characters. That
bug is fixed in the preceding CLs, so this test is being added to avoid
regressions.
BUG=pdfium:1029
Change-Id: I9c9906de5a13ade1400a589fb18967938150516d
Reviewed-on: https://pdfium-review.googlesource.com/28470
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL renames IFX classes in core/fxge to Iface.
Change-Id: I137167ddd4ff1563d8002d9501222c27183408cc
Reviewed-on: https://pdfium-review.googlesource.com/27990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I88d350171e2b18dc7776d17e845b55c361845721
Reviewed-on: https://pdfium-review.googlesource.com/27811
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
These are being flakey due to subtle differences between builders, so
turning them off while resolving that.
Change-Id: I7f400a7a95076bafb2739ff78786eb3cc147953c
Reviewed-on: https://pdfium-review.googlesource.com/27830
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:1008,pdfium:1020
Change-Id: I607b9327252ff836ad78a55659b1d40bc2797906
Reviewed-on: https://pdfium-review.googlesource.com/27771
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This removes the need for them to have their own runner. Due to other
upstream changes some of the expectation files needed to be
updated. The suppressions have been updated to make sure the tests do
not run for non-XFA builds.
Having these tests run on the bots surfaced an MSAN issue in the XFA
code, which is fixed in this CL.
BUG=pdfium:1020,pdfium:1008
Change-Id: I44e2fa1cba2d07f30f56f5792749acbe1ebf4b62
Reviewed-on: https://pdfium-review.googlesource.com/27710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: chromium:803591
Change-Id: I4dbbe52ca296e7232ad3eb225a2bdd84dcd0fa81
Reviewed-on: https://pdfium-review.googlesource.com/27730
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The refactoring in [1] introduced a bug where we pulled the wrong array
index to get the array of fields to use in the AFSimple_Calculate
method. This caused the calculation to not be performed as the fields
could not be found.
This CL fixes up the index and adds a test to verify we use
AFSimple_Calucate to sum two fields.
1- https://pdfium-review.googlesource.com/c/pdfium/+/16670
Bug: chromium:811913
Change-Id: I2abb9fe4fe2d6969ce1876736faadf252ef90575
Reviewed-on: https://pdfium-review.googlesource.com/27670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:1008,pdfium:1020
Change-Id: I1f14f249bfc253bacf84219221c3f749308b556f
Reviewed-on: https://pdfium-review.googlesource.com/27650
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This adds a number of {{}} style tags to the .in format that allow the
fix-up script to inject XFA related boilerplate into the PDF, instead of
having the .in file replicate this.
A simple example XFA .in file, called xfa_example.in has been added as a
template for future files to follow.
Finally a run_xfa_tests.py has been added for executing all of the tests
in testing/resources/xfa, which from what I can tell are not executed any
other way. All of the existing PDFs in that directory are currently
suppressed.
BUG=pdfium:1008
Change-Id: Ie055b6640969ce8291b4c96b401ebf6887dfa0c0
Reviewed-on: https://pdfium-review.googlesource.com/27631
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL changes XFA to skip font loading for embedder tests. This takes
the runtime for the CFXJSE_Formcalc_ECFXJSE_FormCalcContextEmbedderTest
run from ~25sec to ~5sec.
Change-Id: If9989c5a3474cccd3915ec3f5c178d7af48aae37
Reviewed-on: https://pdfium-review.googlesource.com/27191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ic1d5a250fc00d6767cee7eee1b2d74d5e1caa2bb
Reviewed-on: https://pdfium-review.googlesource.com/27050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I5dbf1c78cf794eff817de9f5831b1fb5b49c84ab
Reviewed-on: https://pdfium-review.googlesource.com/26491
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:1008
Change-Id: I5136d57bd401d44b56ac19e5cfb52702afa32200
Reviewed-on: https://pdfium-review.googlesource.com/26651
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL cleans up hte CFX_XMLNode pointers. Each pointer has been
renamed to make the usage clearer, the NodeItems method has been removed
in favour of distinct accessors and the node pointers have been made
private.
Change-Id: I5459a77a0ae93b08741a0cd59266ef9c81ddad75
Reviewed-on: https://pdfium-review.googlesource.com/26550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I01956bff9e7250c9df84afe6b6de96ab4e9b4851
Reviewed-on: https://pdfium-review.googlesource.com/26650
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I653619faa61181137795bb3675418fd8d0945d25
Reviewed-on: https://pdfium-review.googlesource.com/25590
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I8c6d813e488b2612a85fb1973382f979728df563
Reviewed-on: https://pdfium-review.googlesource.com/25571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Place the template map definitions entirely in .cpp file.
Change-Id: I2643f1b99f5582b69aa985857c4aa6f9b5ab57c8
Reviewed-on: https://pdfium-review.googlesource.com/26150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Test the lowest layer without firing up the whole library. Requires
firing up v8 in the unit test main, though.
Move array buffer allocator to cfx_v8 to allow building isolates.
Change-Id: I9a56d503a48e0e555d3310f2997fa12137695860
Reviewed-on: https://pdfium-review.googlesource.com/26130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9286b24957f9d96da10869098eb0e04991bd6571
Reviewed-on: https://pdfium-review.googlesource.com/25570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- Keep track of pages in a single map when calling LoadPage(). It is
simpler and performance is not crucial as the number of loaded pages
is usually very small.
- Verify UnloadPage() is only called for loaded pages.
- Verify there are no loaded pages in TearDown().
- Verify RenderLoadedPage methods are only rendering loaded pages.
- Fix pages that are using FPDF_LoadPage() and FPDF_ClosePage() when
they should be using LoadPage() and UnloadPage().
- Disallow calling LoadPage() for the same page number repeatedly. No
caller does this and it makes verification in UnloadPage() harder.
Change-Id: I58878ea8ade21dde28f1bbebd3a3304ce677561d
Reviewed-on: https://pdfium-review.googlesource.com/25550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
We want to change the signature of {CreateDefaultPlatform} in the V8
API to return a unique_ptr instead of a raw pointer to indicate that the
caller owns the platform. With this change we prepare pdfium for this
change.
In this second attempt, keep the old InitializeV8ForPDFium() method
around to complete the Chromium DEPS roll. Once that lands safely,
remove it from PDFium.
This relands commit 608e8dd6 and commit 3355f459, which commit b3a3eaab
reverts.
Change-Id: Icc60b17ca202637d34ae242c0785d939194d0fe6
Reviewed-on: https://pdfium-review.googlesource.com/25950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add replacement methods that make themselves clear as to what they are
rendering, and return unique_ptrs to help prevent leakage. Mark existing
methods deprecated.
Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d
Reviewed-on: https://pdfium-review.googlesource.com/25470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit 608e8dd6b87b15772862dca9b7b2e6791a25dab6.
Reason for revert: Breaks the roll into Chromium
pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc:238:5: error: no matching function for call to 'InitializeV8ForPDFium'
InitializeV8ForPDFium(ProgramPath(), "", &natives_blob, &snapshot_blob,
^~~~~~~~~~~~~~~~~~~~~
../../third_party/pdfium/testing/test_support.h:94:31: note: candidate function not viable: requires 4 arguments, but 5 were provided
std::unique_ptr<v8::Platform> InitializeV8ForPDFium(
^
https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.linux%2Flinux_chromium_compile_dbg_ng%2F461077%2F%2B%2Frecipes%2Fsteps%2Fcompile__with_patch_%2F0%2Fstdout
Original change's description:
> [v8-platform] Store the platform in a unique_ptr
>
> We want to change the signature of {CreateDefaultPlatform} in the V8
> API to return a unique_ptr instead of a raw pointer to indicate that the
> caller owns the platform. With this change we prepare pdfium for this
> change.
>
> R=thestig@chromium.org
>
> Change-Id: I4a0a466dfc37b28387a91543623a7a481ca8035a
> Reviewed-on: https://pdfium-review.googlesource.com/18191
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
TBR=thestig@chromium.org,ahaas@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I418c97653e8aba93560537f0d41e1aaa238bf3b4
Reviewed-on: https://pdfium-review.googlesource.com/25850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|