diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-06 18:17:41 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-06 18:17:41 +0000 |
commit | 472bb7f919736ae58461f653597eb6854119cca9 (patch) | |
tree | fb7a694e41bba43a7be04b3d7790b0872fee68bf /xfa/fxfa/parser/xfa_resolvenode_rs.h | |
parent | d19aa7c572c252dd0398f277d13ec1733f1c7098 (diff) | |
download | pdfium-472bb7f919736ae58461f653597eb6854119cca9.tar.xz |
Call CJX methods directly instead of proxying
This CL updates the XFA JS code to call the methods on the CJX objects
directly instead of proxying through the CXFA objects. The script
methods have been removed from the CXFA objects.
Change-Id: I2d7b502473a8e88a7af88b10aa0da602d4998394
Reviewed-on: https://pdfium-review.googlesource.com/17851
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_resolvenode_rs.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_resolvenode_rs.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_resolvenode_rs.h b/xfa/fxfa/parser/xfa_resolvenode_rs.h index a30d540ef0..750adab36f 100644 --- a/xfa/fxfa/parser/xfa_resolvenode_rs.h +++ b/xfa/fxfa/parser/xfa_resolvenode_rs.h @@ -14,6 +14,7 @@ #include "fxjs/cfxjse_value.h" #include "third_party/base/ptr_util.h" #include "xfa/fxfa/fxfa.h" +#include "xfa/fxfa/parser/cxfa_object.h" #include "xfa/fxfa/parser/cxfa_valuearray.h" #define XFA_RESOLVENODE_Children 0x0001 @@ -33,13 +34,13 @@ enum XFA_SCRIPTLANGTYPE { XFA_SCRIPTLANGTYPE_Unkown = XFA_SCRIPTTYPE_Unkown, }; -enum XFA_RESOVENODE_RSTYPE { - XFA_RESOVENODE_RSTYPE_Nodes, - XFA_RESOVENODE_RSTYPE_Attribute, +enum XFA_RESOLVENODE_RSTYPE { + XFA_RESOLVENODE_RSTYPE_Nodes, + XFA_RESOLVENODE_RSTYPE_Attribute, XFA_RESOLVENODE_RSTYPE_CreateNodeOne, XFA_RESOLVENODE_RSTYPE_CreateNodeAll, XFA_RESOLVENODE_RSTYPE_CreateNodeMidAll, - XFA_RESOVENODE_RSTYPE_ExistNodes, + XFA_RESOLVENODE_RSTYPE_ExistNodes, }; struct XFA_RESOLVENODE_RS { @@ -50,7 +51,8 @@ struct XFA_RESOLVENODE_RS { if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) { for (CXFA_Object* pObject : objects) { auto pValue = pdfium::MakeUnique<CFXJSE_Value>(valueArray->m_pIsolate); - (pObject->*(pScriptAttribute->lpfnCallback))( + CJX_Object* jsObject = pObject->JSObject(); + (jsObject->*(pScriptAttribute->callback))( pValue.get(), false, static_cast<XFA_ATTRIBUTE>(pScriptAttribute->eAttribute)); valueArray->m_Values.push_back(std::move(pValue)); @@ -60,12 +62,12 @@ struct XFA_RESOLVENODE_RS { } std::vector<CXFA_Object*> objects; // Not owned. - XFA_RESOVENODE_RSTYPE dwFlags; + XFA_RESOLVENODE_RSTYPE dwFlags; const XFA_SCRIPTATTRIBUTEINFO* pScriptAttribute; }; inline XFA_RESOLVENODE_RS::XFA_RESOLVENODE_RS() - : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(nullptr) {} + : dwFlags(XFA_RESOLVENODE_RSTYPE_Nodes), pScriptAttribute(nullptr) {} inline XFA_RESOLVENODE_RS::~XFA_RESOLVENODE_RS() {} |