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
--- 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: