Cleanup some variable namings.

This CL cleans up some variable namings from the XFA_Element enum change.

Review-Url: https://codereview.chromium.org/2093663002
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index e4b8312..12792bc 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -92,7 +92,6 @@
   XFA_Element eType = pNode->GetElementType();
   if (eType == XFA_Element::PageArea)
     return new CXFA_FFPageView(pDocView, pNode);
-
   if (eType == XFA_Element::ContentArea)
     return new CXFA_ContainerLayoutItem(pNode);
 
@@ -320,13 +319,13 @@
   if (!pDocView)
     return;
 
-  XFA_Element iType = pNode->GetElementType();
-  if (XFA_IsCreateWidget(iType)) {
+  XFA_Element eType = pNode->GetElementType();
+  if (XFA_IsCreateWidget(eType)) {
     CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode);
     pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc);
     return;
   }
-  switch (iType) {
+  switch (eType) {
     case XFA_Element::BindItems:
       pDocView->m_BindItems.Add(pNode);
       break;
@@ -381,7 +380,7 @@
     return;
   }
 
-  XFA_Element ePType = pParentNode->GetElementType();
+  XFA_Element eType = pParentNode->GetElementType();
   FX_BOOL bIsContainerNode = pParentNode->IsContainerNode();
   CXFA_WidgetAcc* pWidgetAcc =
       static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData());
@@ -390,7 +389,7 @@
 
   bool bUpdateProperty = false;
   pDocView->SetChangeMark();
-  switch (ePType) {
+  switch (eType) {
     case XFA_Element::Caption: {
       CXFA_TextLayout* pCapOut = pWidgetAcc->GetCaptionTextLayout();
       if (!pCapOut)
@@ -410,7 +409,7 @@
 
   if (eAttr == XFA_ATTRIBUTE_Value) {
     pDocView->AddCalculateNodeNotify(pSender);
-    if (ePType == XFA_Element::Value || bIsContainerNode) {
+    if (eType == XFA_Element::Value || bIsContainerNode) {
       if (bIsContainerNode) {
         pWidgetAcc->UpdateUIDisplay();
         pDocView->AddCalculateWidgetAcc(pWidgetAcc);
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 45b6b7e..09f6da0 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1179,15 +1179,13 @@
   rt.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset);
 }
 CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) {
-  XFA_Element iType = pLayoutItem->GetFormNode()->GetElementType();
-  if (XFA_IsCreateWidget(iType)) {
+  if (XFA_IsCreateWidget(pLayoutItem->GetFormNode()->GetElementType()))
     return static_cast<CXFA_FFWidget*>(pLayoutItem);
-  }
   return nullptr;
 }
-FX_BOOL XFA_IsCreateWidget(XFA_Element iType) {
-  return iType == XFA_Element::Field || iType == XFA_Element::Draw ||
-         iType == XFA_Element::Subform || iType == XFA_Element::ExclGroup;
+FX_BOOL XFA_IsCreateWidget(XFA_Element eType) {
+  return eType == XFA_Element::Field || eType == XFA_Element::Draw ||
+         eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup;
 }
 static void XFA_BOX_GetPath_Arc(CXFA_Box box,
                                 CFX_RectF rtDraw,
@@ -2033,13 +2031,13 @@
   if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
     return;
 
-  XFA_Element iType = box.GetElementType();
-  if (iType != XFA_Element::Arc && iType != XFA_Element::Border &&
-      iType != XFA_Element::Rectangle) {
+  XFA_Element eType = box.GetElementType();
+  if (eType != XFA_Element::Arc && eType != XFA_Element::Border &&
+      eType != XFA_Element::Rectangle) {
     return;
   }
   CXFA_StrokeArray strokes;
-  if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_Element::Arc) {
+  if (!(dwFlags & XFA_DRAWBOX_ForceRound) && eType != XFA_Element::Arc) {
     box.GetStrokes(strokes);
   }
   XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags);
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index ed53f83..07ed3b3 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1328,7 +1328,7 @@
   if (!pNode)
     return TRUE;
 
-  XFA_Element uiType = pNode->GetElementType();
+  XFA_Element eType = pNode->GetElementType();
   if (!wsPicture.IsEmpty()) {
     CXFA_LocaleMgr* pLocalMgr = m_pNode->GetDocument()->GetLocalMgr();
     IFX_Locale* pLocale = GetLocal();
@@ -1339,7 +1339,7 @@
       widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsNewText,
                                      wsPicture, pLocale, pLocalMgr);
       wsNewText = widgetValue.GetValue();
-      if (uiType == XFA_Element::NumericEdit) {
+      if (eType == XFA_Element::NumericEdit) {
         int32_t iLeadDigits = 0;
         int32_t iFracDigits = 0;
         GetLeadDigits(iLeadDigits);
@@ -1349,7 +1349,7 @@
       bSyncData = TRUE;
     }
   } else {
-    if (uiType == XFA_Element::NumericEdit) {
+    if (eType == XFA_Element::NumericEdit) {
       if (wsNewText != FX_WSTRC(L"0")) {
         int32_t iLeadDigits = 0;
         int32_t iFracDigits = 0;
@@ -1360,7 +1360,7 @@
       bSyncData = TRUE;
     }
   }
-  if (uiType != XFA_Element::NumericEdit || bSyncData)
+  if (eType != XFA_Element::NumericEdit || bSyncData)
     SyncValue(wsNewText, true);
 
   return bValidate;
@@ -1493,8 +1493,7 @@
   if (!pNode)
     return TRUE;
 
-  XFA_Element uiType = GetUIChild()->GetElementType();
-  switch (uiType) {
+  switch (GetUIChild()->GetElementType()) {
     case XFA_Element::ChoiceList: {
       if (eValueType == XFA_VALUEPICTURE_Display) {
         int32_t iSelItemIndex = GetSelectedItem(0);
@@ -1598,8 +1597,7 @@
       return FALSE;
 
     int32_t iVTType = XFA_VT_NULL;
-    XFA_Element eType = pValueChild->GetElementType();
-    switch (eType) {
+    switch (pValueChild->GetElementType()) {
       case XFA_Element::Decimal:
         iVTType = XFA_VT_DECIMAL;
         break;
diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
index 5c7fdfe..97ea8dd 100644
--- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
@@ -31,18 +31,17 @@
        pDataChild;
        pDataChild = pDataChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
     uint32_t dwNameHash = pDataChild->GetNameHash();
-    XFA_Element eType = pDataChild->GetElementType();
-    if (!dwNameHash) {
+    if (!dwNameHash)
       continue;
-    }
+
     CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_DDGroup>
         sIterator(pDataDescriptionNode);
     for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode;
          pDDGroupNode = sIterator.MoveToNext()) {
       if (pDDGroupNode != pDataDescriptionNode) {
-        if (pDDGroupNode->GetElementType() != XFA_Element::DataGroup) {
+        if (pDDGroupNode->GetElementType() != XFA_Element::DataGroup)
           continue;
-        }
+
         CFX_WideString wsNamespace;
         if (!pDDGroupNode->TryNamespace(wsNamespace) ||
             wsNamespace != FX_WSTRC(L"http://ns.adobe.com/data-description/")) {
@@ -50,12 +49,11 @@
         }
       }
       CXFA_Node* pDDNode = pDDGroupNode->GetFirstChildByName(dwNameHash);
-      if (!pDDNode) {
+      if (!pDDNode)
         continue;
-      }
-      if (pDDNode->GetElementType() != eType) {
+      if (pDDNode->GetElementType() != pDataChild->GetElementType())
         break;
-      }
+
       pDataChild->SetDataDescriptionNode(pDDNode);
       XFA_DataDescription_UpdateDataRelation(pDataChild, pDDNode);
       break;
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index dc52c50..d1aeae9 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -104,8 +104,8 @@
                                             FX_BOOL bDataToForm = TRUE) {
   pFormNode->SetObject(XFA_ATTRIBUTE_BindingNode, pDataNode);
   pDataNode->AddBindItem(pFormNode);
-  XFA_Element eClass = pFormNode->GetElementType();
-  if (eClass != XFA_Element::Field && eClass != XFA_Element::ExclGroup) {
+  XFA_Element eType = pFormNode->GetElementType();
+  if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) {
     return;
   }
   CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData();
@@ -465,13 +465,13 @@
   return NULL;
 }
 CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument,
-                                             XFA_Element eClassID,
+                                             XFA_Element eType,
                                              uint32_t dwNameHash,
                                              CXFA_Node* pFormParent) {
   CXFA_Node* pFormChild = pFormParent->GetNodeItem(XFA_NODEITEM_FirstChild);
   for (; pFormChild;
        pFormChild = pFormChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    if (pFormChild->GetElementType() == eClassID &&
+    if (pFormChild->GetElementType() == eType &&
         pFormChild->GetNameHash() == dwNameHash && pFormChild->IsUnusedNode()) {
       return pFormChild;
     }
@@ -750,7 +750,7 @@
     CXFA_Node* pDataScope,
     FX_BOOL bOneInstance,
     FX_BOOL bDataMerge) {
-  XFA_Element eElement = pTemplateNode->GetElementType();
+  XFA_Element eType = pTemplateNode->GetElementType();
   CXFA_Node* pOccurNode = NULL;
   CXFA_Node* pFirstInstance = NULL;
   FX_BOOL bUseInstanceManager =
@@ -758,8 +758,8 @@
   CXFA_Node* pInstMgrNode = NULL;
   CXFA_NodeArray subformArray;
   CXFA_NodeArray* pSearchArray = NULL;
-  if (!bOneInstance && (eElement == XFA_Element::SubformSet ||
-                        eElement == XFA_Element::Subform)) {
+  if (!bOneInstance &&
+      (eType == XFA_Element::SubformSet || eType == XFA_Element::Subform)) {
     pInstMgrNode =
         bUseInstanceManager
             ? XFA_NodeMerge_CloneOrMergeInstanceManager(
@@ -796,7 +796,7 @@
     XFA_GetOccurInfo(pOccurNode, iMin, iMax, iInit);
   }
   XFA_ATTRIBUTEENUM eRelation =
-      eElement == XFA_Element::SubformSet
+      eType == XFA_Element::SubformSet
           ? pTemplateNode->GetEnum(XFA_ATTRIBUTE_Relation)
           : XFA_ATTRIBUTEENUM_Ordered;
   int32_t iCurRepeatIndex = 0;
@@ -805,7 +805,7 @@
     CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode>
         sNodeIterator(pTemplateNode);
     FX_BOOL bAccessedDataDOM = FALSE;
-    if (eElement == XFA_Element::SubformSet || eElement == XFA_Element::Area) {
+    if (eType == XFA_Element::SubformSet || eType == XFA_Element::Area) {
       sNodeIterator.MoveToNext();
     } else {
       CFX_MapPtrTemplate<CXFA_Node*, CXFA_Node*> subformMapArray;
@@ -1091,10 +1091,10 @@
                                                  FX_BOOL bDataRef,
                                                  FX_BOOL bParentDataRef) {
   FX_BOOL bMatchRef = TRUE;
-  XFA_Element eClassID = pFormNode->GetElementType();
+  XFA_Element eType = pFormNode->GetElementType();
   CXFA_Node* pDataNode = pFormNode->GetBindData();
-  if (eClassID == XFA_Element::Subform || eClassID == XFA_Element::ExclGroup ||
-      eClassID == XFA_Element::Field) {
+  if (eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup ||
+      eType == XFA_Element::Field) {
     CXFA_Node* pTemplateNode = pFormNode->GetTemplateNode();
     CXFA_Node* pTemplateNodeBind =
         pTemplateNode ? pTemplateNode->GetFirstChildByClass(XFA_Element::Bind)
@@ -1114,7 +1114,7 @@
             if (pFormNode->GetNameHash() != 0 &&
                 pFormNode->GetEnum(XFA_ATTRIBUTE_Scope) !=
                     XFA_ATTRIBUTEENUM_None) {
-              XFA_Element eDataNodeType = (eClassID == XFA_Element::Subform ||
+              XFA_Element eDataNodeType = (eType == XFA_Element::Subform ||
                                            XFA_FieldIsMultiListBox(pFormNode))
                                               ? XFA_Element::DataGroup
                                               : XFA_Element::DataValue;
@@ -1145,7 +1145,7 @@
           if (dwNameHash != 0 && !pDataNode) {
             pDataNode = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash);
             if (!pDataNode) {
-              XFA_Element eDataNodeType = (eClassID == XFA_Element::Subform ||
+              XFA_Element eDataNodeType = (eType == XFA_Element::Subform ||
                                            XFA_FieldIsMultiListBox(pFormNode))
                                               ? XFA_Element::DataGroup
                                               : XFA_Element::DataValue;
@@ -1195,9 +1195,9 @@
     }
   }
   if (bMatchRef &&
-      (eClassID == XFA_Element::Subform ||
-       eClassID == XFA_Element::SubformSet || eClassID == XFA_Element::Area ||
-       eClassID == XFA_Element::PageArea || eClassID == XFA_Element::PageSet)) {
+      (eType == XFA_Element::Subform || eType == XFA_Element::SubformSet ||
+       eType == XFA_Element::Area || eType == XFA_Element::PageArea ||
+       eType == XFA_Element::PageSet)) {
     for (CXFA_Node* pFormChild =
              pFormNode->GetNodeItem(XFA_NODEITEM_FirstChild);
          pFormChild;
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.h b/xfa/fxfa/parser/xfa_document_datamerger_imp.h
index dcf6902..f62ff8d 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.h
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.h
@@ -17,7 +17,7 @@
     CXFA_NodeArray* pSubformArray = NULL);
 CXFA_Node* XFA_DataMerge_FindDataScope(CXFA_Node* pParentFormNode);
 CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument,
-                                             XFA_Element eClassID,
+                                             XFA_Element eType,
                                              uint32_t dwNameHash,
                                              CXFA_Node* pFormParent);
 
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index 5555673..5db2025 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -371,8 +371,8 @@
     CXFA_Node* pNode,
     IFX_Stream* pStream,
     FX_BOOL bSaveXML = FALSE) {
-  XFA_Element eElement = pNode->GetElementType();
-  if (eElement == XFA_Element::Field || eElement == XFA_Element::Draw ||
+  XFA_Element eType = pNode->GetElementType();
+  if (eType == XFA_Element::Field || eType == XFA_Element::Draw ||
       !pNode->IsContainerNode()) {
     CFX_WideTextBuf buf;
     XFA_DataExporter_RegenerateFormFile_Changed(pNode, buf, bSaveXML);
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index f585717..5b33e70 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -901,29 +901,29 @@
   fContainerHeight = 0;
   bContainerWidthAutoSize = TRUE;
   bContainerHeightAutoSize = TRUE;
-  XFA_Element eClassID = pFormNode->GetElementType();
+  XFA_Element eType = pFormNode->GetElementType();
   CXFA_Measurement mTmpValue;
-  if (bContainerWidthAutoSize && (eClassID == XFA_Element::Subform ||
-                                  eClassID == XFA_Element::ExclGroup) &&
+  if (bContainerWidthAutoSize &&
+      (eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup) &&
       pFormNode->TryMeasure(XFA_ATTRIBUTE_W, mTmpValue, FALSE) &&
       mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
     fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt);
     bContainerWidthAutoSize = FALSE;
   }
-  if (bContainerHeightAutoSize && (eClassID == XFA_Element::Subform ||
-                                   eClassID == XFA_Element::ExclGroup) &&
+  if (bContainerHeightAutoSize &&
+      (eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup) &&
       pFormNode->TryMeasure(XFA_ATTRIBUTE_H, mTmpValue, FALSE) &&
       mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
     fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt);
     bContainerHeightAutoSize = FALSE;
   }
-  if (bContainerWidthAutoSize && eClassID == XFA_Element::Subform &&
+  if (bContainerWidthAutoSize && eType == XFA_Element::Subform &&
       pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxW, mTmpValue, FALSE) &&
       mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
     fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt);
     bContainerWidthAutoSize = FALSE;
   }
-  if (bContainerHeightAutoSize && eClassID == XFA_Element::Subform &&
+  if (bContainerHeightAutoSize && eType == XFA_Element::Subform &&
       pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxH, mTmpValue, FALSE) &&
       mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
     fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt);
@@ -1218,8 +1218,7 @@
     FX_FLOAT& fHeight) {
   CXFA_Node* pNode = pLayoutItem->m_pFormNode;
   ASSERT(pNode);
-  XFA_Element eClassID = pNode->GetElementType();
-  switch (eClassID) {
+  switch (pNode->GetElementType()) {
     case XFA_Element::Subform:
     case XFA_Element::Area:
     case XFA_Element::ExclGroup:
@@ -2911,8 +2910,7 @@
     FX_FLOAT fHeightLimit,
     FX_FLOAT fRealHeight,
     CXFA_LayoutContext* pContext) {
-  XFA_Element eClassID = m_pFormNode->GetElementType();
-  switch (eClassID) {
+  switch (m_pFormNode->GetElementType()) {
     case XFA_Element::Subform:
     case XFA_Element::Area:
     case XFA_Element::ExclGroup:
diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
index f5a3832..36e72db 100644
--- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp
@@ -1782,9 +1782,8 @@
     while (pNode) {
       if (pNode->IsUnusedNode()) {
         if (pNode->IsContainerNode()) {
-          XFA_Element eCurId = pNode->GetElementType();
-          if (eCurId == XFA_Element::PageArea ||
-              eCurId == XFA_Element::PageSet) {
+          XFA_Element eType = pNode->GetElementType();
+          if (eType == XFA_Element::PageArea || eType == XFA_Element::PageSet) {
             CXFA_ContainerIterator iteChild(pNode);
             CXFA_Node* pChildNode = iteChild.MoveToNext();
             for (; pChildNode; pChildNode = iteChild.MoveToNext()) {
@@ -1795,7 +1794,7 @@
                 delete pLayoutItem;
               }
             }
-          } else if (eCurId != XFA_Element::ContentArea) {
+          } else if (eType != XFA_Element::ContentArea) {
             CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>(
                 pNode->GetUserData(XFA_LAYOUTITEMKEY));
             if (pLayoutItem) {
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index 09d8183..54cacc3 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -48,7 +48,7 @@
  public:
   CXFA_Object(CXFA_Document* pDocument,
               XFA_ObjectType objectType,
-              XFA_Element elementType);
+              XFA_Element eType);
   ~CXFA_Object() override;
 
   CXFA_Document* GetDocument() const { return m_pDocument; }
@@ -93,8 +93,8 @@
 
  protected:
   CXFA_Document* const m_pDocument;
-  XFA_ObjectType m_objectType;
-  XFA_Element m_elementType;
+  const XFA_ObjectType m_objectType;
+  const XFA_Element m_elementType;
 };
 using CXFA_ObjArray = CFX_ArrayTemplate<CXFA_Object*>;
 
@@ -285,11 +285,11 @@
     return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL;
   }
   CXFA_Node* GetProperty(int32_t index,
-                         XFA_Element eProperty,
+                         XFA_Element eType,
                          FX_BOOL bCreateProperty = TRUE);
-  int32_t CountChildren(XFA_Element eElement, FX_BOOL bOnlyChild = FALSE);
+  int32_t CountChildren(XFA_Element eType, FX_BOOL bOnlyChild = FALSE);
   CXFA_Node* GetChild(int32_t index,
-                      XFA_Element eElement,
+                      XFA_Element eType,
                       FX_BOOL bOnlyChild = FALSE);
   int32_t InsertChild(int32_t index, CXFA_Node* pNode);
   FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL);
@@ -300,9 +300,9 @@
   int32_t GetNodeList(CXFA_NodeArray& nodes,
                       uint32_t dwTypeFilter = XFA_NODEFILTER_Children |
                                               XFA_NODEFILTER_Properties,
-                      XFA_Element eElementFilter = XFA_Element::Unknown,
+                      XFA_Element eTypeFilter = XFA_Element::Unknown,
                       int32_t iLevel = 1);
-  CXFA_Node* CreateSamePacketNode(XFA_Element eElement,
+  CXFA_Node* CreateSamePacketNode(XFA_Element eType,
                                   uint32_t dwFlags = XFA_NodeFlag_Initialized);
   CXFA_Node* CloneTemplateToForm(FX_BOOL bRecursive);
   CXFA_Node* GetTemplateNode() const;
@@ -320,10 +320,10 @@
   XFA_ATTRIBUTEENUM GetIntact();
   CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const;
   CXFA_Node* GetFirstChildByName(uint32_t dwNodeNameHash) const;
-  CXFA_Node* GetFirstChildByClass(XFA_Element eNodeClass) const;
+  CXFA_Node* GetFirstChildByClass(XFA_Element eType) const;
   CXFA_Node* GetNextSameNameSibling(uint32_t dwNodeNameHash) const;
   CXFA_Node* GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const;
-  CXFA_Node* GetNextSameClassSibling(XFA_Element eNodeClass) const;
+  CXFA_Node* GetNextSameClassSibling(XFA_Element eType) const;
   int32_t GetNodeSameNameIndex() const;
   int32_t GetNodeSameClassIndex() const;
   void GetSOMExpression(CFX_WideString& wsSOMExpression);
@@ -616,7 +616,7 @@
  protected:
   friend class CXFA_Document;
 
-  CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eElement);
+  CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eType);
   ~CXFA_Node() override;
 
   bool HasFlag(XFA_NodeFlag dwFlag) const;
@@ -633,7 +633,7 @@
   void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify);
   void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, FX_BOOL bScriptModify);
   int32_t execSingleEventByName(const CFX_WideStringC& wsEventName,
-                                XFA_Element eElementType);
+                                XFA_Element eType);
   FX_BOOL SetScriptContent(const CFX_WideString& wsContent,
                            const CFX_WideString& wsXMLValue,
                            bool bNotify = true,
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 946df7a..06ffb10 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -43,8 +43,8 @@
 XFA_MAPDATABLOCKCALLBACKINFO deleteWideStringCallBack = {XFA_DeleteWideString,
                                                          XFA_CopyWideString};
 
-XFA_ObjectType XFA_GetElementObjectType(XFA_Element eElement) {
-  return XFA_GetElementByID(eElement)->eObjectType;
+XFA_ObjectType XFA_GetElementObjectType(XFA_Element eType) {
+  return XFA_GetElementByID(eType)->eObjectType;
 }
 
 void XFA_DataNodeDeleteBindItem(void* pData) {
@@ -108,10 +108,8 @@
 
 XFA_MAPMODULEDATA::~XFA_MAPMODULEDATA() {}
 
-CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
-                     uint16_t ePacket,
-                     XFA_Element eElement)
-    : CXFA_Object(pDoc, XFA_GetElementObjectType(eElement), eElement),
+CXFA_Node::CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eType)
+    : CXFA_Object(pDoc, XFA_GetElementObjectType(eType), eType),
       m_pNext(nullptr),
       m_pChild(nullptr),
       m_pLastChild(nullptr),
@@ -240,18 +238,18 @@
 
 int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes,
                                uint32_t dwTypeFilter,
-                               XFA_Element eElementFilter,
+                               XFA_Element eTypeFilter,
                                int32_t iLevel) {
   if (--iLevel < 0) {
     return nodes.GetSize();
   }
-  if (eElementFilter != XFA_Element::Unknown) {
+  if (eTypeFilter != XFA_Element::Unknown) {
     CXFA_Node* pChild = m_pChild;
     while (pChild) {
-      if (pChild->GetElementType() == eElementFilter) {
+      if (pChild->GetElementType() == eTypeFilter) {
         nodes.Add(pChild);
         if (iLevel > 0) {
-          GetNodeList(nodes, dwTypeFilter, eElementFilter, iLevel);
+          GetNodeList(nodes, dwTypeFilter, eTypeFilter, iLevel);
         }
       }
       pChild = pChild->m_pNext;
@@ -262,7 +260,7 @@
     while (pChild) {
       nodes.Add(pChild);
       if (iLevel > 0) {
-        GetNodeList(nodes, dwTypeFilter, eElementFilter, iLevel);
+        GetNodeList(nodes, dwTypeFilter, eTypeFilter, iLevel);
       }
       pChild = pChild->m_pNext;
     }
@@ -316,10 +314,10 @@
   return nodes.GetSize();
 }
 
-CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_Element eElement,
+CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_Element eType,
                                            uint32_t dwFlags) {
   CXFA_Document* pFactory = m_pDocument->GetParser()->GetFactory();
-  CXFA_Node* pNode = pFactory->CreateNode(m_ePacket, eElement);
+  CXFA_Node* pNode = pFactory->CreateNode(m_ePacket, eType);
   pNode->SetFlag(dwFlags, true);
   return pNode;
 }
@@ -439,14 +437,14 @@
 CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() {
   if (GetPacketID() != XFA_XDPPACKET_Form)
     return nullptr;
-  XFA_Element classID = GetElementType();
-  if (classID == XFA_Element::ExclGroup)
+  XFA_Element eType = GetElementType();
+  if (eType == XFA_Element::ExclGroup)
     return nullptr;
   CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent);
   if (pParentNode && pParentNode->GetElementType() == XFA_Element::ExclGroup)
     return nullptr;
 
-  if (classID == XFA_Element::Field) {
+  if (eType == XFA_Element::Field) {
     CXFA_WidgetData* pFieldWidgetData = GetWidgetData();
     if (pFieldWidgetData &&
         pFieldWidgetData->GetChoiceListOpen() ==
@@ -531,7 +529,6 @@
 }
 
 XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
-  XFA_Element eElement = GetElementType();
   CXFA_Node* pKeep = GetFirstChildByClass(XFA_Element::Keep);
   XFA_ATTRIBUTEENUM eLayoutType = GetEnum(XFA_ATTRIBUTE_Layout);
   if (pKeep) {
@@ -563,7 +560,7 @@
       return eIntact;
     }
   }
-  switch (eElement) {
+  switch (GetElementType()) {
     case XFA_Element::Subform:
       switch (eLayoutType) {
         case XFA_ATTRIBUTEENUM_Position:
@@ -1286,8 +1283,7 @@
   }
 
   bool bNeedFindContainer = false;
-  XFA_Element eType = GetElementType();
-  switch (eType) {
+  switch (GetElementType()) {
     case XFA_Element::Caption:
       bNeedFindContainer = true;
       pNotify->OnValueChanged(this, eAttribute, this,
@@ -1383,8 +1379,8 @@
       if (!pValueNode) {
         return;
       }
-      XFA_Element eNodeType = pValueNode->GetElementType();
-      if (eNodeType == XFA_Element::Value) {
+      XFA_Element eType = pValueNode->GetElementType();
+      if (eType == XFA_Element::Value) {
         bNeedFindContainer = true;
         CXFA_Node* pNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent);
         if (pNode && pNode->IsContainerNode()) {
@@ -1397,7 +1393,7 @@
                                   pNode->GetNodeItem(XFA_NODEITEM_Parent));
         }
       } else {
-        if (eNodeType == XFA_Element::Items) {
+        if (eType == XFA_Element::Items) {
           CXFA_Node* pNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent);
           if (pNode && pNode->IsContainerNode()) {
             pNotify->OnValueChanged(this, eAttribute, pValueNode, pNode);
@@ -1598,14 +1594,16 @@
 void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
                                         FX_BOOL bSetting,
                                         XFA_ATTRIBUTE eAttribute) {
-  XFA_Element classID = GetElementType();
-  if (classID == XFA_Element::Field) {
+  XFA_Element eType = GetElementType();
+  if (eType == XFA_Element::Field) {
     Script_Field_DefaultValue(pValue, bSetting, eAttribute);
     return;
-  } else if (classID == XFA_Element::Draw) {
+  }
+  if (eType == XFA_Element::Draw) {
     Script_Draw_DefaultValue(pValue, bSetting, eAttribute);
     return;
-  } else if (classID == XFA_Element::Boolean) {
+  }
+  if (eType == XFA_Element::Boolean) {
     Script_Boolean_Value(pValue, bSetting, eAttribute);
     return;
   }
@@ -1644,13 +1642,12 @@
     SetScriptContent(wsNewValue, wsFormatValue, true, TRUE);
   } else {
     CFX_WideString content = GetScriptContent(TRUE);
-    if (content.IsEmpty() && classID != XFA_Element::Text &&
-        classID != XFA_Element::SubmitUrl) {
+    if (content.IsEmpty() && eType != XFA_Element::Text &&
+        eType != XFA_Element::SubmitUrl) {
       pValue->SetNull();
-    } else if (classID == XFA_Element::Integer) {
+    } else if (eType == XFA_Element::Integer) {
       pValue->SetInteger(FXSYS_wtoi(content.c_str()));
-    } else if (classID == XFA_Element::Float ||
-               classID == XFA_Element::Decimal) {
+    } else if (eType == XFA_Element::Float || eType == XFA_Element::Decimal) {
       CFX_Decimal decimal(content.AsStringC());
       pValue->SetFloat((FX_FLOAT)(double)decimal);
     } else {
@@ -1947,11 +1944,10 @@
       pValue->SetNull();
     } else {
       CXFA_Node* pUIChild = pWidgetData->GetUIChild();
-      XFA_Element eUI = pUIChild->GetElementType();
       CXFA_Value defVal = pWidgetData->GetFormValue();
       CXFA_Node* pNode = defVal.GetNode()->GetNodeItem(XFA_NODEITEM_FirstChild);
       if (pNode && pNode->GetElementType() == XFA_Element::Decimal) {
-        if (eUI == XFA_Element::NumericEdit &&
+        if (pUIChild->GetElementType() == XFA_Element::NumericEdit &&
             (pNode->GetInteger(XFA_ATTRIBUTE_FracDigits) == -1)) {
           pValue->SetString(
               FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
@@ -3601,8 +3597,8 @@
   uint32_t dwKey = FX_HashCode_GetW(wsKey, false);
   return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
 }
-void* XFA_GetMapKey_Element(XFA_Element eElement, XFA_ATTRIBUTE eAttribute) {
-  return (void*)(uintptr_t)((static_cast<int32_t>(eElement) << 16) |
+void* XFA_GetMapKey_Element(XFA_Element eType, XFA_ATTRIBUTE eAttribute) {
+  return (void*)(uintptr_t)((static_cast<int32_t>(eType) << 16) |
                             (eAttribute << 8) | XFA_KEYTYPE_Element);
 }
 FX_BOOL CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit) {
@@ -4358,10 +4354,10 @@
 CXFA_Node* CXFA_Node::GetProperty(int32_t index,
                                   XFA_Element eProperty,
                                   FX_BOOL bCreateProperty) {
-  XFA_Element eElement = GetElementType();
+  XFA_Element eType = GetElementType();
   uint32_t dwPacket = GetPacketID();
   const XFA_PROPERTY* pProperty =
-      XFA_GetPropertyOfElement(eElement, eProperty, dwPacket);
+      XFA_GetPropertyOfElement(eType, eProperty, dwPacket);
   if (!pProperty || index >= pProperty->uOccur)
     return nullptr;
 
@@ -4382,7 +4378,7 @@
     pNode = m_pChild;
     for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
       const XFA_PROPERTY* pExistProperty =
-          XFA_GetPropertyOfElement(eElement, pNode->GetElementType(), dwPacket);
+          XFA_GetPropertyOfElement(eType, pNode->GetElementType(), dwPacket);
       if (pExistProperty && (pExistProperty->uFlags & XFA_PROPERTYFLAG_OneOf))
         return nullptr;
     }
@@ -4399,12 +4395,11 @@
   }
   return pNewNode;
 }
-int32_t CXFA_Node::CountChildren(XFA_Element eElement, FX_BOOL bOnlyChild) {
+int32_t CXFA_Node::CountChildren(XFA_Element eType, FX_BOOL bOnlyChild) {
   CXFA_Node* pNode = m_pChild;
   int32_t iCount = 0;
   for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    if (pNode->GetElementType() == eElement ||
-        eElement == XFA_Element::Unknown) {
+    if (pNode->GetElementType() == eType || eType == XFA_Element::Unknown) {
       if (bOnlyChild) {
         const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement(
             GetElementType(), pNode->GetElementType(), XFA_XDPPACKET_UNKNOWN);
@@ -4418,14 +4413,13 @@
   return iCount;
 }
 CXFA_Node* CXFA_Node::GetChild(int32_t index,
-                               XFA_Element eElement,
+                               XFA_Element eType,
                                FX_BOOL bOnlyChild) {
   ASSERT(index > -1);
   CXFA_Node* pNode = m_pChild;
   int32_t iCount = 0;
   for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    if (pNode->GetElementType() == eElement ||
-        eElement == XFA_Element::Unknown) {
+    if (pNode->GetElementType() == eType || eType == XFA_Element::Unknown) {
       if (bOnlyChild) {
         const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement(
             GetElementType(), pNode->GetElementType(), XFA_XDPPACKET_UNKNOWN);
@@ -4610,10 +4604,10 @@
   }
   return nullptr;
 }
-CXFA_Node* CXFA_Node::GetFirstChildByClass(XFA_Element eElement) const {
+CXFA_Node* CXFA_Node::GetFirstChildByClass(XFA_Element eType) const {
   for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_FirstChild); pNode;
        pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    if (pNode->GetElementType() == eElement) {
+    if (pNode->GetElementType() == eType) {
       return pNode;
     }
   }
@@ -4632,10 +4626,10 @@
     const CFX_WideStringC& wsNodeName) const {
   return GetNextSameNameSibling(FX_HashCode_GetW(wsNodeName, false));
 }
-CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_Element eElement) const {
+CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_Element eType) const {
   for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_NextSibling); pNode;
        pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    if (pNode->GetElementType() == eElement) {
+    if (pNode->GetElementType() == eType) {
       return pNode;
     }
   }
@@ -4745,7 +4739,7 @@
 }
 
 int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName,
-                                         XFA_Element eElementType) {
+                                         XFA_Element eType) {
   int32_t iRet = XFA_EVENTERROR_NotExist;
   const XFA_ExecEventParaInfo* eventParaInfo =
       GetEventParaInfoByName(wsEventName);
@@ -4761,13 +4755,12 @@
       iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
                                            FALSE, FALSE);
     } else if (validFlags == 3) {
-      if (eElementType == XFA_Element::Subform) {
+      if (eType == XFA_Element::Subform) {
         iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
                                              FALSE, FALSE);
       }
     } else if (validFlags == 4) {
-      if (eElementType == XFA_Element::ExclGroup ||
-          eElementType == XFA_Element::Field) {
+      if (eType == XFA_Element::ExclGroup || eType == XFA_Element::Field) {
         CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent);
         if (pParentNode &&
             pParentNode->GetElementType() == XFA_Element::ExclGroup) {
@@ -4778,7 +4771,7 @@
                                              FALSE, FALSE);
       }
     } else if (validFlags == 5) {
-      if (eElementType == XFA_Element::Field) {
+      if (eType == XFA_Element::Field) {
         iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
                                              FALSE, FALSE);
       }
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index b2f9b25..ee7576e 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -357,13 +357,13 @@
   CXFA_ScriptContext* lpScriptContext =
       pObject->GetDocument()->GetScriptContext();
   pObject = lpScriptContext->GetVariablesThis(pObject);
-  XFA_Element objElement = pObject->GetElementType();
+  XFA_Element eType = pObject->GetElementType();
   CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
-  if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
+  if (XFA_GetMethodByName(eType, wsPropName.AsStringC())) {
     return FXJSE_ClassPropType_Method;
   }
   if (bQueryIn &&
-      !XFA_GetScriptAttributeByName(objElement, wsPropName.AsStringC())) {
+      !XFA_GetScriptAttributeByName(eType, wsPropName.AsStringC())) {
     return FXJSE_ClassPropType_None;
   }
   return FXJSE_ClassPropType_Property;
@@ -379,9 +379,9 @@
   CXFA_ScriptContext* lpScriptContext =
       pObject->GetDocument()->GetScriptContext();
   pObject = lpScriptContext->GetVariablesThis(pObject);
-  XFA_Element objElement = pObject->GetElementType();
+  XFA_Element eType = pObject->GetElementType();
   CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
-  if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
+  if (XFA_GetMethodByName(eType, wsPropName.AsStringC())) {
     return FXJSE_ClassPropType_Method;
   }
   return FXJSE_ClassPropType_Property;
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index 81c7335..de47bd2 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -248,12 +248,9 @@
             if (!pItemChild->IsContentLayoutItem()) {
               continue;
             }
-            XFA_Element eElementType =
-                pItemChild->m_pFormNode->GetElementType();
-            if (eElementType != XFA_Element::Field &&
-                eElementType != XFA_Element::Draw &&
-                eElementType != XFA_Element::Subform &&
-                eElementType != XFA_Element::Area) {
+            XFA_Element eType = pItemChild->m_pFormNode->GetElementType();
+            if (eType != XFA_Element::Field && eType != XFA_Element::Draw &&
+                eType != XFA_Element::Subform && eType != XFA_Element::Area) {
               continue;
             }
             if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode))
@@ -273,12 +270,9 @@
             if (!pItemChild->IsContentLayoutItem()) {
               continue;
             }
-            XFA_Element eElementType =
-                pItemChild->m_pFormNode->GetElementType();
-            if (eElementType != XFA_Element::Field &&
-                eElementType != XFA_Element::Draw &&
-                eElementType != XFA_Element::Subform &&
-                eElementType != XFA_Element::Area) {
+            XFA_Element eType = pItemChild->m_pFormNode->GetElementType();
+            if (eType != XFA_Element::Field && eType != XFA_Element::Draw &&
+                eType != XFA_Element::Subform && eType != XFA_Element::Area) {
               continue;
             }
             if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode))
diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
index 5c39443..0fd5ff2 100644
--- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp
+++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
@@ -223,9 +223,9 @@
     if (parent == NULL) {
       break;
     }
-    XFA_Element parentElement = parent->GetElementType();
-    if ((!parent->IsUnnamed() && parentElement != XFA_Element::SubformSet) ||
-        parentElement == XFA_Element::Variables) {
+    XFA_Element parentType = parent->GetElementType();
+    if ((!parent->IsUnnamed() && parentType != XFA_Element::SubformSet) ||
+        parentType == XFA_Element::Variables) {
       break;
     }
     node = parent;
@@ -305,10 +305,10 @@
   if (refNode == NULL) {
     return FALSE;
   }
-  XFA_Element eRefNode = refNode->GetElementType();
+  XFA_Element refNodeType = refNode->GetElementType();
   if ((refNode->IsUnnamed() && refNode->IsContainerNode()) ||
-      eRefNode == XFA_Element::SubformSet || eRefNode == XFA_Element::Area ||
-      eRefNode == XFA_Element::Proto) {
+      refNodeType == XFA_Element::SubformSet ||
+      refNodeType == XFA_Element::Area || refNodeType == XFA_Element::Proto) {
     return TRUE;
   }
   return FALSE;
diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp
index 9e9788e..9220601 100644
--- a/xfa/fxfa/parser/xfa_utils_imp.cpp
+++ b/xfa/fxfa/parser/xfa_utils_imp.cpp
@@ -62,12 +62,13 @@
   CXFA_Node* pUI = pNode->GetProperty(0, XFA_Element::Ui, TRUE);
   CXFA_Node* pChild = pUI->GetNodeItem(XFA_NODEITEM_FirstChild);
   for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
-    XFA_Element eChild = pChild->GetElementType();
-    if (eChild == XFA_Element::Extras || eChild == XFA_Element::Picture) {
+    XFA_Element eChildType = pChild->GetElementType();
+    if (eChildType == XFA_Element::Extras ||
+        eChildType == XFA_Element::Picture) {
       continue;
     }
-    const XFA_PROPERTY* pProperty =
-        XFA_GetPropertyOfElement(XFA_Element::Ui, eChild, XFA_XDPPACKET_Form);
+    const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement(
+        XFA_Element::Ui, eChildType, XFA_XDPPACKET_Form);
     if (pProperty && (pProperty->uFlags & XFA_PROPERTYFLAG_OneOf)) {
       pUIChild = pChild;
       break;
@@ -153,8 +154,7 @@
     return CXFA_LocaleValue();
   }
   int32_t iVTType = XFA_VT_NULL;
-  XFA_Element eType = pValueChild->GetElementType();
-  switch (eType) {
+  switch (pValueChild->GetElementType()) {
     case XFA_Element::Decimal:
       iVTType = XFA_VT_DECIMAL;
       break;