Bug 1310015: Change MainAxisTracker to consistently use NS_STYLE_JUSTIFY constants. r?dholbert draft
authorBrad Werth <bwerth@mozilla.com>
Thu, 13 Oct 2016 14:20:48 -0700
changeset 424952 140814d6ad398cbb2106db008cbe9ad188a1a5d2
parent 424323 26f2e65163e9f3cfab071a9823293217b1e1de8d
child 533806 0cc3e08d53d609a026b30126c1aa42c18f61aafc
push id32301
push userbwerth@mozilla.com
push dateThu, 13 Oct 2016 21:21:10 +0000
reviewersdholbert
bugs1310015
milestone52.0a1
Bug 1310015: Change MainAxisTracker to consistently use NS_STYLE_JUSTIFY constants. r?dholbert MozReview-Commit-ID: F8VfIuZJqFa
layout/generic/nsFlexContainerFrame.cpp
--- 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;