Age | Commit message (Collapse) | Author |
|
Change-Id: Iaca5983f080d8a05d2d4e9f79c335c4ebcdc6899
Reviewed-on: https://pdfium-review.googlesource.com/31994
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
When setting up an XFA document we need to create a font manager. That
font manager requires the CFGAS_FontMgr to be provided, and ASSERTs to
that fact. It's possible for the CFGAS_FontMgr to be nullptr if we fail
to enumerate the system fonts.
This CL verifys we can get the needed manager and fails out of the XFA
OpenDoc method if we have no font manager.
Bug: chromium:835693
Change-Id: I806f265075dcc355e0a7aeb4b3ae8eb950aa5eee
Reviewed-on: https://pdfium-review.googlesource.com/32052
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Removed many null checks since XFA_RectWithoutMargin already checks
if the margin is null internally.
Change-Id: I21f5101fe38559eb02f4c3aaf081ff29ce293e47
Reviewed-on: https://pdfium-review.googlesource.com/31993
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
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>
|
|
Change-Id: Ic19b91f91f08b1867437b22de04a2c54045ce8ae
Reviewed-on: https://pdfium-review.googlesource.com/31992
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ifbcb727402c1c28a6e8abe02511d6da6828c02f7
Reviewed-on: https://pdfium-review.googlesource.com/31915
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
When we fail to parse an XFA document we would free the XML document
that is created immediately. This causes issues because the XML nodes
may have been set into the CXFA_Document already. This CL changes
ParseDoc to always save the XMLDocument and then triggers the CloseDoc()
logic if the ParseDoc method fails.
This should properly cleanup any resources on a failed document load.
Bug: chromium:837578
Change-Id: I8af7e6e34e3b756455c58ea50b22af414ffa6cbf
Reviewed-on: https://pdfium-review.googlesource.com/31710
Commit-Queue: dsinclair <dsinclair@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 was a bug introduced in a refactor a long, long time ago.
A line was removed (probably unintentionally).
https://chromiumcodereview.appspot.com/2435603003/diff/40001/xfa/fxfa/app/xfa_fwltheme.cpp
Bug: pdfium:751
Change-Id: I0e3d094a543bd0e31010a8093387906d62c0a5dc
Reviewed-on: https://pdfium-review.googlesource.com/31830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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:751
Change-Id: I27c4cf96c1b0d314ace8461ca6020c1034eff646
Reviewed-on: https://pdfium-review.googlesource.com/31650
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Follow requested in review after submit.
BUG=chromium:835608
Change-Id: I958a35f1cdaadbdb21e7c86b8c5b297ef01a2503
Reviewed-on: https://pdfium-review.googlesource.com/31316
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The current implementation of this class potentially does a lot of
work in the constructor. Specifically when getting a calendar font it
might cause the whole font loading pipeline to run. This can fail if
it is unable to load fonts.
Breaking out the font loading part, so that the factory method can
return nullptr if it fails. Additionally adding a guard for the case
the font manager fails to load, which is the root cause of the crash
in the bug.
BUG=chromium:835608
Change-Id: I05b987aaad6f0814907066904331610a7fbb7f70
Reviewed-on: https://pdfium-review.googlesource.com/31330
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@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>
|
|
Add FORM_CanUndo(), FORM_CanRedo(), FORM_Undo(), and FORM_Redo().
BUG=chromium:764260
Change-Id: I1d9ea67152d9b35d9b8e1d7ef7d019706fdfa30a
Reviewed-on: https://pdfium-review.googlesource.com/30872
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I8a842bbd770ce8ae740d4bad8fba00ce6a5801c9
Reviewed-on: https://pdfium-review.googlesource.com/30874
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6b0d46d913c55de592f10de5bd31a6520b16cd2f
Reviewed-on: https://pdfium-review.googlesource.com/30873
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
If there is a focused form field, get its text.
BUG=chromium:753216
Change-Id: I05294f14d05c1c86769055f6c9eaf9177787d9fd
Reviewed-on: https://pdfium-review.googlesource.com/12072
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
This CL removes the import data behaviour as it was never called and
cleans up the m_bDocumentParser flag as it will always be used in the
true case.
Change-Id: If90a0a55cc76f406e9987aa71580e90edeaa01ba
Reviewed-on: https://pdfium-review.googlesource.com/30292
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@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 changes CXFA_FFDoc to no longer use the CXFA_FFApp to create the
document, it does it directly. The stream data is not stored in the
FFDoc anymore as it is only used once.
Change-Id: I8247d2fb0324e554250ff0a03c67f067ef46e437
Reviewed-on: https://pdfium-review.googlesource.com/30270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|