summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-04 03:32:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-04 03:32:08 +0000
commit5e35931f90d83e471e4d215034abb4dcb92fac3a (patch)
tree6e33c19c2d637383d0e8b6ccd1632f66be30943d
parent185832ce3665ddfe7c3c96b398a4f56ce3eacf62 (diff)
downloadpdfium-5e35931f90d83e471e4d215034abb4dcb92fac3a.tar.xz
Remove default values from CXFA_Node::GetNodeList
This CL removes the default values and inlines in the call sites. Change-Id: Iae95653a5d724918c5944f860a0743053e98fe88 Reviewed-on: https://pdfium-review.googlesource.com/17615 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--fxjs/cjx_node.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_node.h6
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp4
5 files changed, 17 insertions, 12 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index 1052ba7e39..f102f3ae10 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -969,8 +969,8 @@ void CJX_Node::Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
ThrowInvalidPropertyException();
return;
}
- std::vector<CXFA_Node*> properties =
- GetXFANode()->GetNodeList(XFA_NODEFILTER_OneOfProperty);
+ std::vector<CXFA_Node*> properties = GetXFANode()->GetNodeList(
+ XFA_NODEFILTER_OneOfProperty, XFA_Element::Unknown);
if (!properties.empty()) {
pValue->Assign(GetDocument()->GetScriptContext()->GetJSValueFromMap(
properties.front()));
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h
index c0beb69b6a..50fec5ba1b 100644
--- a/xfa/fxfa/parser/cxfa_node.h
+++ b/xfa/fxfa/parser/cxfa_node.h
@@ -106,10 +106,8 @@ class CXFA_Node : public CXFA_Object {
CXFA_Node* Clone(bool bRecursive);
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_ObjectType eType) const;
- std::vector<CXFA_Node*> GetNodeList(
- uint32_t dwTypeFilter = XFA_NODEFILTER_Children |
- XFA_NODEFILTER_Properties,
- XFA_Element eTypeFilter = XFA_Element::Unknown);
+ std::vector<CXFA_Node*> GetNodeList(uint32_t dwTypeFilter,
+ XFA_Element eTypeFilter);
CXFA_Node* CreateSamePacketNode(XFA_Element eType,
uint32_t dwFlags = XFA_NodeFlag_Initialized);
CXFA_Node* CloneTemplateToForm(bool bRecursive);
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index 84237485b3..4c9e67b96c 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -69,7 +69,8 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseAnySiblings(
return 0;
int32_t nCount = 0;
- for (CXFA_Node* child : parent->GetNodeList(XFA_NODEFILTER_Properties)) {
+ for (CXFA_Node* child :
+ parent->GetNodeList(XFA_NODEFILTER_Properties, XFA_Element::Unknown)) {
if (bIsClassName) {
if (child->GetClassHashCode() == dNameHash) {
pSiblings->push_back(child);
@@ -87,7 +88,8 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseAnySiblings(
nCount +=
NodeAcc_TraverseAnySiblings(child, dNameHash, pSiblings, bIsClassName);
}
- for (CXFA_Node* child : parent->GetNodeList(XFA_NODEFILTER_Children)) {
+ for (CXFA_Node* child :
+ parent->GetNodeList(XFA_NODEFILTER_Children, XFA_Element::Unknown)) {
if (bIsClassName) {
if (child->GetClassHashCode() == dNameHash) {
pSiblings->push_back(child);
@@ -120,7 +122,8 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseSiblings(
int32_t nCount = 0;
if (bIsFindProperty) {
- for (CXFA_Node* child : parent->GetNodeList(XFA_NODEFILTER_Properties)) {
+ for (CXFA_Node* child :
+ parent->GetNodeList(XFA_NODEFILTER_Properties, XFA_Element::Unknown)) {
if (bIsClassName) {
if (child->GetClassHashCode() == dNameHash) {
pSiblings->push_back(child);
@@ -145,7 +148,8 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseSiblings(
if (nCount > 0)
return nCount;
}
- for (CXFA_Node* child : parent->GetNodeList(XFA_NODEFILTER_Children)) {
+ for (CXFA_Node* child :
+ parent->GetNodeList(XFA_NODEFILTER_Children, XFA_Element::Unknown)) {
if (child->GetElementType() == XFA_Element::Variables)
continue;
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index a09456a7a4..6656a527d7 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -475,7 +475,8 @@ int32_t CXFA_ResolveProcessor::ResolveNormal(CXFA_ResolveNodesData& rnd) {
int32_t CXFA_ResolveProcessor::ResolveAsterisk(CXFA_ResolveNodesData& rnd) {
CXFA_Node* curNode = ToNode(rnd.m_CurObject);
std::vector<CXFA_Node*> array =
- curNode->GetNodeList(XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties);
+ curNode->GetNodeList(XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties,
+ XFA_Element::Unknown);
rnd.m_Objects.insert(rnd.m_Objects.end(), array.begin(), array.end());
return pdfium::CollectionSize<int32_t>(rnd.m_Objects);
}
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index d7c37a02d1..0dc2a52a67 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -319,7 +319,9 @@ void CreateDataBinding(CXFA_Node* pFormNode,
}
case XFA_Element::ChoiceList:
if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
- std::vector<CXFA_Node*> items = pDataNode->GetNodeList();
+ std::vector<CXFA_Node*> items = pDataNode->GetNodeList(
+ XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties,
+ XFA_Element::Unknown);
if (!items.empty()) {
bool single = items.size() == 1;
wsNormalizeValue.clear();