diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-27 18:10:47 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-27 18:10:47 +0000 |
commit | f473672fd6305fe97c749bde3b92e3c9c90e88d0 (patch) | |
tree | fe1ec0af4f66a801c7a08fd762e61b065b89d4ec /fxjs/cfxjse_resolveprocessor.cpp | |
parent | 3636a854af15219fd679ed54207abcdad3283b9b (diff) | |
download | pdfium-f473672fd6305fe97c749bde3b92e3c9c90e88d0.tar.xz |
Generate XFA node classes
This CL adds concrete classes for each of the XFA Node types.
Change-Id: Ieac8e2fcd5d13c61daa27fc63e3d80abb7aa7a29
Reviewed-on: https://pdfium-review.googlesource.com/18271
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_resolveprocessor.cpp')
-rw-r--r-- | fxjs/cfxjse_resolveprocessor.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fxjs/cfxjse_resolveprocessor.cpp b/fxjs/cfxjse_resolveprocessor.cpp index 3a6bc91d50..ef0fcbf174 100644 --- a/fxjs/cfxjse_resolveprocessor.cpp +++ b/fxjs/cfxjse_resolveprocessor.cpp @@ -242,10 +242,7 @@ int32_t CFXJSE_ResolveProcessor::ResolveNormal(CFXJSE_ResolveNodeData& rnd) { pPageSetNode = pChild; continue; } - const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement( - curNode->GetElementType(), pChild->GetElementType(), - XFA_XDPPACKET_UNKNOWN); - if (pProperty) + if (curNode->HasProperty(pChild->GetElementType())) properties.push_back(pChild); else children.push_back(pChild); @@ -348,7 +345,7 @@ int32_t CFXJSE_ResolveProcessor::ResolveNormal(CFXJSE_ResolveNodeData& rnd) { true); } } else { - XFA_Element eType = XFA_GetElementTypeForName(wsName.AsStringView()); + XFA_Element eType = CXFA_Node::NameToElement(wsName); if (eType != XFA_Element::Unknown) { pProp = curNode->AsNode()->JSNode()->GetProperty( 0, eType, eType != XFA_Element::PageSet); @@ -405,11 +402,9 @@ int32_t CFXJSE_ResolveProcessor::ResolveNormal(CFXJSE_ResolveNodeData& rnd) { } else if (child->GetNameHash() == uNameHash) { rnd.m_Objects.push_back(child); } - const XFA_PROPERTY* pPropert = XFA_GetPropertyOfElement( - parentNode->GetElementType(), child->GetElementType(), - XFA_XDPPACKET_UNKNOWN); + bool bInnerSearch = false; - if (pPropert) { + if (parentNode->HasProperty(child->GetElementType())) { if ((child->GetElementType() == XFA_Element::Variables || child->GetElementType() == XFA_Element::PageSet)) { bInnerSearch = true; |