Remove default values from CXFA_Node::{CountChildren|GetChild}

This CL removes the default values and inlines into the call sites as
needed.

Change-Id: I554e9d5ac781003695f90522f9c6c3160653eb59
Reviewed-on: https://pdfium-review.googlesource.com/17572
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index dc32e20..afe4bfd 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -3527,7 +3527,8 @@
       if (GetXFANode()->GetElementType() == XFA_Element::ExclGroup) {
         pNode = GetXFANode();
       } else {
-        CXFA_Node* pValue = GetXFANode()->GetChild(0, XFA_Element::Value);
+        CXFA_Node* pValue =
+            GetXFANode()->GetChild(0, XFA_Element::Value, false);
         if (!pValue) {
           return false;
         }
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index a2c4893..cb2155d 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -113,7 +113,7 @@
   if (!pRootItem)
     return;
 
-  CXFA_Node* pSubformNode = pRootItem->GetChild(0, XFA_Element::Subform);
+  CXFA_Node* pSubformNode = pRootItem->GetChild(0, XFA_Element::Subform, false);
   if (!pSubformNode)
     return;
 
@@ -269,16 +269,17 @@
         ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Config));
     if (pConfigItem) {
       CXFA_Node* pValidateNode = nullptr;
-      CXFA_Node* pAcrobatNode = pConfigItem->GetChild(0, XFA_Element::Acrobat);
-      pValidateNode = pAcrobatNode
-                          ? pAcrobatNode->GetChild(0, XFA_Element::Validate)
-                          : nullptr;
+      CXFA_Node* pAcrobatNode =
+          pConfigItem->GetChild(0, XFA_Element::Acrobat, false);
+      pValidateNode =
+          pAcrobatNode ? pAcrobatNode->GetChild(0, XFA_Element::Validate, false)
+                       : nullptr;
       if (!pValidateNode) {
         CXFA_Node* pPresentNode =
-            pConfigItem->GetChild(0, XFA_Element::Present);
-        pValidateNode = pPresentNode
-                            ? pPresentNode->GetChild(0, XFA_Element::Validate)
-                            : nullptr;
+            pConfigItem->GetChild(0, XFA_Element::Present, false);
+        pValidateNode = pPresentNode ? pPresentNode->GetChild(
+                                           0, XFA_Element::Validate, false)
+                                     : nullptr;
       }
       if (pValidateNode)
         wsValidateStr = pValidateNode->JSNode()->GetContent(false);
@@ -295,7 +296,7 @@
     if (!pRootItem)
       return XFA_EVENTERROR_Error;
 
-    pNode = pRootItem->GetChild(0, XFA_Element::Subform);
+    pNode = pRootItem->GetChild(0, XFA_Element::Subform, false);
   }
 
   ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady,
diff --git a/xfa/fxfa/cxfa_ffpageview.cpp b/xfa/fxfa/cxfa_ffpageview.cpp
index bd95ba9..e40b659 100644
--- a/xfa/fxfa/cxfa_ffpageview.cpp
+++ b/xfa/fxfa/cxfa_ffpageview.cpp
@@ -308,9 +308,11 @@
 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
     CXFA_FFWidget* pWidget) {
   CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
-  CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_Element::Traversal);
+  CXFA_Node* pTraversal =
+      pAcc->GetNode()->GetChild(0, XFA_Element::Traversal, false);
   if (pTraversal) {
-    CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_Element::Traverse);
+    CXFA_Node* pTraverse =
+        pTraversal->GetChild(0, XFA_Element::Traverse, false);
     if (pTraverse) {
       WideString wsTraverseWidgetName;
       if (pTraverse->JSNode()->GetAttribute(XFA_ATTRIBUTE_Ref,
diff --git a/xfa/fxfa/cxfa_textprovider.cpp b/xfa/fxfa/cxfa_textprovider.cpp
index db220b3..3ac35bb 100644
--- a/xfa/fxfa/cxfa_textprovider.cpp
+++ b/xfa/fxfa/cxfa_textprovider.cpp
@@ -37,7 +37,8 @@
 
   if (m_eType == XFA_TEXTPROVIDERTYPE_Text) {
     CXFA_Node* pElementNode = m_pWidgetAcc->GetNode();
-    CXFA_Node* pValueNode = pElementNode->GetChild(0, XFA_Element::Value);
+    CXFA_Node* pValueNode =
+        pElementNode->GetChild(0, XFA_Element::Value, false);
     if (!pValueNode)
       return nullptr;
 
@@ -71,11 +72,12 @@
 
   if (m_eType == XFA_TEXTPROVIDERTYPE_Caption) {
     CXFA_Node* pCaptionNode =
-        m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption);
+        m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption, false);
     if (!pCaptionNode)
       return nullptr;
 
-    CXFA_Node* pValueNode = pCaptionNode->GetChild(0, XFA_Element::Value);
+    CXFA_Node* pValueNode =
+        pCaptionNode->GetChild(0, XFA_Element::Value, false);
     if (!pValueNode)
       return nullptr;
 
@@ -91,7 +93,7 @@
   }
 
   CXFA_Node* pItemNode =
-      m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Items);
+      m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Items, false);
   if (!pItemNode)
     return nullptr;
 
@@ -113,16 +115,18 @@
   if (m_eType == XFA_TEXTPROVIDERTYPE_Text)
     return m_pWidgetAcc->GetPara();
 
-  CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption);
-  return CXFA_Para(pNode->GetChild(0, XFA_Element::Para));
+  CXFA_Node* pNode =
+      m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption, false);
+  return CXFA_Para(pNode->GetChild(0, XFA_Element::Para, false));
 }
 
 CXFA_Font CXFA_TextProvider::GetFontNode() {
   if (m_eType == XFA_TEXTPROVIDERTYPE_Text)
     return m_pWidgetAcc->GetFont(false);
 
-  CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption);
-  pNode = pNode->GetChild(0, XFA_Element::Font);
+  CXFA_Node* pNode =
+      m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption, false);
+  pNode = pNode->GetChild(0, XFA_Element::Font, false);
   return pNode ? CXFA_Font(pNode) : m_pWidgetAcc->GetFont(false);
 }
 
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 9dc9603..e76d1af 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -218,13 +218,13 @@
           SetValue(wsValue, XFA_VALUEPICTURE_Raw);
           pAcc->SetValue(wsValue, XFA_VALUEPICTURE_Raw);
         } else {
-          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items);
+          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items, false);
           if (!pItems)
             continue;
 
           WideString itemText;
-          if (pItems->CountChildren(XFA_Element::Unknown) > 1) {
-            itemText = pItems->GetChild(1, XFA_Element::Unknown)
+          if (pItems->CountChildren(XFA_Element::Unknown, false) > 1) {
+            itemText = pItems->GetChild(1, XFA_Element::Unknown, false)
                            ->JSNode()
                            ->GetContent(false);
           }
diff --git a/xfa/fxfa/parser/cxfa_assist.cpp b/xfa/fxfa/parser/cxfa_assist.cpp
index 809081d..7d353a5 100644
--- a/xfa/fxfa/parser/cxfa_assist.cpp
+++ b/xfa/fxfa/parser/cxfa_assist.cpp
@@ -11,5 +11,5 @@
 CXFA_Assist::CXFA_Assist(CXFA_Node* pNode) : CXFA_Data(pNode) {}
 
 CXFA_ToolTip CXFA_Assist::GetToolTip() {
-  return CXFA_ToolTip(m_pNode->GetChild(0, XFA_Element::ToolTip));
+  return CXFA_ToolTip(m_pNode->GetChild(0, XFA_Element::ToolTip, false));
 }
diff --git a/xfa/fxfa/parser/cxfa_bind.cpp b/xfa/fxfa/parser/cxfa_bind.cpp
index a3764d0..1cdeba9 100644
--- a/xfa/fxfa/parser/cxfa_bind.cpp
+++ b/xfa/fxfa/parser/cxfa_bind.cpp
@@ -11,6 +11,6 @@
 CXFA_Bind::CXFA_Bind(CXFA_Node* pNode) : CXFA_Data(pNode) {}
 
 void CXFA_Bind::GetPicture(WideString& wsPicture) {
-  if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture))
+  if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture, false))
     pPicture->JSNode()->TryContent(wsPicture, false, true);
 }
diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp
index 3753108..c0ca723 100644
--- a/xfa/fxfa/parser/cxfa_box.cpp
+++ b/xfa/fxfa/parser/cxfa_box.cpp
@@ -90,7 +90,7 @@
 int32_t CXFA_Box::CountEdges() const {
   if (!m_pNode)
     return 0;
-  return m_pNode->CountChildren(XFA_Element::Edge);
+  return m_pNode->CountChildren(XFA_Element::Edge, false);
 }
 
 CXFA_Edge CXFA_Box::GetEdge(int32_t nIndex) const {
@@ -147,7 +147,7 @@
 }
 
 CXFA_Margin CXFA_Box::GetMargin() const {
-  return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin)
+  return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false)
                              : nullptr);
 }
 
diff --git a/xfa/fxfa/parser/cxfa_calculate.cpp b/xfa/fxfa/parser/cxfa_calculate.cpp
index 4a51b2d..6f5c8a6 100644
--- a/xfa/fxfa/parser/cxfa_calculate.cpp
+++ b/xfa/fxfa/parser/cxfa_calculate.cpp
@@ -18,15 +18,15 @@
 }
 
 CXFA_Script CXFA_Calculate::GetScript() {
-  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script));
+  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script, false));
 }
 
 void CXFA_Calculate::GetMessageText(WideString& wsMessage) {
-  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Message);
+  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Message, false);
   if (!pNode)
     return;
 
-  CXFA_Text text(pNode->GetChild(0, XFA_Element::Text));
+  CXFA_Text text(pNode->GetChild(0, XFA_Element::Text, false));
   if (text)
     text.GetContent(wsMessage);
 }
diff --git a/xfa/fxfa/parser/cxfa_caption.cpp b/xfa/fxfa/parser/cxfa_caption.cpp
index ccfe606..3f820e4 100644
--- a/xfa/fxfa/parser/cxfa_caption.cpp
+++ b/xfa/fxfa/parser/cxfa_caption.cpp
@@ -30,15 +30,16 @@
 }
 
 CXFA_Margin CXFA_Caption::GetMargin() {
-  return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin)
+  return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin, false)
                              : nullptr);
 }
 
 CXFA_Font CXFA_Caption::GetFont() {
-  return CXFA_Font(m_pNode ? m_pNode->GetChild(0, XFA_Element::Font) : nullptr);
+  return CXFA_Font(m_pNode ? m_pNode->GetChild(0, XFA_Element::Font, false)
+                           : nullptr);
 }
 
 CXFA_Value CXFA_Caption::GetValue() {
-  return CXFA_Value(m_pNode ? m_pNode->GetChild(0, XFA_Element::Value)
+  return CXFA_Value(m_pNode ? m_pNode->GetChild(0, XFA_Element::Value, false)
                             : nullptr);
 }
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp
index 70f9513..8d48f98 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -280,8 +280,8 @@
       if (pNode->GetElementType() == XFA_Element::Items) {
         CXFA_Node* pTemplateNode = pNode->GetTemplateNode();
         if (!pTemplateNode ||
-            pTemplateNode->CountChildren(XFA_Element::Unknown) !=
-                pNode->CountChildren(XFA_Element::Unknown)) {
+            pTemplateNode->CountChildren(XFA_Element::Unknown, false) !=
+                pNode->CountChildren(XFA_Element::Unknown, false)) {
           bSaveXML = true;
         }
       }
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index 3d26313..0488617 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -264,7 +264,7 @@
   if (!pPDF)
     return false;
 
-  CXFA_Node* pFormFiller = pPDF->GetChild(0, XFA_Element::Interactive);
+  CXFA_Node* pFormFiller = pPDF->GetChild(0, XFA_Element::Interactive, false);
   if (pFormFiller) {
     m_dwDocFlags |= XFA_DOCFLAG_HasInteractive;
     if (pFormFiller->JSNode()->TryContent(wsInteractive, false, true) &&
diff --git a/xfa/fxfa/parser/cxfa_event.cpp b/xfa/fxfa/parser/cxfa_event.cpp
index e9f1961..8ba68fb 100644
--- a/xfa/fxfa/parser/cxfa_event.cpp
+++ b/xfa/fxfa/parser/cxfa_event.cpp
@@ -31,11 +31,11 @@
 }
 
 CXFA_Script CXFA_Event::GetScript() const {
-  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script));
+  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script, false));
 }
 
 CXFA_Submit CXFA_Event::GetSubmit() const {
-  return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit));
+  return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit, false));
 }
 
 void CXFA_Event::GetSignDataTarget(WideString& wsTarget) {
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index 49e710b..8430b25 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -30,7 +30,7 @@
 }
 
 FX_ARGB CXFA_Fill::GetColor(bool bText) {
-  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color)) {
+  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color, false)) {
     WideStringView wsColor;
     if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false))
       return CXFA_Data::ToColor(wsColor);
@@ -55,7 +55,7 @@
 int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
   CXFA_Node* pNode =
       m_pNode->JSNode()->GetProperty(0, XFA_Element::Pattern, true);
-  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
+  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) {
     WideStringView wsColor;
     pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
     foreColor = CXFA_Data::ToColor(wsColor);
@@ -70,7 +70,7 @@
       m_pNode->JSNode()->GetProperty(0, XFA_Element::Stipple, true);
   int32_t eAttr = 50;
   pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Rate, eAttr, true);
-  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
+  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) {
     WideStringView wsColor;
     pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
     stippleColor = CXFA_Data::ToColor(wsColor);
@@ -85,7 +85,7 @@
       m_pNode->JSNode()->GetProperty(0, XFA_Element::Linear, true);
   XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToRight;
   pNode->JSNode()->TryEnum(XFA_ATTRIBUTE_Type, eAttr, true);
-  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
+  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) {
     WideStringView wsColor;
     pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
     endColor = CXFA_Data::ToColor(wsColor);
@@ -100,7 +100,7 @@
       m_pNode->JSNode()->GetProperty(0, XFA_Element::Radial, true);
   XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToEdge;
   pNode->JSNode()->TryEnum(XFA_ATTRIBUTE_Type, eAttr, true);
-  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
+  if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) {
     WideStringView wsColor;
     pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
     endColor = CXFA_Data::ToColor(wsColor);
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index 2674ac5..ab0825f 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -90,6 +90,6 @@
 }
 
 FX_ARGB CXFA_Font::GetColor() {
-  CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill));
+  CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill, false));
   return fill ? fill.GetColor(true) : 0xFF000000;
 }
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index ce9dbf7..1b72331 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -308,7 +308,7 @@
     return false;
 
   CXFA_Document* pDocument = pTemplateNode->GetDocument();
-  pPageArea = m_pTemplatePageSetRoot->GetChild(0, XFA_Element::PageArea);
+  pPageArea = m_pTemplatePageSetRoot->GetChild(0, XFA_Element::PageArea, false);
   if (!pPageArea) {
     pPageArea = pDocument->CreateNode(m_pTemplatePageSetRoot->GetPacketID(),
                                       XFA_Element::PageArea);
@@ -318,7 +318,8 @@
     m_pTemplatePageSetRoot->InsertChild(pPageArea, nullptr);
     pPageArea->SetFlag(XFA_NodeFlag_Initialized, true);
   }
-  CXFA_Node* pContentArea = pPageArea->GetChild(0, XFA_Element::ContentArea);
+  CXFA_Node* pContentArea =
+      pPageArea->GetChild(0, XFA_Element::ContentArea, false);
   if (!pContentArea) {
     pContentArea = pDocument->CreateNode(pPageArea->GetPacketID(),
                                          XFA_Element::ContentArea);
@@ -336,7 +337,7 @@
     pContentArea->JSNode()->SetMeasure(
         XFA_ATTRIBUTE_H, CXFA_Measurement(10.5f, XFA_UNIT_In), false);
   }
-  CXFA_Node* pMedium = pPageArea->GetChild(0, XFA_Element::Medium);
+  CXFA_Node* pMedium = pPageArea->GetChild(0, XFA_Element::Medium, false);
   if (!pMedium) {
     pMedium =
         pDocument->CreateNode(pPageArea->GetPacketID(), XFA_Element::Medium);
diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp
index 0de7bcd..85f38a2 100644
--- a/xfa/fxfa/parser/cxfa_line.cpp
+++ b/xfa/fxfa/parser/cxfa_line.cpp
@@ -18,5 +18,5 @@
 }
 
 CXFA_Edge CXFA_Line::GetEdge() {
-  return CXFA_Edge(m_pNode->GetChild(0, XFA_Element::Edge));
+  return CXFA_Edge(m_pNode->GetChild(0, XFA_Element::Edge, false));
 }
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h
index d8472eb..fa9bab4 100644
--- a/xfa/fxfa/parser/cxfa_node.h
+++ b/xfa/fxfa/parser/cxfa_node.h
@@ -97,13 +97,12 @@
   CXFA_Node* GetModelNode();
   void UpdateNameHash();
 
-  int32_t CountChildren(XFA_Element eType, bool bOnlyChild = false);
-  CXFA_Node* GetChild(int32_t index,
-                      XFA_Element eType,
-                      bool bOnlyChild = false);
+  int32_t CountChildren(XFA_Element eType, bool bOnlyChild);
+  CXFA_Node* GetChild(int32_t index, XFA_Element eType, bool bOnlyChild);
   int32_t InsertChild(int32_t index, CXFA_Node* pNode);
   bool InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = nullptr);
   bool RemoveChild(CXFA_Node* pNode, bool bNotify = true);
+
   CXFA_Node* Clone(bool bRecursive);
   CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
   CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_ObjectType eType) const;
diff --git a/xfa/fxfa/parser/cxfa_nodelocale.cpp b/xfa/fxfa/parser/cxfa_nodelocale.cpp
index 7a941df..7bbbba2 100644
--- a/xfa/fxfa/parser/cxfa_nodelocale.cpp
+++ b/xfa/fxfa/parser/cxfa_nodelocale.cpp
@@ -69,7 +69,7 @@
 
 WideString CXFA_NodeLocale::GetDateTimeSymbols() const {
   CXFA_Node* pSymbols =
-      m_pLocale ? m_pLocale->GetChild(0, XFA_Element::DateTimeSymbols)
+      m_pLocale ? m_pLocale->GetChild(0, XFA_Element::DateTimeSymbols, false)
                 : nullptr;
   return pSymbols ? pSymbols->JSNode()->GetContent(false) : WideString();
 }
@@ -147,7 +147,8 @@
 
 WideString CXFA_NodeLocale::GetSymbol(XFA_Element eElement,
                                       const WideStringView& symbol_type) const {
-  CXFA_Node* pSymbols = m_pLocale ? m_pLocale->GetChild(0, eElement) : nullptr;
+  CXFA_Node* pSymbols =
+      m_pLocale ? m_pLocale->GetChild(0, eElement, false) : nullptr;
   CXFA_Node* pSymbol = GetNodeByName(pSymbols, symbol_type);
   return pSymbol ? pSymbol->JSNode()->GetContent(false) : WideString();
 }
@@ -156,7 +157,7 @@
                                               int index,
                                               bool bAbbr) const {
   CXFA_Node* pCalendar =
-      m_pLocale ? m_pLocale->GetChild(0, XFA_Element::CalendarSymbols)
+      m_pLocale ? m_pLocale->GetChild(0, XFA_Element::CalendarSymbols, false)
                 : nullptr;
   if (!pCalendar)
     return WideString();
@@ -164,7 +165,7 @@
   CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement);
   for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) {
     if (pNode->JSNode()->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) {
-      CXFA_Node* pSymbol = pNode->GetChild(index, XFA_Element::Unknown);
+      CXFA_Node* pSymbol = pNode->GetChild(index, XFA_Element::Unknown, false);
       return pSymbol ? pSymbol->JSNode()->GetContent(false) : WideString();
     }
   }
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp
index 753527c..17b269f 100644
--- a/xfa/fxfa/parser/cxfa_stroke.cpp
+++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -48,7 +48,7 @@
   if (!m_pNode)
     return 0xFF000000;
 
-  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color);
+  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color, false);
   if (!pNode)
     return 0xFF000000;
 
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index 513d6b4..5af92b8 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -114,10 +114,10 @@
 }
 
 void CXFA_Validate::GetPicture(WideString& wsPicture) {
-  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Picture))
+  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Picture, false))
     pNode->JSNode()->TryContent(wsPicture, false, true);
 }
 
 CXFA_Script CXFA_Validate::GetScript() {
-  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script));
+  return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script, false));
 }
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index d65eff4..1828961 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -162,8 +162,8 @@
   switch (pUIChild->GetElementType()) {
     case XFA_Element::CheckButton: {
       eValueType = XFA_Element::Text;
-      if (CXFA_Node* pItems = pNode->GetChild(0, XFA_Element::Items)) {
-        if (CXFA_Node* pItem = pItems->GetChild(0, XFA_Element::Unknown))
+      if (CXFA_Node* pItems = pNode->GetChild(0, XFA_Element::Items, false)) {
+        if (CXFA_Node* pItem = pItems->GetChild(0, XFA_Element::Unknown, false))
           eValueType = pItem->GetElementType();
       }
       break;
@@ -441,7 +441,7 @@
 
 bool CXFA_WidgetData::GetButtonRollover(WideString& wsRollover,
                                         bool& bRichText) {
-  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
+  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items, false)) {
     CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
     while (pText) {
       WideStringView wsName;
@@ -458,7 +458,7 @@
 }
 
 bool CXFA_WidgetData::GetButtonDown(WideString& wsDown, bool& bRichText) {
-  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
+  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items, false)) {
     CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
     while (pText) {
       WideStringView wsName;
@@ -520,7 +520,7 @@
   if (wsValue.IsEmpty())
     return XFA_CHECKSTATE_Off;
 
-  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
+  if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items, false)) {
     CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
     int32_t i = 0;
     while (pText) {
@@ -542,7 +542,7 @@
   if (exclGroup) {
     WideString wsValue;
     if (eCheckState != XFA_CHECKSTATE_Off) {
-      if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
+      if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items, false)) {
         CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
         if (pText)
           pText->JSNode()->TryContent(wsValue, false, true);
@@ -554,7 +554,7 @@
       if (pChild->GetElementType() != XFA_Element::Field)
         continue;
 
-      CXFA_Node* pItem = pChild->GetChild(0, XFA_Element::Items);
+      CXFA_Node* pItem = pChild->GetChild(0, XFA_Element::Items, false);
       if (!pItem)
         continue;
 
@@ -576,7 +576,7 @@
     }
     exclGroup.SyncValue(wsValue, bNotify);
   } else {
-    CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items);
+    CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items, false);
     if (!pItems)
       return;
 
@@ -643,7 +643,7 @@
     if (pNode->GetElementType() != XFA_Element::Field)
       continue;
 
-    CXFA_Node* pItem = pNode->GetChild(0, XFA_Element::Items);
+    CXFA_Node* pItem = pNode->GetChild(0, XFA_Element::Items, false);
     if (!pItem)
       continue;
 
@@ -750,7 +750,7 @@
     if (bItemOneHasSave != bItemTwoHasSave && bSaveValue == bItemTwoHasSave)
       pItem = pItems[1];
   }
-  return pItem->CountChildren(XFA_Element::Unknown);
+  return pItem->CountChildren(XFA_Element::Unknown, false);
 }
 
 bool CXFA_WidgetData::GetChoiceListItem(WideString& wsText,
@@ -782,7 +782,7 @@
       pItems = pItemsArray[1];
   }
   if (pItems) {
-    CXFA_Node* pItem = pItems->GetChild(nIndex, XFA_Element::Unknown);
+    CXFA_Node* pItem = pItems->GetChild(nIndex, XFA_Element::Unknown, false);
     if (pItem) {
       pItem->JSNode()->TryContent(wsText, false, true);
       return true;
@@ -1071,7 +1071,7 @@
     if (iSearch < 0)
       return;
     if (CXFA_Node* pText =
-            pLabelItems->GetChild(iSearch, XFA_Element::Unknown)) {
+            pLabelItems->GetChild(iSearch, XFA_Element::Unknown, false)) {
       pText->JSNode()->TryContent(wsLabel, false, true);
     }
   }
@@ -1115,8 +1115,10 @@
     }
     if (iSearch < 0)
       return;
-    if (CXFA_Node* pText = pSaveItems->GetChild(iSearch, XFA_Element::Unknown))
+    if (CXFA_Node* pText =
+            pSaveItems->GetChild(iSearch, XFA_Element::Unknown, false)) {
       pText->JSNode()->TryContent(wsValue, false, true);
+    }
   }
 }
 
@@ -1166,7 +1168,7 @@
   CXFA_Node* pUIChild = GetUIChild();
   if (!pUIChild)
     return -1;
-  if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_Element::Comb))
+  if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_Element::Comb, false))
     return pNode->JSNode()->GetInteger(XFA_ATTRIBUTE_NumberOfCells);
   return -1;
 }
@@ -1390,7 +1392,7 @@
 }
 
 int32_t CXFA_WidgetData::GetMaxChars(XFA_Element& eType) {
-  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) {
+  if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value, false)) {
     if (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) {
       switch (pChild->GetElementType()) {
         case XFA_Element::Text:
@@ -1412,11 +1414,11 @@
 bool CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) {
   iFracDigits = -1;
 
-  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value);
+  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value, false);
   if (!pNode)
     return false;
 
-  CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal);
+  CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal, false);
   if (!pChild)
     return false;
 
@@ -1427,11 +1429,11 @@
 bool CXFA_WidgetData::GetLeadDigits(int32_t& iLeadDigits) {
   iLeadDigits = -1;
 
-  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value);
+  CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value, false);
   if (!pNode)
     return false;
 
-  CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal);
+  CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal, false);
   if (!pChild)
     return false;
 
@@ -1502,8 +1504,10 @@
   CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this);
   switch (ePicture) {
     case XFA_VALUEPICTURE_Display: {
-      if (CXFA_Node* pFormat = m_pNode->GetChild(0, XFA_Element::Format)) {
-        if (CXFA_Node* pPicture = pFormat->GetChild(0, XFA_Element::Picture)) {
+      if (CXFA_Node* pFormat =
+              m_pNode->GetChild(0, XFA_Element::Format, false)) {
+        if (CXFA_Node* pPicture =
+                pFormat->GetChild(0, XFA_Element::Picture, false)) {
           if (pPicture->JSNode()->TryContent(wsPicture, false, true))
             return true;
         }
@@ -1538,9 +1542,10 @@
       return true;
     }
     case XFA_VALUEPICTURE_Edit: {
-      CXFA_Node* pUI = m_pNode->GetChild(0, XFA_Element::Ui);
+      CXFA_Node* pUI = m_pNode->GetChild(0, XFA_Element::Ui, false);
       if (pUI) {
-        if (CXFA_Node* pPicture = pUI->GetChild(0, XFA_Element::Picture)) {
+        if (CXFA_Node* pPicture =
+                pUI->GetChild(0, XFA_Element::Picture, false)) {
           if (pPicture->JSNode()->TryContent(wsPicture, false, true))
             return true;
         }
@@ -1703,7 +1708,7 @@
 
   if (IFX_Locale* pLocale = GetLocal()) {
     ASSERT(GetNode());
-    CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_Element::Value);
+    CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_Element::Value, false);
     if (!pNodeValue)
       return false;
 
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 2ed6c72..78d2397 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -203,7 +203,7 @@
           if (pChild->GetElementType() != XFA_Element::Field)
             continue;
 
-          CXFA_Node* pValue = pChild->GetChild(0, XFA_Element::Value);
+          CXFA_Node* pValue = pChild->GetChild(0, XFA_Element::Value, false);
           if (!pValue)
             continue;
 
@@ -212,7 +212,7 @@
           if (wsValue.IsEmpty())
             continue;
 
-          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items);
+          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items, false);
           if (!pItems)
             continue;
 
@@ -244,7 +244,7 @@
 
           CXFA_Node* pValue =
               pChild->JSNode()->GetProperty(0, XFA_Element::Value, true);
-          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items);
+          CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items, false);
           CXFA_Node* pText =
               pItems ? pItems->GetNodeItem(XFA_NODEITEM_FirstChild) : nullptr;
           if (pText)
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 45cbbd5..2ee6750 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -130,7 +130,7 @@
 
 CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData) {
   CXFA_Node* pNodeValue =
-      pWidgetData->GetNode()->GetChild(0, XFA_Element::Value);
+      pWidgetData->GetNode()->GetChild(0, XFA_Element::Value, false);
   if (!pNodeValue) {
     return CXFA_LocaleValue();
   }
@@ -216,7 +216,7 @@
   if (!pFieldNode)
     return bRet;
 
-  CXFA_Node* pUIChild = pFieldNode->GetChild(0, XFA_Element::Ui);
+  CXFA_Node* pUIChild = pFieldNode->GetChild(0, XFA_Element::Ui, false);
   if (pUIChild) {
     CXFA_Node* pFirstChild = pUIChild->GetNodeItem(XFA_NODEITEM_FirstChild);
     if (pFirstChild &&