summaryrefslogtreecommitdiff
path: root/fxjs/xfa
AgeCommit message (Collapse)Author
2017-12-14Add type information to CJX_Object::GetPropertyDan Sinclair
This CL adds a type template to the CJX_Object::GetProperty method so we can have the correct types returned. Change-Id: Ieda8ec4bd31d26a1e71af30f08b48eb826f5993d Reviewed-on: https://pdfium-review.googlesource.com/21250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Add types to the CXFA_Node::Get*{Child|Sibling}* methodsDan Sinclair
This CL templates the various Get methods in CXFA_Node in order to return the correct node type. Change-Id: I4f50df6dd9213873deb8f8f262eaf579c6c4ca7d Reviewed-on: https://pdfium-review.googlesource.com/21230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Change CXFA_Node::GetChild to return proper typesDan Sinclair
Currently CXFA_Node::GetChild always returns a CXFA_Node* object. We know the type we want when we call GetChild, so this CL changes the code to add a template parameter to GetChild and return the correct CXFA_Node subtype for the desired element. Change-Id: I5aecf2e840504235dc246483abee48e0564841fe Reviewed-on: https://pdfium-review.googlesource.com/21210 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Fold CXFA_ValueData into CXFA_ValueDan Sinclair
The CXFA_ValueData class is a thin wrapper around the CXFA_Value, this CL moves the methods from CXFA_ValueData into CXFA_Value. Change-Id: I2c57e93e5c4675b82af71cf75f2dfc0fb12e4b20 Reviewed-on: https://pdfium-review.googlesource.com/21170 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-12-14Fold CXFA_ValidateData into CXFA_ValidateDan Sinclair
The ValidateData class is a thin wrapper around the Validate class. Now that the Validate class exists we can fold the methods from ValidateData into Validate. Change-Id: I1e72f4b7bddeb22a311f4fe9a5940204221b6d2a Reviewed-on: https://pdfium-review.googlesource.com/21150 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Create classes for XFA JS objectsDan Sinclair
This CL creates classes for the various XFA JS objects. The method calls from xfa_basic_data_element_script have been modified to call these methods instead of methods in CJX_Object. Change-Id: Idb2de38656f7e8edc559d44921eba25073e6c806 Reviewed-on: https://pdfium-review.googlesource.com/21110 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-12-13Methods are on CJX_Object not CJX_Node nowDan Sinclair
This CL converts all of the JSNode() to JSObject() calls as all of the original CJX_Node methods have been moved to CJX_Object. This fixes potential bad casts from things like CJX_Content which do not inhert from CJX_Node. Bug: pdfium:793372 Change-Id: I6c7f63a78f3d47bb6bad74faed3fd8c535bf095e Reviewed-on: https://pdfium-review.googlesource.com/21090 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-13Move remaining Script_ methods to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_* from CJX_Node to CJX_Object. Change-Id: I9f063c9d796896ba34be802a8ef8f108911ed56c Reviewed-on: https://pdfium-review.googlesource.com/20972 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-13Move Script_Som_* methods to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_* from CJX_Node to CJX_Object. Change-Id: Iacb21758d9bf83f148044af225c710ad7d8521d2 Reviewed-on: https://pdfium-review.googlesource.com/20993 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Som_*Message methods to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_*Message from CJX_Node to CJX_Object. Change-Id: I04b7e03aa78d14d7d5dba1926a808cef852d5218 Reviewed-on: https://pdfium-review.googlesource.com/20992 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Som_{Fill|Font}Color to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_{Fill|Font}Color from CJX_Node to CJX_Object. Change-Id: I681d2c09a7560eb96967bbbbcb050246f4b879c0 Reviewed-on: https://pdfium-review.googlesource.com/20991 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Som_Border{Width|Color} to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_Border{Width|Color} from CJX_Node to CJX_Object. Change-Id: I07ba9ef2af675993c9f4d14cb74f48252a907569 Reviewed-on: https://pdfium-review.googlesource.com/20990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Attribute_Integer to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_Integer from CJX_Node to CJX_Object. Change-Id: Iec9d38440756827fa52561cb5938af4041738ad5 Reviewed-on: https://pdfium-review.googlesource.com/20951 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Remove unused script attribute methodsDan Sinclair
This CL removes unused CJX_Node::Script_Attribute*Read methods. Change-Id: If85b6de881423fa826dec64cb63bb79e5e14f569 Reviewed-on: https://pdfium-review.googlesource.com/20971 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Attribute_BOOL to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_BOOL from CJX_Node to CJX_Object. Change-Id: I0e5509f49c77897cb17a01fb9fa3abf0cb6074ae Reviewed-on: https://pdfium-review.googlesource.com/20970 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12Move Script_Attribute_String to CJX_ObjectDan Sinclair
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Attribute_String from CJX_Node to CJX_Object. Change-Id: Icbf1cb3ea132e358fd53f00008c0b748ed4cc941 Reviewed-on: https://pdfium-review.googlesource.com/20950 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-12[js] Convert to using size instead of sentinelsDan Sinclair
This CL changes the DefineMethod, DefineProps and DefineConsts methods to pass a size instead of depending on a sentinel value in the definition arrays. Change-Id: Ie054544124290c0833a8b21af175a203ca99591a Reviewed-on: https://pdfium-review.googlesource.com/20551 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-11[xfa] Move CJX code into fxjs/xfaDan Sinclair
This CL moves the remaining CJX clases into fxjs/xfa so they co-exist with the rest of the CJX classes. Change-Id: I2b1e5504ac23f73df177f309967a04ab27fb61d1 Reviewed-on: https://pdfium-review.googlesource.com/20550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-11[xfa] Refactor CJX method signatures.Dan Sinclair
This CL changes the CJX methods from void (*)(CFXJSE_Arguments*) to CJS_Return (*)(CJS_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) which is closer to how CJS works in practice. Change-Id: I3a3129268acfe4262dfeb04179919ed19f6c24e1 Reviewed-on: https://pdfium-review.googlesource.com/20491 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-12-07[xfa] Move JS method information to files.chromium/3288Dan Sinclair
This CL moves the XFA SOM JS Method information out of the c-array and into individual CJX class files. Change-Id: I401046a06aacaf1f04e5a51eb899e479de012e15 Reviewed-on: https://pdfium-review.googlesource.com/20450 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>