From e5434b5531f2c081c1d69f67125b6665070ea969 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 1 Nov 2017 16:04:36 +0000 Subject: Split JS code out of CXFA_Node. This CL moves JS code out of CXFA_Node and places it into fxjs/cjx_node. The CXFA_Node then has a CJX_Node as a member and, currently, proxies JS calls to the CJX_Node member. Change-Id: Ic5b95184c8fd2347f0bdcfbccfa89bb6b52835b6 Reviewed-on: https://pdfium-review.googlesource.com/17290 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_nodehelper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_nodehelper.cpp') diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp index 289149998e..6bf7cc20b6 100644 --- a/xfa/fxfa/parser/cxfa_nodehelper.cpp +++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp @@ -256,7 +256,7 @@ void CXFA_NodeHelper::GetNameExpression(CXFA_Node* refNode, GetIndex(refNode, eLogicType, bIsProperty, true)); return; } - ws = refNode->GetCData(XFA_ATTRIBUTE_Name); + ws = refNode->JSNode()->GetCData(XFA_ATTRIBUTE_Name); ws.Replace(L".", L"\\."); wsName.Format(L"%s[%d]", ws.c_str(), GetIndex(refNode, eLogicType, bIsProperty, false)); @@ -357,7 +357,8 @@ bool CXFA_NodeHelper::ResolveNodes_CreateNode(WideString wsName, for (int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex++) { CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eClassType); if (pNewNode) { - pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName.AsStringView()); + pNewNode->JSNode()->SetAttribute(XFA_ATTRIBUTE_Name, + wsName.AsStringView()); pNewNode->CreateXMLMappingNode(); m_pCreateParent->InsertChild(pNewNode); if (iIndex == m_iCreateCount - 1) { -- cgit v1.2.3