summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
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>
2018-01-17Remove transparency flag from CompositeDIBitmapDan Sinclair
The transparency flag was always false, this CL removes the flag and any code as needed. Change-Id: Ia4aecd7919b17c446c1b59361042e6a7444064af Reviewed-on: https://pdfium-review.googlesource.com/23056 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Remove m_BlendType from CXFA_ImageRendererDan Sinclair
The m_BlendType flag was never changed from the default. Removed. Change-Id: I0b347369339babf273c43861715d67f2f6bbfb17 Reviewed-on: https://pdfium-review.googlesource.com/23055 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Remove m_bPrint from CXFA_ImageRendererDan Sinclair
Remove the m_bPrint value from CXFA_ImageRenderer which is always false. Change-Id: Id4b1ea3328d1a7627526a503a8cd94a31e3c6091 Reviewed-on: https://pdfium-review.googlesource.com/23054 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Remove m_Result from CXFA_ImageRendererDan Sinclair
The m_Result value is set but never used. Remove. Change-Id: Iba9e9a27b5d08072e2f810e0c6f574cb6880c87b Reviewed-on: https://pdfium-review.googlesource.com/23053 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Remove bitmap ARGB from CFX_ImageRendererDan Sinclair
This CL removes the fill ARGB value from CFX_ImageRenderer which is always set to 0. Change-Id: I445abd6268c14f05184988177b2fa6b80f50d41d Reviewed-on: https://pdfium-review.googlesource.com/23052 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Remove bitmap alpha from CXFA_ImageRendererDan Sinclair
The bitmap alpha value is always set to 255, this CL removes the parameter and passes 255 directly where needed. Change-Id: I435fbdd00121cae4dda0e2a790b339993f5e8a07 Reviewed-on: https://pdfium-review.googlesource.com/23051 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-17Fold CXFA_ImageRenderer::Start into constructorDan Sinclair
This CL moves the code to initialize the variables into the constructor and changes the Start command into the StartDIB command. Change-Id: Iba3c1dcd9a872b4e2a1eadf87050f39c73b8e704 Reviewed-on: https://pdfium-review.googlesource.com/23050 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-16Clean up xfa/fde/cfde_textout.h.Lei Zhang
- Move enums/structs other than CFDE_TextOut to a separate header. - Move CFDE_TTOLine into CFDE_TextOut. Change-Id: I63196ebe6c02bc88d1c20ecb625505013edbfa26 Reviewed-on: https://pdfium-review.googlesource.com/22930 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-16Move CXFA_ImageRenderer to own fileDan Sinclair
This CL Splits CL_ImageRenderer out of CXFA_FFWidget and moves to a separate file. Methods in CXFA_FFWidget are shuffled around to put the global methods at the top of the file and static methods in the anonymous namespace. Change-Id: I9887a5c9bf9fda63deead7ff785dc4ef3d7e15c8 Reviewed-on: https://pdfium-review.googlesource.com/23031 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-16Move StrokePath to the CXFA_Stroke classDan Sinclair
This CL moves the code to draw the stroke path to the stroke class. Change-Id: I76ae96e15a166d8bae19618c762d5ad923ed8d8a Reviewed-on: https://pdfium-review.googlesource.com/23030 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-16Remove CXFA_Graphics::StretchImage() and related code.Lei Zhang
It is never used. Change-Id: I46c8202cb9e449317fdc1889ff9a610d5ea15d92 Reviewed-on: https://pdfium-review.googlesource.com/22910 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-16Rename flag to make usage clearerDan Sinclair
The CXFA_FFWidget::DrawBorderWithFlags method only takes one flag to force rounded drawing. This CL renames the int32_t flags to a simple bool to make the usage clear. Change-Id: I4fb552dc77ce76e35225b15d15f2edbb7f5dcf01 Reviewed-on: https://pdfium-review.googlesource.com/23010 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-16Add support for XFA specific FormField typesRyan Harrison
This adds to form field types specific types for XFA form fields to be used instead of the generic XFA value when possible. BUG=pdfium:952,chromium:763129,chromium:592758 Change-Id: I8d1cff6a280d71db348b7c31a251cbe2e398ec79 Reviewed-on: https://pdfium-review.googlesource.com/22677 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-01-16Rename CXFA_Value methods for clarityDan Sinclair
This CL marks the methods in CXFA_Value to make it clear which can return nullptr and updates callsites as needed. Change-Id: If1f794bcbbddaa57a1efdd67195df58a77b4373a Reviewed-on: https://pdfium-review.googlesource.com/22773 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-16Rename CXFA_Validate methods for clarityDan Sinclair
This CL updates GetScript to make clearer it can return nullptr. Change-Id: Ic0cf74b3f592dd413ce6fb7a38b29f70487a8dd5 Reviewed-on: https://pdfium-review.googlesource.com/22772 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-16Rename CXFA_Line methods to make clearerDan Sinclair
This CL clarifies that he CXFA_Line::GetEdge method can return nullptr. Change-Id: I785d4636126727e07a80afb001489bd00ec9ae9e Reviewed-on: https://pdfium-review.googlesource.com/22771 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-16Cleanup CXFA_FillDan Sinclair
This CL cleans up the CXFA_Fill internal getters to handle nullptr returns correctly and moves some of the logic to the specific XFA classes. Change-Id: Icac487105a026a25cc9981d00fbc152e459ad0b8 Reviewed-on: https://pdfium-review.googlesource.com/22770 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Event methodsDan Sinclair
This CL renames CXFA_Event methods for clarity and fixes callers where needed. Change-Id: I902a35f36ee91c1b4aadd10382d93988ef26dc1c Reviewed-on: https://pdfium-review.googlesource.com/22750 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Caption methods for clarityDan Sinclair
This CL renames the CXFA_Caption methods to make it clearer they can return nullptr. Change-Id: I1b4945fcd2615f16a128709b7fe07e1236a5461a Reviewed-on: https://pdfium-review.googlesource.com/22743 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Calculate methods to make return clearerDan Sinclair
This CL renames CXFA_Calculate::GetScript to make it clearer it can return nullptr. Change-Id: I1f5c19c16ea6cb1b3e7016ddac3f7f7fd6aa0320 Reviewed-on: https://pdfium-review.googlesource.com/22741 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Box methods to make return clearerDan Sinclair
This CL renames the methods in CXFA_Box to make it clearer they can return nullptr. Change-Id: I521c0e06af306f69e390a4057cabb7777a0d72f5 Reviewed-on: https://pdfium-review.googlesource.com/22740 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetExclGroup to GetExclGroupIfExistsDan Sinclair
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>
2018-01-11Rename GetItem to GetItemIfExistsDan Sinclair
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>
2018-01-11Rename CreateInstance to CreateInstanceIfPossibleDan Sinclair
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>
2018-01-11Cleanup duplicate CXFA_Node accessorsDan Sinclair
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>
2018-01-11Rename GetBind to GetBindIfExistsDan Sinclair
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>
2018-01-11Rename GetFormValue to GetFormValueIfExistsDan Sinclair
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>