Bug 1310015: Change MainAxisTracker to consistently use NS_STYLE_JUSTIFY constants. r?dholbert
MozReview-Commit-ID: F8VfIuZJqFa
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -2612,29 +2612,29 @@ MainAxisPositionTracker::
if (mJustifyContent == NS_STYLE_JUSTIFY_SPACE_BETWEEN) {
mJustifyContent = NS_STYLE_JUSTIFY_FLEX_START;
} else if (mJustifyContent == NS_STYLE_JUSTIFY_SPACE_AROUND) {
mJustifyContent = NS_STYLE_JUSTIFY_CENTER;
}
}
// Map 'left'/'right' to 'start'/'end'
- if (mJustifyContent == NS_STYLE_ALIGN_LEFT ||
- mJustifyContent == NS_STYLE_ALIGN_RIGHT) {
+ if (mJustifyContent == NS_STYLE_JUSTIFY_LEFT ||
+ mJustifyContent == NS_STYLE_JUSTIFY_RIGHT) {
if (aAxisTracker.IsColumnOriented()) {
// Container's alignment axis is not parallel to the inline axis,
// so we map both 'left' and 'right' to 'start'.
- mJustifyContent = NS_STYLE_ALIGN_START;
+ mJustifyContent = NS_STYLE_JUSTIFY_START;
} else {
// Row-oriented, so we map 'left' and 'right' to 'start' or 'end',
// depending on left-to-right writing mode.
const bool isLTR = aAxisTracker.GetWritingMode().IsBidiLTR();
- const bool isAlignLeft = (mJustifyContent == NS_STYLE_ALIGN_LEFT);
- mJustifyContent = (isAlignLeft == isLTR) ? NS_STYLE_ALIGN_START
- : NS_STYLE_ALIGN_END;
+ const bool isJustifyLeft = (mJustifyContent == NS_STYLE_JUSTIFY_LEFT);
+ mJustifyContent = (isJustifyLeft == isLTR) ? NS_STYLE_JUSTIFY_START
+ : NS_STYLE_JUSTIFY_END;
}
}
// Map 'start'/'end' to 'flex-start'/'flex-end'.
if (mJustifyContent == NS_STYLE_JUSTIFY_START) {
mJustifyContent = NS_STYLE_JUSTIFY_FLEX_START;
} else if (mJustifyContent == NS_STYLE_JUSTIFY_END) {
mJustifyContent = NS_STYLE_JUSTIFY_FLEX_END;