Bug 1174003 part 4: [css-flexbox] Remove IsMainAxisHorizontal() check from DoFlexLayout(). r?mats draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 27 Feb 2018 15:40:18 -0800
changeset 760682 ebdefc1a94f6df0ee048de330e9477fc5264eb8d
parent 760681 aa3b6f2846bf1446566595e26be9934cadaf7cbc
child 760683 fb87314e2c86924c78de50440fd97686ebc043b3
push id100718
push userdholbert@mozilla.com
push dateTue, 27 Feb 2018 23:41:18 +0000
reviewersmats
bugs1174003
milestone60.0a1
Bug 1174003 part 4: [css-flexbox] Remove IsMainAxisHorizontal() check from DoFlexLayout(). r?mats This patch doesn't affect behavior. It just replaces some (correct) physical-axis-dependent code with equivalent logical-axis-dependent code. MozReview-Commit-ID: 27QJU2cFWh
layout/generic/nsFlexContainerFrame.cpp
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -4515,20 +4515,20 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
 
         WritingMode wm = item->Frame()->GetWritingMode();
         LogicalSize availSize = aReflowInput.ComputedSize(wm);
         availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
         ReflowInput childReflowInput(aPresContext, aReflowInput,
                                      item->Frame(), availSize);
         if (!sizeOverride) {
           // Directly override the computed main-size, by tweaking reflow state:
-          if (aAxisTracker.IsMainAxisHorizontal()) {
-            childReflowInput.SetComputedWidth(item->GetMainSize());
+          if (item->IsInlineAxisMainAxis()) {
+            childReflowInput.SetComputedISize(item->GetMainSize());
           } else {
-            childReflowInput.SetComputedHeight(item->GetMainSize());
+            childReflowInput.SetComputedBSize(item->GetMainSize());
           }
         }
 
         SizeItemInCrossAxis(aPresContext, aAxisTracker,
                             childReflowInput, *item);
       }
     }
     // Now that we've finished with this line's items, size the line itself: