| 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/fm2js/xfa_fm2jscontext.h" | 7 #include "xfa/fxfa/fm2js/xfa_fm2jscontext.h" |
| 8 | 8 |
| 9 #include <time.h> | 9 #include <time.h> |
| 10 | 10 |
| (...skipping 6240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6251 if (pRefValue && pRefValue->IsNull()) { | 6251 if (pRefValue && pRefValue->IsNull()) { |
| 6252 pNode = pScriptContext->GetThisObject(); | 6252 pNode = pScriptContext->GetThisObject(); |
| 6253 dFlags = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent; | 6253 dFlags = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent; |
| 6254 } else { | 6254 } else { |
| 6255 pNode = CXFA_ScriptContext::ToObject(pRefValue, nullptr); | 6255 pNode = CXFA_ScriptContext::ToObject(pRefValue, nullptr); |
| 6256 ASSERT(pNode); | 6256 ASSERT(pNode); |
| 6257 if (bHasNoResolveName) { | 6257 if (bHasNoResolveName) { |
| 6258 CFX_WideString wsName; | 6258 CFX_WideString wsName; |
| 6259 if (CXFA_Node* pXFANode = pNode->AsNode()) | 6259 if (CXFA_Node* pXFANode = pNode->AsNode()) |
| 6260 pXFANode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE); | 6260 pXFANode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE); |
| 6261 if (wsName.IsEmpty()) |
| 6262 wsName = FX_WSTRC(L"#") + pNode->GetClassName(); |
| 6261 | 6263 |
| 6262 if (wsName.IsEmpty()) { | |
| 6263 CFX_WideStringC className; | |
| 6264 pNode->GetClassName(className); | |
| 6265 wsName = FX_WSTRC(L"#") + className; | |
| 6266 } | |
| 6267 wsSomExpression = wsName + wsSomExpression; | 6264 wsSomExpression = wsName + wsSomExpression; |
| 6268 dFlags = XFA_RESOLVENODE_Siblings; | 6265 dFlags = XFA_RESOLVENODE_Siblings; |
| 6269 } else { | 6266 } else { |
| 6270 dFlags = (bsSomExp == "*") | 6267 dFlags = (bsSomExp == "*") |
| 6271 ? (XFA_RESOLVENODE_Children) | 6268 ? (XFA_RESOLVENODE_Children) |
| 6272 : (XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | | 6269 : (XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | |
| 6273 XFA_RESOLVENODE_Properties); | 6270 XFA_RESOLVENODE_Properties); |
| 6274 } | 6271 } |
| 6275 } | 6272 } |
| 6276 } else { | 6273 } else { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6526 CFX_WideString wsFormat; | 6523 CFX_WideString wsFormat; |
| 6527 pAppProvider->LoadString(iStringID, wsFormat); | 6524 pAppProvider->LoadString(iStringID, wsFormat); |
| 6528 CFX_WideString wsMessage; | 6525 CFX_WideString wsMessage; |
| 6529 va_list arg_ptr; | 6526 va_list arg_ptr; |
| 6530 va_start(arg_ptr, iStringID); | 6527 va_start(arg_ptr, iStringID); |
| 6531 wsMessage.FormatV(wsFormat.c_str(), arg_ptr); | 6528 wsMessage.FormatV(wsFormat.c_str(), arg_ptr); |
| 6532 va_end(arg_ptr); | 6529 va_end(arg_ptr); |
| 6533 FXJSE_ThrowMessage( | 6530 FXJSE_ThrowMessage( |
| 6534 FX_UTF8Encode(wsMessage.c_str(), wsMessage.GetLength()).AsStringC()); | 6531 FX_UTF8Encode(wsMessage.c_str(), wsMessage.GetLength()).AsStringC()); |
| 6535 } | 6532 } |
| OLD | NEW |