Age | Commit message (Collapse) | Author |
|
Calling the Setter when the Getter was intended results in a segv
when accessing the empty return value.
Bug: 353450
Change-Id: If3d35de1c5e2a24d11690fd323253f1103ee9ab5
Reviewed-on: https://pdfium-review.googlesource.com/36431
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Getters should nearly always be const when they return a
non-const pointer to an unowned object. Saves a bit of
code along the way.
Grep for similar occurrences and add "const".
Change-Id: I492bf962a7d62452fa40310146226dc0c8ebb753
Reviewed-on: https://pdfium-review.googlesource.com/35890
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>
|
|
Change-Id: I5dfadcb68e640235be6e3eb7c8d57ae3b8013d26
Reviewed-on: https://pdfium-review.googlesource.com/35691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
This allows compilers targeting the MS ABI to select the correct inheritance
model for the member function pointer type XFA_ATTRIBUTE_CALLBACK using the
complete type of CJX_Object. It will allow us to enable the new Clang flag
-fcomplete-member-pointers globally.
Bug: chromium:847724
Change-Id: I90cedde8c5355e5eb896a93f0e43e6a1e1d09dbc
Reviewed-on: https://pdfium-review.googlesource.com/35190
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Avoid explicitly finding array sizes.
Change-Id: Id51e3d10ea4db0a6375807a53309ce8d68b3b413
Reviewed-on: https://pdfium-review.googlesource.com/34750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change the signature of the constructors to make it impossible to
do this otherwise.
Change-Id: I14e88d98a1128f2d599459ce9337cd6d079469fe
Reviewed-on: https://pdfium-review.googlesource.com/34531
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Consistency with file naming conventions.
No functional change.
Change-Id: I596c4be5bbf0510950c44a7d9d80f59537739c3b
Reviewed-on: https://pdfium-review.googlesource.com/33593
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
When an xfa.event is sent it is possible to change the selStart, selEnd
and change values of the event. This should cause the value of newText
to be changed as needed.
This CL removes m_wsNewText from CXFA_EventParam and instead generates
the new text based on the previous text, the selection and the change.
Bug: 1066
Change-Id: I35d126fad9771c8980654a8af64d2b98989bff3f
Reviewed-on: https://pdfium-review.googlesource.com/32970
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
This CL adds bounds checking for the selStart and selEnd settings of the
event object. The selEnd is not allowed to be less then selStart. They
are also not allowed to be negative. This also clamps them to the length
of the prevText string.
Bug: 1066
Change-Id: Ifc9113c669c83a4a97655554affbbce30c2bfc64
Reviewed-on: https://pdfium-review.googlesource.com/32933
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
According to the XFA Spec only the cancelAction, selStart, selEnd and
change properties of xfa.event are editable. This CL adds checking to
early out if attempting to set any of the other properties.
Bug: 1066
Change-Id: Ie6129e1f65de7584f0b5f3072a1acf6e25d44a2c
Reviewed-on: https://pdfium-review.googlesource.com/32932
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL renames the pValue parameters to the CJX_EventPseudoModel
Property helpers. This makes it a little clearer that the thing we're
setting is _not_ pValue but wsValue.
Bug: 1066
Change-Id: I1f468659c4e241059da0bbe43c461be788cd62a0
Reviewed-on: https://pdfium-review.googlesource.com/32931
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a bit of commented out code to CJX_LogPseudoModel to dump
any xfa.log.message() commands to the terminal. It's commented out as we
don't want it running normally but we can enable as needed.
Change-Id: Ia53759253391cbaa249a1801aa1541213020ad68
Reviewed-on: https://pdfium-review.googlesource.com/32915
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
We never use the return values of these methods, switch to void from
bool.
Change-Id: I8b0d96e5be90ac08281bbb82d2c7205d94abea2b
Reviewed-on: https://pdfium-review.googlesource.com/32616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@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: 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 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
The CXFA_SimpleParser is handling the XFA document parsing. This CL
renames the class to make it clearer that this is the XFA document
parser.
Change-Id: Ia290df2671fba9efa221ae997156ee4846749b02
Reviewed-on: https://pdfium-review.googlesource.com/30231
Reviewed-by: Henrique Nakashima <hnakashima@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>
|
|
This CL moves the code to set the XML node data from CJX_Node to
CXFA_Node. The XML node is owned by the XFA node, not the CJX node so it
makes more sense to have the modifications happen there.
This combines the duplicate code in CJX_Node into a single SetToXML
method.
Bug: chromium:813155
Change-Id: I493725d1412688cb1a0d04bd9ae9fa5a36caebf3
Reviewed-on: https://pdfium-review.googlesource.com/29858
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes proxy methods from CXFA_FFNotify and calls them
directly.
Change-Id: I1fecc625e0b81b659baeffc9ca567c5c20e12c23
Reviewed-on: https://pdfium-review.googlesource.com/29252
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Get things out of the .data section.
Change-Id: I375cf00186a3d5d8d10f5d147bd4b692f5db3683
Reviewed-on: https://pdfium-review.googlesource.com/27130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f
Reviewed-on: https://pdfium-review.googlesource.com/26950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the HasOwnXML flag from the CXFA_Node objects and
instead uses a MaybeOwned pointer to keep track of the XML nodes.
Change-Id: Ie678258247ec21ecb15c639647b189e140586d25
Reviewed-on: https://pdfium-review.googlesource.com/26811
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the UnownedPtr to the CXFA_LayoutItem from CJX_Object.
This is because the CJX_Object will be destroyed by the CXFA_Node which
is destroyed in the CXFA_Document destructor (due to the vector of
unique_ptr being destroyed). The CXFA_LayoutItem will be freed in the
LayoutProcessor which also lives in the CXFA_Document.
Bug: chromium:807215
Change-Id: I86040e154ee2e5d461fc4d3565a10a9181680207
Reviewed-on: https://pdfium-review.googlesource.com/26851
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The SetFlag method has a signature of (flag, bool) which, looking at the
callsites makes you think it will set the flag to the boolean. This
isn't what happens, the flag is always set to true and the boolean
decides if we execute some notification code.
This CL splits SetFlag into SetFlag(flag) and SetFlagAndNotify(flag) to
make it a lot clearer what is happening.
Change-Id: I3e067c87532cce10b94bda10cc88feb62b948eb0
Reviewed-on: https://pdfium-review.googlesource.com/26750
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL marks methods const where possible and removes redundant
methods from CXFA_Document.
Change-Id: I34804425469dfd52469daba68f64a4b511e5d4d0
Reviewed-on: https://pdfium-review.googlesource.com/26730
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the switch from SaveXMLNode and moves the required code
into override methods in the child classes. The method is renamed from
SaveXMLNode to just Save.
Change-Id: I2011b80525e99635c573b4e0cf977e94f6b7cea6
Reviewed-on: https://pdfium-review.googlesource.com/26590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@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>
|
|
This CL removes unused methods from CFX_XMLNode, adds an AppendChild to
handle the case of a -1 index to InsertChildNode, removes the
InsertChildNode return value which is unused and cleans up various other
things.
Change-Id: I3a022e4dc2afffa6893ad11014034dd7ed301f13
Reviewed-on: https://pdfium-review.googlesource.com/26510
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Currently a CXFA_Node can be owned by the CXFA_Document root pointer,
the CXFA_Document Purge list or as a child of another CXFA_Node. This
makes it hard to know who currently owns what.
This CL moves all ownership of nodes into a CXFA_NodeOwner class which
CXFA_Document subclasses. The node owner always owns all nodes and is
responsible for cleaning them up upon destruction. The destruction order
is not guarenteed to be in tree order as nodes can be inserted and moved
around the tree.
Change-Id: I6b202b8e844999ba835093dcdd1a808938b6d9a8
Reviewed-on: https://pdfium-review.googlesource.com/26434
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The layering should be CJS => CFXJS => CFX_V8 with the CJS name
being higher up.
Change-Id: Ic130f248906e9c4df641dd508389b0555786b999
Reviewed-on: https://pdfium-review.googlesource.com/26051
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These belong more properly in CFXJS_Engine, and a small amount of
casting is required to get to the sub-class.
Change-Id: Id954d182b7a7d51fe0a522c04a50a1b362746c72
Reviewed-on: https://pdfium-review.googlesource.com/26050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:798
Change-Id: If6219f06303c78ecc8ddda52dd0095d658148e91
Reviewed-on: https://pdfium-review.googlesource.com/24718
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the two params from NumericLmits which are always set to
the same value and retrieves the values in the method itself.
Change-Id: Ibeabdc7187faa58e93ffbe00063171fec0842256
Reviewed-on: https://pdfium-review.googlesource.com/24717
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up some of the code around passing input information
around.
Change-Id: Id3c1ffa93c9e50c3b6312b15533ccc32c7406264
Reviewed-on: https://pdfium-review.googlesource.com/24710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL folds the GetNodeSameClassIndex, GetNodeSameNameIndex from
CXFA_Node into the CJX_Tree callsites.
Change-Id: Ia4f7750543e786ddd82abb4b6b4bde1bf1710f19
Reviewed-on: https://pdfium-review.googlesource.com/24471
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the UIType to an XFA_FFWidgetType instead of reusing
the XFA_Element type. The creation code is cleaned up to make it clearer
what's happening.
Change-Id: I5d3e4967d5c8b8a50dbb25e574b0d31fe0cf407a
Reviewed-on: https://pdfium-review.googlesource.com/24390
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|