summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_imp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-07-18 06:36:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-18 06:36:51 -0700
commitc1df5d4375027aa9d0b88f456f95177c016e8cad (patch)
treea06026f0df134604b4cc8082b15a1875ddcc00a0 /xfa/fxfa/parser/xfa_document_imp.cpp
parente8a80664a888526ca4f0d08b4e6b290eb0aa0d76 (diff)
downloadpdfium-c1df5d4375027aa9d0b88f456f95177c016e8cad.tar.xz
Pass element hash and name into CXFA_Object constructor.
Providing the element hash and name in the constructor allows us to remove the calls to XFA_GetElementByID in the get methods. Review-Url: https://codereview.chromium.org/2101403002
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_imp.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp
index 4c8b4dba1d..382fd7db3b 100644
--- a/xfa/fxfa/parser/xfa_document_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp
@@ -160,8 +160,9 @@ CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket,
const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement);
if (pElement && (pElement->dwPackets & pPacket->eName)) {
- CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName,
- pElement->eObjectType, pElement->eName);
+ CXFA_Node* pNode =
+ new CXFA_Node(this, pPacket->eName, pElement->eObjectType,
+ pElement->eName, pElement->pName);
AddPurgeNode(pNode);
return pNode;
}