summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 09:20:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 09:20:32 -0700
commit41cb62ec84f8e8ca4ce8075fd4d825f8e22292a2 (patch)
treea47d8cdef2e2c628b4698e6467fd6cd1fb5646a2 /xfa/fxfa/parser/xfa_layout_itemlayout.cpp
parentab5b60edba7e8e80d7ee964d58e58b384fcfe5ee (diff)
downloadpdfium-41cb62ec84f8e8ca4ce8075fd4d825f8e22292a2.tar.xz
Cleanup some variable namings.chromium/2778
This CL cleans up some variable namings from the XFA_Element enum change. Review-Url: https://codereview.chromium.org/2093663002
Diffstat (limited to 'xfa/fxfa/parser/xfa_layout_itemlayout.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index f5857178da..5b33e70c36 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -901,29 +901,29 @@ static inline void XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize(
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 @@ static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize(
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 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout(
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: