summaryrefslogtreecommitdiff
path: root/xfa/fxfa
AgeCommit message (Collapse)Author
2018-01-30Move CheckButton code from CXFA_Node to CXFA_CheckButtonDan Sinclair
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>
2018-01-29Cleanup some ChoiceList codeDan Sinclair
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>
2018-01-29Add common base class between CXFA_FFComboBox and CXFA_FFListBoxDan Sinclair
This CL adds a CXFA_FFDropDown to serve as a base class for the CXFA_FFComboBox and CXFA_FFListBox and adds a virtual InsertItem and DeleteItem methods. Change-Id: I325ffc579ed42a4755bae0c4d18667f8a9458950 Reviewed-on: https://pdfium-review.googlesource.com/24550 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-29Cleanup CXFA_Node visibilityDan Sinclair
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>
2018-01-29Fold single caller methods into callsiteDan Sinclair
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>
2018-01-29Move barcode code to CXFA_BarcodeDan Sinclair
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>
2018-01-29Cleanup the FFWidget determination code.Dan Sinclair
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>
2018-01-25Remove empty FF classesDan Sinclair
This CL removes the empty FFDraw and FFSubForm classes and uses the FFWidget base class directly. Change-Id: If65ee85fda78774bb90d6fec60ca5529cc37f3e0 Reviewed-on: https://pdfium-review.googlesource.com/23971 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-25Remove draw from creatable widgetschromium/3333Dan Sinclair
The Draw element is one of the two cases where we will determine an actual widget type. This CL removes the FFDraw from the widgets which can be created directly. Change-Id: I74d53b736d73cf0d88c6177b4e1d14e73497bf60 Reviewed-on: https://pdfium-review.googlesource.com/23970 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-24Move retrieval of UIChild earlier in CreateUIChildDan Sinclair
This CL shifts the retrieval of the UI child earlier in the method so we can group all of the code which sets the widget type. Change-Id: Iabdbd7ae2e6d3f648ce78e93c263be66f62946ba Reviewed-on: https://pdfium-review.googlesource.com/23790 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-24Rename eUIType for clarityDan Sinclair
This CL renames eUIType to make it clear it's the type for the value node we need to create, not the UI node we're creating. Change-Id: I7ffe86b07a2ccf81114e7d1a6a41f520b864a61f Reviewed-on: https://pdfium-review.googlesource.com/23771 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-24Cleanup CreateUIChild node creationDan Sinclair
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>
2018-01-24Cleanup CreateUIChild pUI usageDan Sinclair
This CL cleans up the usage of pUI in CreateUIChild. The node can't be null per spec so ASSERT that's true. Cleanup the search for children to make it clearer what is happening. Change-Id: I856de8ebf89fe0bc61942e7ad2a1131a7878c511 Reviewed-on: https://pdfium-review.googlesource.com/23730 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-24Update code to assume a Value node exists.Dan Sinclair
When we retrieve the first Value node from a Field or a Draw element it either must exist, or must be created. If that doesn't happen something has gone very wrong. Change-Id: I818aaf9d361336c898035fe542e5b37a33fef0ea Reviewed-on: https://pdfium-review.googlesource.com/23710 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-24Make CreateUIChild a method of CXFA_NodeDan Sinclair
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>
2018-01-24Clarify CreateUIChild is only for Field or Draw elementsDan Sinclair
This CL changes the code to only call CreateUIChild for Field and Draw elements. Other types are handled all the callsite. Change-Id: I2dd2553c14ebc1f0849b3bfd311e75ad8922aa0d Reviewed-on: https://pdfium-review.googlesource.com/23670 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Remove CXFA_Node::GetNode and m_pNodeDan Sinclair
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>
2018-01-23Remove GetWidgetAcc callsDan Sinclair
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>
2018-01-23Merge CXFA_WidgetAcc into CXFA_Nodechromium/3330Dan Sinclair
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>
2018-01-23Remove CXFA_WidgetAcc from CXFA_FFDocView methodsDan Sinclair
This CL updates CXFA_FFDocView methods and members to use CXFA_Node objects instead of CXFA_WidgetAcc objects. Change-Id: Ic79af39ef49152a6d50ed5acfc153063db39353d Reviewed-on: https://pdfium-review.googlesource.com/23590 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Cleanup CXFA_FFDocView headerDan Sinclair
This CL removes unused methods, makes internal methods private and removes unused default params. Change-Id: Ic83a97e3f751a49d3f9fc7c157e8d34a62818cd5 Reviewed-on: https://pdfium-review.googlesource.com/23570 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Remove unused CXFA_FFDocView::ProcessWidgetEventDan Sinclair
Not called, removed. Change-Id: I2921407ed1b0e13763fcd150a092f4c2b45eb440 Reviewed-on: https://pdfium-review.googlesource.com/23531 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Remove CXFA_FFDocView::GetWidgetAccByNameDan Sinclair
This CL folds GetWidgetAccByName back into GetWidgetByName. Change-Id: I48c0aa443c92adfff27c1001f6dc90084b7bc8c3 Reviewed-on: https://pdfium-review.googlesource.com/23530 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Use accessor for WidgetAccDan Sinclair
This CL removes places where we store CXFA_WidgetAcc into a variable and uses the accessor from CXFA_Node instead. This will ease the removal of CXFA_WidgetAcc. Change-Id: I7a6cb0079bb119481a5ae60679a537799b3be2c9 Reviewed-on: https://pdfium-review.googlesource.com/23510 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Convert CXFA_WidgetAccIterator to CXFA_ReadyNodeIteratorDan Sinclair
This CL converts the WidgetAcc iterator to return nodes in which the OnReady event has been fired. Change-Id: I5ec6809c1610ac3467019d8492121901d3845a37 Reviewed-on: https://pdfium-review.googlesource.com/23490 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Remove CXFA_WidgetAcc from CXFA_FFField::CalculateNodeDan Sinclair
This CL changes CXFA_FFField::CalculateNode to use a CXFA_Node instead of a CXFA_WidgetAcc. Change-Id: I305e0d48f321df845ca2c1ff0f446d201ae7b3fb Reviewed-on: https://pdfium-review.googlesource.com/23471 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Cleanup WidgetAcc forward declareschromium/3329Dan Sinclair
Remove CXFA_WidgetAcc forward declarations from files which don't need them. Change-Id: I5014872f78e764024590852b920901a49966eff6 Reviewed-on: https://pdfium-review.googlesource.com/23470 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Convert CXFA_EventParam to store a CXFA_NodeDan Sinclair
This CL changes the CXFA_EventParam code to store a CXFA_Node instead of a CXFA_WidgetAcc. Change-Id: I21510674b0b6435ca9b87bfbf97914f54e5e3464 Reviewed-on: https://pdfium-review.googlesource.com/23451 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-22Convert CXFA_FFWidgetHandler to use CXFA_NodeDan Sinclair
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>
2018-01-22Remove GetLocale from CXFA_WidgetAccDan Sinclair
This CL removes the GetLocale method from CXFA_WidgetAcc and calls the CXFA_Node method directly. The node is always provided to CXFA_WidgetAcc so an asset is added and subsequent checks removed. Change-Id: I7495cd3a9678762e9e6fdecdf13104604d190280 Reviewed-on: https://pdfium-review.googlesource.com/23430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-22Remove CXFA_WidgetAcc from CXFA_FFNotifyDan Sinclair
This CL updates CXFA_FFNotify to use CXFA_Node instead of CXFA_WidgetAcc in its methods. Change-Id: I5036767f439ba0794a7b2b9df1898aad8390f987 Reviewed-on: https://pdfium-review.googlesource.com/23411 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Remove unused WidgetPreRemove and WidgetPostAdd paramsDan Sinclair
This CL removes the unused WidgetAcc param from both methods and updates callsites as needed. The include for cxfa_widgetacc.h was removed from fxfa.h and had to be inserted in locations where needed. Change-Id: I55ae9e935a948dff3b6d906b4567665e60530eba Reviewed-on: https://pdfium-review.googlesource.com/23391 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Convert CXFA_TextProvider to use a CXFA_NodeDan Sinclair
This CL changes CXFA_TextProvider to accept a CXFA_Node instead of a CXFA_WidgetAcc. The internal uses were updated as needed. Change-Id: Iaa9e4024371a3ae9521caf1444b298fb3710f829 Reviewed-on: https://pdfium-review.googlesource.com/23390 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Change GetContainerWidgetAcc to GetContainerNodeDan Sinclair
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>
2018-01-22Move WidgetAcc and IsWidgetReady to CXFA_NodeDan Sinclair
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>
2018-01-22Move IsNull and PreNull to CXFA_NodeDan Sinclair
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>
2018-01-22Move the UI elements from CXFA_WidgetAcc to CXFA_NodeDan Sinclair
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>
2018-01-22Add flag to notify if a node widget is readyDan Sinclair
This CL updates CXFA_Object to have a flag which annotates if the node is ready. Ready means that we've gone through the OnNodeReady call in CXFA_FFNotify. Previously we'd check if the WidgetAcc exists on the node which is created in OnNodeReady. This CL replaces all the points where we check for a WidgetAcc existing with a IsWidgetReady() call. Change-Id: I54e8160269c3104cdae7a516c1814c13bee15130 Reviewed-on: https://pdfium-review.googlesource.com/23190 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-18Move XFA_IsCreateWidget to CXFA_ObjectDan Sinclair
This CL removes the free XFA_IsCreateWidget method and moves the functionality into CXFA_Object::HasCreatedUIWidget to clarify the purpose. Change-Id: Icca1f49238040b5d87fbb4eb33340f9309f5e2f3 Reviewed-on: https://pdfium-review.googlesource.com/23133 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-18Remove more unneeded includes and code from headers.Lei Zhang
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17 Reviewed-on: https://pdfium-review.googlesource.com/22891 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-17Remove redundant GetNodeDan Sinclair
The WidgetAcc of a node will return the node from GetNode. So, calling GetNode()->GetWidgetAcc()->GetNode() will return the same thing as GetNode(). Change-Id: I82bffb191fd539a6f9b1e4a72e8ffcba1bdc1cc9 Reviewed-on: https://pdfium-review.googlesource.com/23132 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Do more forward declarations in cxfa_node.h.Lei Zhang
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>
2018-01-17Move code related to stroke line dash to CXFA_StrokeDan Sinclair
This CL moves XFA_StrokeTypeSetLineDash into the CXFA_Stroke class and cleans up the unused CXFA_Graphics code for setting line dash values. Change-Id: If6db6c315571dbcea630bc32e0d05dae6c0f10be Reviewed-on: https://pdfium-review.googlesource.com/23114 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Cleanup some CXFA_Box methodsDan Sinclair
Shuffle some code around, make things a little cleaner. Change-Id: I4cbdf4fc7e7d0a372cdc5cb63b45ca196a037543 Reviewed-on: https://pdfium-review.googlesource.com/23113 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Rename box arc methods for clarityDan Sinclair
This CL renames the CXFA_Box arc methods to make it clear they aren't just for handling arcs. Change-Id: Id2fa16c572f9529d6a13a921d59c2dcbf8a50b7a Reviewed-on: https://pdfium-review.googlesource.com/23112 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Move GetFillpath to CXFA_RectangleDan Sinclair
This CL moves the code related to getting the fill path for rectangles to the CXFA_Rectangle class. Change-Id: I83c43c259d2decadaeb99d1f081f3972ddf8294e Reviewed-on: https://pdfium-review.googlesource.com/23111 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Move rectangle drawing code to CXFA_RectangleDan Sinclair
This CL moves code related to drawing rectangles to the CXFA_Rectangle class. This also turns CXFA_Border into a CXFA_Rectangle to share the drawing code. Change-Id: I91e2e73b33ecbcda477cf953cf7609310a01fcd4 Reviewed-on: https://pdfium-review.googlesource.com/23110 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Move fill draw code to fill classesDan Sinclair
This CL moves the code related to drawing fills and the various types of fill to the specific fill classes. Change-Id: Ie151089b00ca96c5fa88d22ab5f697d9425297cd Reviewed-on: https://pdfium-review.googlesource.com/23071 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Move the box drawing code to CXFA_BoxDan Sinclair
This CL moves the code related to drawing boxes from CXFA_FFWidget to CXFA_Box. Change-Id: Ie69c59bb0b1eda1fcedbc26c6f8f30d53e2e268c Reviewed-on: https://pdfium-review.googlesource.com/23070 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-17Remove flags param from CXFA_ImageRendererDan Sinclair
The flags are always set to the same value. This CL removes them and inlines the value as needed. Change-Id: I379a053aee31829229d83291d666904564b99aea Reviewed-on: https://pdfium-review.googlesource.com/23057 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>