Bug 1158290 part 1: Use AvailableBSize instead of AvailableHeight, throughout flex layout. r=mats

This patch was auto-generated, with the following command:
  sed -i "s/vailableHeight/vailableBSize/g" nsFlexContainerFrame.*
This commit is contained in:
Daniel Holbert 2015-05-12 13:34:22 -07:00
parent e550c8cefd
commit f82cdd0c52
2 changed files with 29 additions and 29 deletions

View File

@ -3070,7 +3070,7 @@ nsFlexContainerFrame::GenerateFlexLines(
nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nscoord aContentBoxMainSize,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
const nsTArray<StrutInfo>& aStruts,
const FlexboxAxisTracker& aAxisTracker,
LinkedList<FlexLine>& aLines)
@ -3115,8 +3115,8 @@ nsFlexContainerFrame::GenerateFlexLines(
// Also: if we're vertical and paginating, we may need to wrap sooner
// (before we run off the end of the page)
if (!aAxisTracker.IsMainAxisHorizontal() &&
aAvailableHeightForContent != NS_UNCONSTRAINEDSIZE) {
wrapThreshold = std::min(wrapThreshold, aAvailableHeightForContent);
aAvailableBSizeForContent != NS_UNCONSTRAINEDSIZE) {
wrapThreshold = std::min(wrapThreshold, aAvailableBSizeForContent);
}
}
@ -3212,7 +3212,7 @@ static nscoord
ClampFlexContainerMainSize(const nsHTMLReflowState& aReflowState,
const FlexboxAxisTracker& aAxisTracker,
nscoord aUnclampedMainSize,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
const FlexLine* aFirstLine,
nsReflowStatus& aStatus)
{
@ -3227,8 +3227,8 @@ ClampFlexContainerMainSize(const nsHTMLReflowState& aReflowState,
if (aUnclampedMainSize != NS_INTRINSICSIZE) {
// Vertical case, with fixed height:
if (aAvailableHeightForContent == NS_UNCONSTRAINEDSIZE ||
aUnclampedMainSize < aAvailableHeightForContent) {
if (aAvailableBSizeForContent == NS_UNCONSTRAINEDSIZE ||
aUnclampedMainSize < aAvailableBSizeForContent) {
// Not in a fragmenting context, OR no need to fragment because we have
// more available height than we need. Either way, just use our fixed
// height. (Note that the reflow state has already done the appropriate
@ -3246,8 +3246,8 @@ ClampFlexContainerMainSize(const nsHTMLReflowState& aReflowState,
NS_FRAME_SET_INCOMPLETE(aStatus);
nscoord largestLineOuterSize = GetLargestLineMainSize(aFirstLine);
if (largestLineOuterSize <= aAvailableHeightForContent) {
return aAvailableHeightForContent;
if (largestLineOuterSize <= aAvailableBSizeForContent) {
return aAvailableBSizeForContent;
}
return std::min(aUnclampedMainSize, largestLineOuterSize);
}
@ -3255,7 +3255,7 @@ ClampFlexContainerMainSize(const nsHTMLReflowState& aReflowState,
// Vertical case, with auto-height:
// Resolve auto-height to the largest FlexLine-length, clamped to our
// computed min/max main-size properties (min-height & max-height).
// XXXdholbert Handle constrained-aAvailableHeightForContent case here.
// XXXdholbert Handle constrained-aAvailableBSizeForContent case here.
nscoord largestLineOuterSize = GetLargestLineMainSize(aFirstLine);
return NS_CSS_MINMAX(largestLineOuterSize,
aReflowState.ComputedMinHeight(),
@ -3266,7 +3266,7 @@ nscoord
nsFlexContainerFrame::ComputeCrossSize(const nsHTMLReflowState& aReflowState,
const FlexboxAxisTracker& aAxisTracker,
nscoord aSumLineCrossSizes,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
bool* aIsDefinite,
nsReflowStatus& aStatus)
{
@ -3283,8 +3283,8 @@ nsFlexContainerFrame::ComputeCrossSize(const nsHTMLReflowState& aReflowState,
if (effectiveComputedBSize != NS_INTRINSICSIZE) {
// Cross-axis is vertical, and we have a fixed height:
*aIsDefinite = true;
if (aAvailableHeightForContent == NS_UNCONSTRAINEDSIZE ||
effectiveComputedBSize < aAvailableHeightForContent) {
if (aAvailableBSizeForContent == NS_UNCONSTRAINEDSIZE ||
effectiveComputedBSize < aAvailableBSizeForContent) {
// Not in a fragmenting context, OR no need to fragment because we have
// more available height than we need. Either way, just use our fixed
// height. (Note that the reflow state has already done the appropriate
@ -3300,15 +3300,15 @@ nsFlexContainerFrame::ComputeCrossSize(const nsHTMLReflowState& aReflowState,
// continuation or splitting children, so "amount of height required by
// our children" is just our line-height.
NS_FRAME_SET_INCOMPLETE(aStatus);
if (aSumLineCrossSizes <= aAvailableHeightForContent) {
return aAvailableHeightForContent;
if (aSumLineCrossSizes <= aAvailableBSizeForContent) {
return aAvailableBSizeForContent;
}
return std::min(effectiveComputedBSize, aSumLineCrossSizes);
}
// Cross axis is vertical and we have auto-height: shrink-wrap our line(s),
// subject to our min-size / max-size constraints in that (vertical) axis.
// XXXdholbert Handle constrained-aAvailableHeightForContent case here.
// XXXdholbert Handle constrained-aAvailableBSizeForContent case here.
*aIsDefinite = false;
return NS_CSS_MINMAX(aSumLineCrossSizes,
aReflowState.ComputedMinHeight(),
@ -3537,12 +3537,12 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
// borderpadding-top from it, to get the available height for our
// content box. (Don't subtract if we're skipping top border/padding,
// though.)
nscoord availableHeightForContent = aReflowState.AvailableHeight();
if (availableHeightForContent != NS_UNCONSTRAINEDSIZE &&
nscoord availableBSizeForContent = aReflowState.AvailableBSize();
if (availableBSizeForContent != NS_UNCONSTRAINEDSIZE &&
!GetSkipSides().Top()) {
availableHeightForContent -= aReflowState.ComputedPhysicalBorderPadding().top;
// (Don't let that push availableHeightForContent below zero, though):
availableHeightForContent = std::max(availableHeightForContent, 0);
availableBSizeForContent -= aReflowState.ComputedPhysicalBorderPadding().top;
// (Don't let that push availableBSizeForContent below zero, though):
availableBSizeForContent = std::max(availableBSizeForContent, 0);
}
nscoord contentBoxMainSize = GetMainSizeFromReflowState(aReflowState,
@ -3550,13 +3550,13 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
nsAutoTArray<StrutInfo, 1> struts;
DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus,
contentBoxMainSize, availableHeightForContent,
contentBoxMainSize, availableBSizeForContent,
struts, axisTracker);
if (!struts.IsEmpty()) {
// We're restarting flex layout, with new knowledge of collapsed items.
DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus,
contentBoxMainSize, availableHeightForContent,
contentBoxMainSize, availableBSizeForContent,
struts, axisTracker);
}
}
@ -3595,7 +3595,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus,
nscoord aContentBoxMainSize,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
nsTArray<StrutInfo>& aStruts,
const FlexboxAxisTracker& aAxisTracker)
{
@ -3606,12 +3606,12 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
GenerateFlexLines(aPresContext, aReflowState,
aContentBoxMainSize,
aAvailableHeightForContent,
aAvailableBSizeForContent,
aStruts, aAxisTracker, lines);
aContentBoxMainSize =
ClampFlexContainerMainSize(aReflowState, aAxisTracker,
aContentBoxMainSize, aAvailableHeightForContent,
aContentBoxMainSize, aAvailableBSizeForContent,
lines.getFirst(), aStatus);
for (FlexLine* line = lines.getFirst(); line; line = line->getNext()) {
@ -3671,7 +3671,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
bool isCrossSizeDefinite;
const nscoord contentBoxCrossSize =
ComputeCrossSize(aReflowState, aAxisTracker, sumLineCrossSizes,
aAvailableHeightForContent, &isCrossSizeDefinite, aStatus);
aAvailableBSizeForContent, &isCrossSizeDefinite, aStatus);
// Set up state for cross-axis alignment, at a high level (outside the
// scope of a particular flex line)

View File

@ -86,7 +86,7 @@ protected:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus,
nscoord aContentBoxMainSize,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
nsTArray<StrutInfo>& aStruts,
const FlexboxAxisTracker& aAxisTracker);
@ -151,7 +151,7 @@ protected:
void GenerateFlexLines(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nscoord aContentBoxMainSize,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
const nsTArray<StrutInfo>& aStruts,
const FlexboxAxisTracker& aAxisTracker,
mozilla::LinkedList<FlexLine>& aLines);
@ -162,7 +162,7 @@ protected:
nscoord ComputeCrossSize(const nsHTMLReflowState& aReflowState,
const FlexboxAxisTracker& aAxisTracker,
nscoord aSumLineCrossSizes,
nscoord aAvailableHeightForContent,
nscoord aAvailableBSizeForContent,
bool* aIsDefinite,
nsReflowStatus& aStatus);