Age | Commit message (Collapse) | Author |
|
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 one unused flag and inlines the check for if the node
has an owned XML node.
Change-Id: Id750192b37f09901a81e2faaa929a81d2262d4c7
Reviewed-on: https://pdfium-review.googlesource.com/26770
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
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>
|
|
This CL adds a prev_sibling_ pointer into CXFA_Node and updates the code
as needed.
Change-Id: I3125f59780da34dc26a176c7264a31335be528fe
Reviewed-on: https://pdfium-review.googlesource.com/26410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds tests for CXFA_Node::InsertChild and CXFA_Node::RemoveChild
methods.
Change-Id: I6ef9e76dfbfa8a9b8246620ecf80c88812b332fc
Reviewed-on: https://pdfium-review.googlesource.com/26371
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL changes the CXFA_Node parent pointer back to a raw pointer from
an UnownedPtr. The other tree pointers have been renamed for clarity.
Change-Id: I366a0b5b41d49d87b11bec0eea9890fbc79c1c62
Reviewed-on: https://pdfium-review.googlesource.com/26370
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit f0e386de64e030f6d692acfa27e2bc0a50018710.
Reason for revert: After chatting with tsepez@, we've got a better direction to take these changes.
Original change's description:
> Convert CXFA_Node to store a vector of children
>
> This CL changes CXFA_Node to use a vector of nodes as children instead
> of a singly linked list of siblings and child pointers.
>
> Change-Id: Ica8219f63d783a07d90b9541ae62a35c49166e44
> Reviewed-on: https://pdfium-review.googlesource.com/26030
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: I115779a292d39694ad5faf0b748a617c491b40f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/26070
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CXFA_Node to use a vector of nodes as children instead
of a singly linked list of siblings and child pointers.
Change-Id: Ica8219f63d783a07d90b9541ae62a35c49166e44
Reviewed-on: https://pdfium-review.googlesource.com/26030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the unused return values from InsertChild and
RemoveChild methods in CXFA_Node.
Bug: chromium:807863
Change-Id: Iac468afc5c48f51e7df3ea12d11b128a0ac124ea
Reviewed-on: https://pdfium-review.googlesource.com/25670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL converts the CXFA_Node parent pointer to be an Unowned pointer
instead of a raw pointer.
Bug: chromium:807863
Change-Id: I266c9216cfe8153e234bf66b88fbac6c8d96ebb4
Reviewed-on: https://pdfium-review.googlesource.com/25650
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL replaces XFA_ItemLayoutProcessor_IsTakingSpace with a
PresenceRequiresSpace call on CXFA_Node.
Change-Id: Ibf570f25eeb3404d72e87cb62e06a7ad70f0916f
Reviewed-on: https://pdfium-review.googlesource.com/24850
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: 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 moves more code out of the CXFA_Node class and into specific
subclasses.
Change-Id: Idca36f251431bf7efd4da045aeabf097ab23f0ce
Reviewed-on: https://pdfium-review.googlesource.com/24714
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves some of the code specific to CheckButtons out of CXFA_Node
and into the CXFA_CheckButton class. The CheckButton is passed as a
parameter to the CXFA_FFCheckButton class.
Change-Id: I3344c484d90e3b8d1024024a2851685044113a23
Reviewed-on: https://pdfium-review.googlesource.com/24711
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL combines some ComboBox with ListBox code to remove duplication
when dealing with choice lists.
Change-Id: I735b6596c67aaf80ab96573af5c8d81e7875c27c
Reviewed-on: https://pdfium-review.googlesource.com/24551
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Make methods private or remove if not needed.
Change-Id: I2f9f718ba08a4b49332c896d2385ec60cf9cf01b
Reviewed-on: https://pdfium-review.googlesource.com/24490
Reviewed-by: Henrique Nakashima <hnakashima@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 moves the barcode specific code out of CXFA_Node and into
CXFA_Barcode. The CXFA_FFBarcode widget was modified to take the barcode
as a parameter.
Change-Id: I8ff91cb58402665f4ba63f2eeced45feeaa9ff50
Reviewed-on: https://pdfium-review.googlesource.com/24450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
This CL cleans up some of the code around creating the XML nodes related
to the UI widgets.
Change-Id: Ib91364439ab039f46e44690e92cc0cb93a8da203
Reviewed-on: https://pdfium-review.googlesource.com/23770
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CreateUIChild to be a method on node instead of
accepting the node as a parameter.
Change-Id: I5bf84cee010c1c02966def987a3bc2bcc7db0324
Reviewed-on: https://pdfium-review.googlesource.com/23690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the node scaffolding added when merging CXFA_WidgetAcc
into CXFA_Node.
Change-Id: I02a6b80d2c910816b1aec613078d4871c29369b3
Reviewed-on: https://pdfium-review.googlesource.com/23650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the calls to CXFA_Node::GetWidgetAcc() as they
redundantly return the node they were called upon.
Change-Id: I46e66cf98137a1dee7cd3fa8bc7d379eb97fded5
Reviewed-on: https://pdfium-review.googlesource.com/23630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL merges CXFA_WidgetAcc into CXFA_Node.
Change-Id: Iab52ca7f98c9dcd4ab089c61b8f1324a565bf647
Reviewed-on: https://pdfium-review.googlesource.com/23610
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes CXFA_WidgetAcc from CXFA_FFWidgetHandler and uses
CXFA_Node directly.
Change-Id: I88cf1edc53f4489aeac018a95e9d5936d85106db
Reviewed-on: https://pdfium-review.googlesource.com/23450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This Cl converts the code which retrieved the containers WidgetAcc to
retrieve the container itself and then get the WidgetAcc from the
container.
Change-Id: Ib279a150500d1204e3d18f11f6a638c1f6c368ec
Reviewed-on: https://pdfium-review.googlesource.com/23350
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the widget_acc storage and the is_widget_ready flag from
CXFA_Object to CXFA_Node.
Change-Id: I96aeb38a854f227985a5549dc67f1b84d924abb8
Reviewed-on: https://pdfium-review.googlesource.com/23330
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves the m_bIsNull and m_bPreNull flags from CXFA_WidgetAcc to
CXFA_Node.
Change-Id: Ibdcdb8611699d6d908ab3c6ed05cbce7bba872ae
Reviewed-on: https://pdfium-review.googlesource.com/23310
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the methods and members related to the UI nodes from the
CXFA_WidgetAcc class to the CXFA_Node class.
Change-Id: I1fdc5173787141065f1e607bbfefa3b22af738b4
Reviewed-on: https://pdfium-review.googlesource.com/23290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Including cjx_node.h pulls in v8 headers for many XFA files.
Change-Id: I80a32d0a56b8de5787db5275db48c568da6d0144
Reviewed-on: https://pdfium-review.googlesource.com/22890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it clearer that GetExclGroup can return nullptr.
Change-Id: Ica9bdfb05be36b3b6ede20f8b54daac1154506fd
Reviewed-on: https://pdfium-review.googlesource.com/22739
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Rename GetItem to make it clearer it can return nullptr.
Change-Id: I0e09a79c3e2244b08212d3b51d3ad0e6a86edfd9
Reviewed-on: https://pdfium-review.googlesource.com/22713
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it clear that CreateInstance may return nullptr.
Change-Id: I82f172a671761eae9055b0e9e55ab0e5a7d599aa
Reviewed-on: https://pdfium-review.googlesource.com/22712
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
These two accessors exist with other names or signatues, remove.
Change-Id: Ieac073b746553160e4f2c41d9b63be47ad0ab61f
Reviewed-on: https://pdfium-review.googlesource.com/22711
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the name to make it clearer the item an return nullptr.
Change-Id: Icc5dbbf5ec3b9a8c73c6aaec585fdd61e2351c75
Reviewed-on: https://pdfium-review.googlesource.com/22710
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it clear that GetFormValue can return nullptr and fixes up
a few callsites as needed.
Change-Id: Id2e85b0956a678b5b338b9e2a4d32731fe6c4729
Reviewed-on: https://pdfium-review.googlesource.com/22690
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetDefaultValue can return nullptr.
Change-Id: I871704e291358bc85a554e4f6410953f7223c61d
Reviewed-on: https://pdfium-review.googlesource.com/22683
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the validation methods to make it clear they can return
nullptr.
Change-Id: I60d0c41cdfe9902049d99cd790f851517b11a6d9
Reviewed-on: https://pdfium-review.googlesource.com/22682
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetCalculate can return nullptr.
Change-Id: I587e3bb442df3661f083f7058ff02a8d62478ed5
Reviewed-on: https://pdfium-review.googlesource.com/22681
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames GetPara to make it explicit it can return nullptr.
Change-Id: I7c6529c15646b9947964e25a8d28938b38f091d6
Reviewed-on: https://pdfium-review.googlesource.com/22680
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetTemplateNodeIfExists can return
nullptr. Various call sites are updated as needed.
Change-Id: If6edd5962b59e7e4ce3dbe9bbdc957783cf76abe
Reviewed-on: https://pdfium-review.googlesource.com/22678
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetOccurIfExists can return nullptr and
fixes up the call sites.
Change-Id: I542d0098aa316632239df7f1a5796b4ffe6ba202
Reviewed-on: https://pdfium-review.googlesource.com/22676
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetMargin may return a nullptr.
Change-Id: I46780e8df9e966accc38baf56f8aa5149533db87
Reviewed-on: https://pdfium-review.googlesource.com/22675
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetOrCreateFontIfPossible can return
nullptr.
Change-Id: Ib5be6995e4225ad596dfb78a94f0bc56802716cc
Reviewed-on: https://pdfium-review.googlesource.com/22674
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetFont may return nullptr.
Change-Id: Icb7ec5ad4ed6c5f7a728230d1237898b8f2fd778
Reviewed-on: https://pdfium-review.googlesource.com/22673
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetOrCreateBorderIfPossible can return a
nullptr.
Change-Id: I41d5e7ee506e95d95349e1e06198e40e8afa073c
Reviewed-on: https://pdfium-review.googlesource.com/22672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames GetCaption to GetCaptionIfExists to make it clear the
value returned can be a nullptr. The various callsites have been fixed
which used the caption without validating.
Change-Id: I9b600ac9ab5b9e04dfa6e8cee95ef3e9d629688d
Reviewed-on: https://pdfium-review.googlesource.com/22670
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Renaming GetBorder makes it clear that the method may return a nullptr.
Change-Id: I50a8b511e273552e3a4a226ba72a7c0e2ae74ea3
Reviewed-on: https://pdfium-review.googlesource.com/22653
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_Node::GetNodeItem(kind, object_type) method in
favour of explicit methods. All of the callers passed in a
XFA_ObjectType::ContainerNode.
Change-Id: I713184d3fa188a122284f50ac2a6b0fd3d7aed26
Reviewed-on: https://pdfium-review.googlesource.com/22651
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|