OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fxfa/parser/xfa_script_imp.h" | 7 #include "xfa/fxfa/parser/xfa_script_imp.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fxfa/app/xfa_ffnotify.h" | 10 #include "xfa/fxfa/app/xfa_ffnotify.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL; | 140 CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL; |
141 FX_BOOL bRet = | 141 FX_BOOL bRet = |
142 FXJSE_ExecuteScript(m_pJsContext, btScript.c_str(), hRetValue, pValue); | 142 FXJSE_ExecuteScript(m_pJsContext, btScript.c_str(), hRetValue, pValue); |
143 m_pThisObject = pOriginalObject; | 143 m_pThisObject = pOriginalObject; |
144 m_eScriptType = eSaveType; | 144 m_eScriptType = eSaveType; |
145 return bRet; | 145 return bRet; |
146 } | 146 } |
147 void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject, | 147 void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject, |
148 const CFX_ByteStringC& szPropName, | 148 const CFX_ByteStringC& szPropName, |
149 CFXJSE_Value* pValue) { | 149 CFXJSE_Value* pValue) { |
150 CXFA_Object* lpOrginalNode = | 150 CXFA_Object* lpOriginalNode = pObject->ToObject(nullptr); |
151 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pObject, nullptr)); | 151 CXFA_Document* pDoc = lpOriginalNode->GetDocument(); |
152 CXFA_Document* pDoc = lpOrginalNode->GetDocument(); | |
153 CXFA_ScriptContext* lpScriptContext = | 152 CXFA_ScriptContext* lpScriptContext = |
154 (CXFA_ScriptContext*)pDoc->GetScriptContext(); | 153 (CXFA_ScriptContext*)pDoc->GetScriptContext(); |
155 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOrginalNode); | 154 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOriginalNode); |
156 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 155 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
157 uint32_t dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | | 156 uint32_t dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | |
158 XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | | 157 XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | |
159 XFA_RESOLVENODE_Attributes; | 158 XFA_RESOLVENODE_Attributes; |
160 CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); | 159 CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject()); |
161 if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { | 160 if (lpOriginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { |
162 pRefNode = ToNode(lpCurNode); | 161 pRefNode = ToNode(lpCurNode); |
163 } | 162 } |
164 if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue, | 163 if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue, |
165 dwFlag, TRUE)) { | 164 dwFlag, TRUE)) { |
166 return; | 165 return; |
167 } | 166 } |
168 if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { | 167 if (lpOriginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { |
169 if (FXJSE_Value_IsUndefined(pValue)) { | 168 if (FXJSE_Value_IsUndefined(pValue)) { |
170 FXJSE_Value_SetObjectOwnProp(pObject, szPropName, pValue); | 169 FXJSE_Value_SetObjectOwnProp(pObject, szPropName, pValue); |
171 return; | 170 return; |
172 } | 171 } |
173 } | 172 } |
174 CXFA_FFNotify* pNotify = pDoc->GetNotify(); | 173 CXFA_FFNotify* pNotify = pDoc->GetNotify(); |
175 if (!pNotify) { | 174 if (!pNotify) { |
176 return; | 175 return; |
177 } | 176 } |
178 pNotify->GetDocProvider()->SetGlobalProperty(pNotify->GetHDOC(), szPropName, | 177 pNotify->GetDocProvider()->SetGlobalProperty(pNotify->GetHDOC(), szPropName, |
(...skipping 18 matching lines...) Expand all Loading... |
197 if (lpAttributeInfo) { | 196 if (lpAttributeInfo) { |
198 (resolveRs.nodes[0]->*(lpAttributeInfo->lpfnCallback))( | 197 (resolveRs.nodes[0]->*(lpAttributeInfo->lpfnCallback))( |
199 pValue, bSetting, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute); | 198 pValue, bSetting, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute); |
200 } | 199 } |
201 } | 200 } |
202 return true; | 201 return true; |
203 } | 202 } |
204 void CXFA_ScriptContext::GlobalPropertyGetter(CFXJSE_Value* pObject, | 203 void CXFA_ScriptContext::GlobalPropertyGetter(CFXJSE_Value* pObject, |
205 const CFX_ByteStringC& szPropName, | 204 const CFX_ByteStringC& szPropName, |
206 CFXJSE_Value* pValue) { | 205 CFXJSE_Value* pValue) { |
207 CXFA_Object* pOriginalObject = | 206 CXFA_Object* pOriginalObject = pObject->ToObject(nullptr); |
208 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pObject, nullptr)); | |
209 CXFA_Document* pDoc = pOriginalObject->GetDocument(); | 207 CXFA_Document* pDoc = pOriginalObject->GetDocument(); |
210 CXFA_ScriptContext* lpScriptContext = | 208 CXFA_ScriptContext* lpScriptContext = |
211 (CXFA_ScriptContext*)pDoc->GetScriptContext(); | 209 (CXFA_ScriptContext*)pDoc->GetScriptContext(); |
212 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOriginalObject); | 210 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOriginalObject); |
213 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 211 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
214 if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) { | 212 if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) { |
215 if (szPropName == kFormCalcRuntime) { | 213 if (szPropName == kFormCalcRuntime) { |
216 lpScriptContext->m_hFM2JSContext->GlobalPropertyGetter(pValue); | 214 lpScriptContext->m_hFM2JSContext->GlobalPropertyGetter(pValue); |
217 return; | 215 return; |
218 } | 216 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 CXFA_FFNotify* pNotify = pDoc->GetNotify(); | 250 CXFA_FFNotify* pNotify = pDoc->GetNotify(); |
253 if (!pNotify) { | 251 if (!pNotify) { |
254 return; | 252 return; |
255 } | 253 } |
256 pNotify->GetDocProvider()->GetGlobalProperty(pNotify->GetHDOC(), szPropName, | 254 pNotify->GetDocProvider()->GetGlobalProperty(pNotify->GetHDOC(), szPropName, |
257 pValue); | 255 pValue); |
258 } | 256 } |
259 void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue, | 257 void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue, |
260 const CFX_ByteStringC& szPropName, | 258 const CFX_ByteStringC& szPropName, |
261 CFXJSE_Value* pReturnValue) { | 259 CFXJSE_Value* pReturnValue) { |
262 CXFA_Object* pOriginalObject = | 260 CXFA_Object* pOriginalObject = pOriginalValue->ToObject(nullptr); |
263 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pOriginalValue, nullptr)); | |
264 if (!pOriginalObject) { | 261 if (!pOriginalObject) { |
265 FXJSE_Value_SetUndefined(pReturnValue); | 262 FXJSE_Value_SetUndefined(pReturnValue); |
266 return; | 263 return; |
267 } | 264 } |
268 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 265 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
269 CXFA_ScriptContext* lpScriptContext = | 266 CXFA_ScriptContext* lpScriptContext = |
270 (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext(); | 267 (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext(); |
271 CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); | 268 CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); |
272 if (wsPropName == FX_WSTRC(L"xfa")) { | 269 if (wsPropName == FX_WSTRC(L"xfa")) { |
273 CFXJSE_Value* pValue = lpScriptContext->GetJSValueFromMap( | 270 CFXJSE_Value* pValue = lpScriptContext->GetJSValueFromMap( |
(...skipping 24 matching lines...) Expand all Loading... |
298 bRet = lpScriptContext->QueryVariableValue(ToNode(pScriptObject), | 295 bRet = lpScriptContext->QueryVariableValue(ToNode(pScriptObject), |
299 szPropName, pReturnValue, TRUE); | 296 szPropName, pReturnValue, TRUE); |
300 } | 297 } |
301 if (!bRet) { | 298 if (!bRet) { |
302 FXJSE_Value_SetUndefined(pReturnValue); | 299 FXJSE_Value_SetUndefined(pReturnValue); |
303 } | 300 } |
304 } | 301 } |
305 void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue, | 302 void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue, |
306 const CFX_ByteStringC& szPropName, | 303 const CFX_ByteStringC& szPropName, |
307 CFXJSE_Value* pReturnValue) { | 304 CFXJSE_Value* pReturnValue) { |
308 CXFA_Object* pOriginalObject = | 305 CXFA_Object* pOriginalObject = pOriginalValue->ToObject(nullptr); |
309 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pOriginalValue, nullptr)); | |
310 if (!pOriginalObject) | 306 if (!pOriginalObject) |
311 return; | 307 return; |
312 | 308 |
313 CXFA_ScriptContext* lpScriptContext = | 309 CXFA_ScriptContext* lpScriptContext = |
314 (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext(); | 310 (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext(); |
315 CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); | 311 CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject); |
316 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 312 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
317 const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName( | 313 const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName( |
318 pObject->GetClassID(), wsPropName.AsStringC()); | 314 pObject->GetClassID(), wsPropName.AsStringC()); |
319 if (lpAttributeInfo) { | 315 if (lpAttributeInfo) { |
(...skipping 30 matching lines...) Expand all Loading... |
350 if (pScriptObject) { | 346 if (pScriptObject) { |
351 lpScriptContext->QueryVariableValue(ToNode(pScriptObject), szPropName, | 347 lpScriptContext->QueryVariableValue(ToNode(pScriptObject), szPropName, |
352 pReturnValue, FALSE); | 348 pReturnValue, FALSE); |
353 } | 349 } |
354 } | 350 } |
355 } | 351 } |
356 int32_t CXFA_ScriptContext::NormalPropTypeGetter( | 352 int32_t CXFA_ScriptContext::NormalPropTypeGetter( |
357 CFXJSE_Value* pOriginalValue, | 353 CFXJSE_Value* pOriginalValue, |
358 const CFX_ByteStringC& szPropName, | 354 const CFX_ByteStringC& szPropName, |
359 FX_BOOL bQueryIn) { | 355 FX_BOOL bQueryIn) { |
360 CXFA_Object* pObject = | 356 CXFA_Object* pObject = pOriginalValue->ToObject(nullptr); |
361 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pOriginalValue, nullptr)); | |
362 if (!pObject) | 357 if (!pObject) |
363 return FXJSE_ClassPropType_None; | 358 return FXJSE_ClassPropType_None; |
364 | 359 |
365 CXFA_ScriptContext* lpScriptContext = | 360 CXFA_ScriptContext* lpScriptContext = |
366 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); | 361 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); |
367 pObject = lpScriptContext->GetVariablesThis(pObject); | 362 pObject = lpScriptContext->GetVariablesThis(pObject); |
368 XFA_ELEMENT objElement = pObject->GetClassID(); | 363 XFA_ELEMENT objElement = pObject->GetClassID(); |
369 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 364 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
370 if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { | 365 if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { |
371 return FXJSE_ClassPropType_Method; | 366 return FXJSE_ClassPropType_Method; |
372 } | 367 } |
373 if (bQueryIn && | 368 if (bQueryIn && |
374 !XFA_GetScriptAttributeByName(objElement, wsPropName.AsStringC())) { | 369 !XFA_GetScriptAttributeByName(objElement, wsPropName.AsStringC())) { |
375 return FXJSE_ClassPropType_None; | 370 return FXJSE_ClassPropType_None; |
376 } | 371 } |
377 return FXJSE_ClassPropType_Property; | 372 return FXJSE_ClassPropType_Property; |
378 } | 373 } |
379 int32_t CXFA_ScriptContext::GlobalPropTypeGetter( | 374 int32_t CXFA_ScriptContext::GlobalPropTypeGetter( |
380 CFXJSE_Value* pOriginalValue, | 375 CFXJSE_Value* pOriginalValue, |
381 const CFX_ByteStringC& szPropName, | 376 const CFX_ByteStringC& szPropName, |
382 FX_BOOL bQueryIn) { | 377 FX_BOOL bQueryIn) { |
383 CXFA_Object* pObject = | 378 CXFA_Object* pObject = pOriginalValue->ToObject(nullptr); |
384 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pOriginalValue, nullptr)); | |
385 if (!pObject) | 379 if (!pObject) |
386 return FXJSE_ClassPropType_None; | 380 return FXJSE_ClassPropType_None; |
387 | 381 |
388 CXFA_ScriptContext* lpScriptContext = | 382 CXFA_ScriptContext* lpScriptContext = |
389 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); | 383 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); |
390 pObject = lpScriptContext->GetVariablesThis(pObject); | 384 pObject = lpScriptContext->GetVariablesThis(pObject); |
391 XFA_ELEMENT objElement = pObject->GetClassID(); | 385 XFA_ELEMENT objElement = pObject->GetClassID(); |
392 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); | 386 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); |
393 if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { | 387 if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { |
394 return FXJSE_ClassPropType_Method; | 388 return FXJSE_ClassPropType_Method; |
395 } | 389 } |
396 return FXJSE_ClassPropType_Property; | 390 return FXJSE_ClassPropType_Property; |
397 } | 391 } |
398 void CXFA_ScriptContext::NormalMethodCall(CFXJSE_Value* pThis, | 392 void CXFA_ScriptContext::NormalMethodCall(CFXJSE_Value* pThis, |
399 const CFX_ByteStringC& szFuncName, | 393 const CFX_ByteStringC& szFuncName, |
400 CFXJSE_Arguments& args) { | 394 CFXJSE_Arguments& args) { |
401 CXFA_Object* pObject = | 395 CXFA_Object* pObject = pThis->ToObject(nullptr); |
402 static_cast<CXFA_Object*>(FXJSE_Value_ToObject(pThis, nullptr)); | |
403 if (!pObject) | 396 if (!pObject) |
404 return; | 397 return; |
405 | 398 |
406 CXFA_ScriptContext* lpScriptContext = | 399 CXFA_ScriptContext* lpScriptContext = |
407 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); | 400 (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext(); |
408 pObject = lpScriptContext->GetVariablesThis(pObject); | 401 pObject = lpScriptContext->GetVariablesThis(pObject); |
409 CFX_WideString wsFunName = CFX_WideString::FromUTF8(szFuncName); | 402 CFX_WideString wsFunName = CFX_WideString::FromUTF8(szFuncName); |
410 const XFA_METHODINFO* lpMethodInfo = | 403 const XFA_METHODINFO* lpMethodInfo = |
411 XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsStringC()); | 404 XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsStringC()); |
412 if (!lpMethodInfo) | 405 if (!lpMethodInfo) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 518 } |
526 | 519 |
527 void CXFA_ScriptContext::ReleaseVariablesMap() { | 520 void CXFA_ScriptContext::ReleaseVariablesMap() { |
528 FX_POSITION ps = m_mapVariableToContext.GetStartPosition(); | 521 FX_POSITION ps = m_mapVariableToContext.GetStartPosition(); |
529 while (ps) { | 522 while (ps) { |
530 CXFA_Object* pScriptNode; | 523 CXFA_Object* pScriptNode; |
531 CFXJSE_Context* pVariableContext = nullptr; | 524 CFXJSE_Context* pVariableContext = nullptr; |
532 m_mapVariableToContext.GetNextAssoc(ps, pScriptNode, pVariableContext); | 525 m_mapVariableToContext.GetNextAssoc(ps, pScriptNode, pVariableContext); |
533 std::unique_ptr<CFXJSE_Value> pObject( | 526 std::unique_ptr<CFXJSE_Value> pObject( |
534 FXJSE_Context_GetGlobalObject(pVariableContext)); | 527 FXJSE_Context_GetGlobalObject(pVariableContext)); |
535 delete static_cast<CXFA_ThisProxy*>( | 528 delete pObject->ToProxy(nullptr); |
536 FXJSE_Value_ToObject(pObject.get(), nullptr)); | |
537 FXJSE_Context_Release(pVariableContext); | 529 FXJSE_Context_Release(pVariableContext); |
538 } | 530 } |
539 m_mapVariableToContext.RemoveAll(); | 531 m_mapVariableToContext.RemoveAll(); |
540 } | 532 } |
541 | 533 |
542 void CXFA_ScriptContext::DefineJsClass() { | 534 void CXFA_ScriptContext::DefineJsClass() { |
543 m_pJsClass = FXJSE_DefineClass(m_pJsContext, &NormalClassDescriptor); | 535 m_pJsClass = FXJSE_DefineClass(m_pJsContext, &NormalClassDescriptor); |
544 } | 536 } |
545 | 537 |
546 void CXFA_ScriptContext::RemoveBuiltInObjs(CFXJSE_Context* pContext) const { | 538 void CXFA_ScriptContext::RemoveBuiltInObjs(CFXJSE_Context* pContext) const { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 nRet = m_pResolveProcessor->XFA_ResolveNodes(rndFind); | 640 nRet = m_pResolveProcessor->XFA_ResolveNodes(rndFind); |
649 if (nRet < 1) { | 641 if (nRet < 1) { |
650 continue; | 642 continue; |
651 } | 643 } |
652 if (rndFind.m_dwFlag == XFA_RESOVENODE_RSTYPE_Attribute && | 644 if (rndFind.m_dwFlag == XFA_RESOVENODE_RSTYPE_Attribute && |
653 rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) { | 645 rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) { |
654 std::unique_ptr<CFXJSE_Value> pValue(new CFXJSE_Value(m_pIsolate)); | 646 std::unique_ptr<CFXJSE_Value> pValue(new CFXJSE_Value(m_pIsolate)); |
655 (rndFind.m_Nodes[0]->*(rndFind.m_pScriptAttribute->lpfnCallback))( | 647 (rndFind.m_Nodes[0]->*(rndFind.m_pScriptAttribute->lpfnCallback))( |
656 pValue.get(), FALSE, | 648 pValue.get(), FALSE, |
657 (XFA_ATTRIBUTE)rndFind.m_pScriptAttribute->eAttribute); | 649 (XFA_ATTRIBUTE)rndFind.m_pScriptAttribute->eAttribute); |
658 rndFind.m_Nodes.SetAt(0, static_cast<CXFA_Object*>(FXJSE_Value_ToObject( | 650 rndFind.m_Nodes.SetAt(0, pValue.get()->ToObject(nullptr)); |
659 pValue.get(), nullptr))); | |
660 } | 651 } |
661 int32_t iSize = m_upObjectArray.GetSize(); | 652 int32_t iSize = m_upObjectArray.GetSize(); |
662 if (iSize) { | 653 if (iSize) { |
663 m_upObjectArray.RemoveAt(iSize - 1); | 654 m_upObjectArray.RemoveAt(iSize - 1); |
664 } | 655 } |
665 retNodes.Append(rndFind.m_Nodes); | 656 retNodes.Append(rndFind.m_Nodes); |
666 rndFind.m_Nodes.RemoveAll(); | 657 rndFind.m_Nodes.RemoveAll(); |
667 if (bDataBind) { | 658 if (bDataBind) { |
668 break; | 659 break; |
669 } | 660 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 } | 755 } |
765 } | 756 } |
766 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { | 757 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { |
767 if (!m_pScriptNodeArray) { | 758 if (!m_pScriptNodeArray) { |
768 return; | 759 return; |
769 } | 760 } |
770 if (m_pScriptNodeArray->Find(pNode) == -1) { | 761 if (m_pScriptNodeArray->Find(pNode) == -1) { |
771 m_pScriptNodeArray->Add(pNode); | 762 m_pScriptNodeArray->Add(pNode); |
772 } | 763 } |
773 } | 764 } |
OLD | NEW |