Age | Commit message (Collapse) | Author |
|
Comment raw pointers subject to nondeterministic tree destruction
order as such to avoid re-attempting to convert to the unowned
mechanism.
Change-Id: Ia9fe3c8a2729dc1e2b1de4a8c62ae3d2c3d7ec0a
Reviewed-on: https://pdfium-review.googlesource.com/36635
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Define constant values in the public API for the valid values of alert
button type, alert icon type, and beep type. Replace various magic
numbers through out the code base using these values. Also replace the
XFA specific versions with an enum class that is guaranteed to have the
same values, instead of #defines that just happen to.
This CL does not attempt to add error checking on these values, since
it currently doesn't exist so adding it may cause regressions.
Change-Id: Ief3aee2a4ad419691c18fc1dba8b984ad222141b
Reviewed-on: https://pdfium-review.googlesource.com/35730
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Many of these cause a string duplication as we go from
Widestring => c_str => Widestring
Change-Id: I0dfa952e66f89138e719ff9200db3d9397839e28
Reviewed-on: https://pdfium-review.googlesource.com/35790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove some string copies in barcode that were noticed whilst
looking for moves.
Change-Id: Ieda34d00f633576ba1f0dca283dcdabfb36f236c
Reviewed-on: https://pdfium-review.googlesource.com/35410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
When calling into the XFA JS engine with a request for a non-XFA JS
call which accesses the EventContext we would get a crash in XFA as we
never set the context. This CL changes the XFA code to accept the
CJS_Runtime instead of the CFXJS_Engine and then calls NewEventContext
before executing JS scripts. This will correctly setup the event context
as needed for any JS callbacks.
Bug: pdfium:1003
Change-Id: Icf202252b2e6e56afdf0d1766a32a893935a2fd3
Reviewed-on: https://pdfium-review.googlesource.com/33930
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When script variables are used the methods are set on the non-xfa global
object. This CL updates the NormalPropertyGetter to check the non-xfa
global object for methods which allows the variables methods to be
found.
Bug: pdfium:1097
Change-Id: I13d9d49ad654cad776883aef74de6250de5e756b
Reviewed-on: https://pdfium-review.googlesource.com/33433
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Neither of these local values ever get read after calculating them.
Issue found with Clang Static Analyzer.
Change-Id: Iffa578f1d5e303c65a881bcd372a9144a11edd3b
Reviewed-on: https://pdfium-review.googlesource.com/33532
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@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>
|
|
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>
|
|
The reason for calling ReleaseBindingNodes() has changed but the code
comment hadn't. This CL updates the code comment to make it clearer why
this release has to happen.
Change-Id: I0c08c7580ef7c8508cd4db7b8930d5f2cd595b1b
Reviewed-on: https://pdfium-review.googlesource.com/32690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Import Chromium's base/compiler_specific.h from r537069.
Now that FALLTHROUGH is available via compiler_specific.h, remove
FX_FALLTHROUGH.
Change-Id: I8b9631a4f007673e10e0c26951dfd61e9dcada30
Reviewed-on: https://pdfium-review.googlesource.com/32639
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Cleaning up some nits that came in after my previous codec CL had gone
into the CQ.
BUG=pdfium:1080
Change-Id: I3845136d370f73c9c96ef732e95b8cf0c9c79d91
Reviewed-on: https://pdfium-review.googlesource.com/32351
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Currently all of the BMP related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the BMP codec code if support
for BMP is turned off.
BUG=pdfium:1080
Change-Id: I56d40639a5a3631f9c601a1eef3f98873feac94f
Reviewed-on: https://pdfium-review.googlesource.com/32370
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently all of the GIF related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the GIF codec code if support
for GIF is turned off.
This also catches a few missed cases from previous CLs.
BUG=pdfium:1080
Change-Id: Ie7fe2d894d2ae2f8f36ae05e0ff256f2ce6ef8d4
Reviewed-on: https://pdfium-review.googlesource.com/32330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Currently all of the PNG related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the PNG codec code if support
for PNG is turned off.
BUG=pdfium:1080
Change-Id: I9c5247145fcadbcb1bd2243aa83350304ba421ff
Reviewed-on: https://pdfium-review.googlesource.com/32270
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Currently all of the TIFF related code is being built when support for
the codec is disabled, it just isn't being utilized. Depending on the
settings being used, this unneeded code may or may not get stripped
during linking.
This CL explicitly turns off building the TIFF codec code if support
for TIFF is turned off. It also fixes cases in the code base where tif
was being used instead of tiff.
BUG=pdfium:1080
Change-Id: If6aaa8af5160fdd5b261e63bab7d5984196efcc9
Reviewed-on: https://pdfium-review.googlesource.com/32193
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
CreateUIChild() was changed and renamed to
CreateChildUIAndValueNodesIfNeeded() in:
https://pdfium-review.googlesource.com/c/pdfium/+/24390
This caused some bugs but it's too far back for a rollback.
This cl restores the logic of CreateUIChild() keeping the new
signature.
Bug: chromium:838994
Change-Id: I44ce741fdb90f8b0fd11379b5e881e376c307f0c
Reviewed-on: https://pdfium-review.googlesource.com/32090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
When processing items for layout it's possible for the iBlockIndex*3
value could be larger then the field split count. If this is the case
we'll walk off the end of the split array.
This CL verifys that we have enough data before attempting to walk the
splits and returns early if we don't have enough data.
Bug: chromium:837585
Change-Id: I534298b4ee354ce079442d893202f811431155a0
Reviewed-on: https://pdfium-review.googlesource.com/32051
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I1bfada610b8bf2e1f8e0f79a9421db9ebedc7311
Reviewed-on: https://pdfium-review.googlesource.com/32010
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a CFX_XMLDocument to act as the XML node container. All
nodes are now owned by the document and the document is returned by the
CFX_XMLParser.
Classes which parse XML files now store the document instead of the root
node.
BUG: chromium:835636
Change-Id: I1e07d6115cf14714911d6fd4c3fa920c94fd5faf
Reviewed-on: https://pdfium-review.googlesource.com/31313
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1088abd4ce8f6276043213218867c4d6fb0a46a9
Reviewed-on: https://pdfium-review.googlesource.com/31914
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Return a CFX_Size instead.
Change-Id: I3bef1093fbc887237aa69dc942f878af27b4e8e9
Reviewed-on: https://pdfium-review.googlesource.com/31911
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I4039917c5342f6a4c6568029a293066901bb5db4
Reviewed-on: https://pdfium-review.googlesource.com/31870
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3ed6cbadeb9da756b30634b48ffdd1026a70b8a0
Reviewed-on: https://pdfium-review.googlesource.com/31853
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib5f8b8754bca8198d9122700d7d876b45d1428da
Reviewed-on: https://pdfium-review.googlesource.com/31852
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL fixes issues with handling XML instructions in CXFA_DocumentParser.
Unittests were added to verify the behaviour.
Change-Id: Iff8d51d0e6d411419473c9b2c32c700d4bbf86f5
Reviewed-on: https://pdfium-review.googlesource.com/31810
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:507
Change-Id: I28eeb9a5f6d7099eef6d8e7e37d425cd4613c49c
Reviewed-on: https://pdfium-review.googlesource.com/31430
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2
Reviewed-on: https://pdfium-review.googlesource.com/31350
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ic62f1def8e043494c9fa6c08a937d7d872513567
Reviewed-on: https://pdfium-review.googlesource.com/31314
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This is occuring when the variables go out of scope, due to C++s first
in, last out destruction policy.
BUG=chromium:808333
Change-Id: I44f37520a22720bc23df4c8a72ff73994c37eea1
Reviewed-on: https://pdfium-review.googlesource.com/31278
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 9a3a7709103a872037dcea1f3cf0b7785a3da191.
Reason for revert: Gerrit did not do what I expected....
Original change's description:
> Change CFX_XML Save to take a write stream
>
> This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more
> generic IFX_SeekableStream.
>
> Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10
> Reviewed-on: https://pdfium-review.googlesource.com/30877
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org
Change-Id: I137e53bf93285b88ade6832dedefca66e3b61e13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/31211
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more
generic IFX_SeekableStream.
Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10
Reviewed-on: https://pdfium-review.googlesource.com/30877
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Cleanup formatting and unused variables in the CFX_XML classes.
Change-Id: I1aff6317a3da38a141a071ba69c7893d0f669732
Reviewed-on: https://pdfium-review.googlesource.com/30730
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL sets the CFX_XML tree ownership. The pointers set into the tree
must be unique_ptrs and the CFX_XMLNode children are set to be either
unique_ptrs or UnownedPtrs.
Change-Id: Ib0db495c81471e40f5b4533503f7bbe5a784fd77
Reviewed-on: https://pdfium-review.googlesource.com/30711
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The Export which takes a CFX_SeekableStreamProxy is never implemented. Removed.
Change-Id: I130baeaf2bea7e5ebb0738330fa5de7152304367
Reviewed-on: https://pdfium-review.googlesource.com/30857
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the CFX_XMLParser to accept an IFX_SeekableStream intead of a
CFX_SeekableStreamProxy.
Change-Id: I3534288a8a00095acd78a60bf6b925c6a0357892
Reviewed-on: https://pdfium-review.googlesource.com/30856
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the abliity to write to the seekable stream proxy class.
Change-Id: I0eda2619714df190d326c23dfdcd4527d4312779
Reviewed-on: https://pdfium-review.googlesource.com/30853
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts xfa_utils to use an IFX_SeekableStream instead of a
CFX_SeekableStreamProxy.
Change-Id: I824b477351ac29d54118df2f3c5442c503aa3671
Reviewed-on: https://pdfium-review.googlesource.com/30852
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL converts the CFX_XML Save methods to take an IFX_SeekableStream instead
of a CFX_SeekableStreamProxy.
Change-Id: I6b3f6acc9f51e73b3c863b965b4dcdcbd25ba949
Reviewed-on: https://pdfium-review.googlesource.com/30850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Get runtime checks instead of just asserts.
Use early return while at it to save some indentation.
Fix one out-of-bounds case noted by inspection.
Add tests, and fix bugs that gave the wrong answers.
This should be removed at our earliest convenience. Its likely to
still be wrong.
Change-Id: I2a68edc854c8b28c434fe28397b7834e5c9c3670
Reviewed-on: https://pdfium-review.googlesource.com/30530
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 0d32b8fda53e02c1036d39f7290d4f59f2b58ca4.
Restore behaviour on trunk.
TBR: dsinclair@chromium.org
Change-Id: Ia867f09ae9d2885595c4d9b300a058431dfd84f2
Reviewed-on: https://pdfium-review.googlesource.com/30811
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
CFX_XMLElement is the only subclass of CFX_XMLAttributeNode. This CL
merges the two classes together. The {Set|Get}String method has been
renamed to {Set|Get}Attribute to make it clearer what you're retrieving.
Change-Id: I158c961d4d8c5f563d937a3e7a35321a33622562
Reviewed-on: https://pdfium-review.googlesource.com/30710
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This reverts commit 154e18f9a862975abecebe77b8f5fb418418d14c.
Reason for revert: Generate CL to merge to beta branch
Original change's description:
> Return pdfium::span<wchar_t> from WideString::GetBuffer().
>
> Adds bounds checking "for free", but beware of span outliving
> a ReleaseBuffer() call. Scoping as such avoids the possibility
> of using an invalid span (and it is flagged as a lifetime issue).
>
> Change-Id: Ica63f4b1429823d0254ec6951aeaeb08160cb93c
> Reviewed-on: https://pdfium-review.googlesource.com/30310
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ie1ec9434215584a024538ca8edeb59dea555af48
Reviewed-on: https://pdfium-review.googlesource.com/30830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the GetNumbericSymbol method and adds individual methods
for each symbol we retrieve.
Change-Id: Id14108e5ea43a76250e18a1aa13bdbb05e928cdc
Reviewed-on: https://pdfium-review.googlesource.com/30695
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL converts CXFA_XMLLocale to use CFX_XML instead of CXML.
Change-Id: I1db617a658548ae5979f2f38d72c5b3000998663
Reviewed-on: https://pdfium-review.googlesource.com/30693
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds unittests for the CXFA_XMLLocale class.
Change-Id: I1a610754933e5f33e87cb4c13b9bf540e366e6ed
Reviewed-on: https://pdfium-review.googlesource.com/30692
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves the parsing of the XML document into a static method of
CXFA_XMLLocale. This removes the need for CXFA_LocaleMgr to care about
the XML parser used.
Change-Id: I04d14d78f458bfb37f0370fac2eb752e9840bfd6
Reviewed-on: https://pdfium-review.googlesource.com/30390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves code related to shared form detection into the
CPDF_Metadata class. This allows us to hide the usage of CXML inside
CPDF_Metadata.
Change-Id: I547471a2bcc119221565c415a58211c1500cbb3c
Reviewed-on: https://pdfium-review.googlesource.com/30370
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_XMLInstruction handles the <?blah?> blocks at the top of an XML file.
It was inheriting from CFX_XMLAttributeNode in order to store the tag name. This
CL moves the tag name into CFX_XMLInstruction and subclasses from CFX_XMLNode.
Change-Id: I8f7ff0dde19ed43b46d095b0d45df4bf06875af5
Reviewed-on: https://pdfium-review.googlesource.com/30490
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Adds bounds checking "for free", but beware of span outliving
a ReleaseBuffer() call. Scoping as such avoids the possibility
of using an invalid span (and it is flagged as a lifetime issue).
Change-Id: Ica63f4b1429823d0254ec6951aeaeb08160cb93c
Reviewed-on: https://pdfium-review.googlesource.com/30310
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|