Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: xfa/fxfa/parser/xfa_script_nodehelper.cpp

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix issue from c4 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_script_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_resolveprocessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_nodehelper.h" 7 #include "xfa/fxfa/parser/xfa_script_nodehelper.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
(...skipping 15 matching lines...) Expand all
26 m_pAllStartParent(NULL) {} 26 m_pAllStartParent(NULL) {}
27 CXFA_NodeHelper::~CXFA_NodeHelper(void) {} 27 CXFA_NodeHelper::~CXFA_NodeHelper(void) {}
28 CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild( 28 CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild(
29 CXFA_Node* parent, 29 CXFA_Node* parent,
30 const FX_WCHAR* pwsName, 30 const FX_WCHAR* pwsName,
31 FX_BOOL bIsClassName) { 31 FX_BOOL bIsClassName) {
32 if (parent == NULL) { 32 if (parent == NULL) {
33 return NULL; 33 return NULL;
34 } 34 }
35 CXFA_NodeArray siblings; 35 CXFA_NodeArray siblings;
36 uint32_t uNameHash = FX_HashCode_String_GetW(pwsName, FXSYS_wcslen(pwsName)); 36 uint32_t uNameHash = FX_HashCode_GetW(CFX_WideStringC(pwsName), false);
37 XFA_NodeAcc_TraverseAnySiblings(parent, uNameHash, &siblings, bIsClassName); 37 XFA_NodeAcc_TraverseAnySiblings(parent, uNameHash, &siblings, bIsClassName);
38 if (siblings.GetSize() == 0) { 38 if (siblings.GetSize() == 0) {
39 return NULL; 39 return NULL;
40 } 40 }
41 return siblings[0]; 41 return siblings[0];
42 } 42 }
43 int32_t CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode, 43 int32_t CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode,
44 XFA_LOGIC_TYPE eLogicType, 44 XFA_LOGIC_TYPE eLogicType,
45 CXFA_NodeArray* pSiblings, 45 CXFA_NodeArray* pSiblings,
46 FX_BOOL bIsClassName) { 46 FX_BOOL bIsClassName) {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 m_eLastCreateType = XFA_ELEMENT_DataValue; 419 m_eLastCreateType = XFA_ELEMENT_DataValue;
420 } 420 }
421 } 421 }
422 FX_BOOL CXFA_NodeHelper::XFA_NodeIsProperty(CXFA_Node* refNode) { 422 FX_BOOL CXFA_NodeHelper::XFA_NodeIsProperty(CXFA_Node* refNode) {
423 CXFA_Node* parent = 423 CXFA_Node* parent =
424 XFA_ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent); 424 XFA_ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent);
425 return parent && refNode && 425 return parent && refNode &&
426 XFA_GetPropertyOfElement(parent->GetClassID(), refNode->GetClassID(), 426 XFA_GetPropertyOfElement(parent->GetClassID(), refNode->GetClassID(),
427 XFA_XDPPACKET_UNKNOWN); 427 XFA_XDPPACKET_UNKNOWN);
428 } 428 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_script_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_resolveprocessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698