Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron

This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb
This commit is contained in:
Ting-Yu Lin
2016-07-21 18:36:39 +08:00
parent a08167a376
commit d3e8cf1818
154 changed files with 2412 additions and 2412 deletions

View File

@@ -106,12 +106,12 @@ nsNumberControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
void
nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowState,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsNumberControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
NS_ASSERTION(mOuterWrapper, "Outer wrapper div must exist!");
@@ -127,22 +127,22 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
nsFormControlFrame::RegUnRegAccessKey(this, true);
}
const WritingMode myWM = aReflowState.GetWritingMode();
const WritingMode myWM = aReflowInput.GetWritingMode();
// The ISize of our content box, which is the available ISize
// for our anonymous content:
const nscoord contentBoxISize = aReflowState.ComputedISize();
nscoord contentBoxBSize = aReflowState.ComputedBSize();
const nscoord contentBoxISize = aReflowInput.ComputedISize();
nscoord contentBoxBSize = aReflowInput.ComputedBSize();
// Figure out our border-box sizes as well (by adding borderPadding to
// content-box sizes):
const nscoord borderBoxISize = contentBoxISize +
aReflowState.ComputedLogicalBorderPadding().IStartEnd(myWM);
aReflowInput.ComputedLogicalBorderPadding().IStartEnd(myWM);
nscoord borderBoxBSize;
if (contentBoxBSize != NS_INTRINSICSIZE) {
borderBoxBSize = contentBoxBSize +
aReflowState.ComputedLogicalBorderPadding().BStartEnd(myWM);
aReflowInput.ComputedLogicalBorderPadding().BStartEnd(myWM);
} // else, we'll figure out borderBoxBSize after we resolve contentBoxBSize.
nsIFrame* outerWrapperFrame = mOuterWrapper->GetPrimaryFrame();
@@ -151,30 +151,30 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
if (contentBoxBSize == NS_INTRINSICSIZE) {
contentBoxBSize = 0;
borderBoxBSize =
aReflowState.ComputedLogicalBorderPadding().BStartEnd(myWM);
aReflowInput.ComputedLogicalBorderPadding().BStartEnd(myWM);
}
} else {
NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?");
ReflowOutput wrappersDesiredSize(aReflowState);
ReflowOutput wrappersDesiredSize(aReflowInput);
WritingMode wrapperWM = outerWrapperFrame->GetWritingMode();
LogicalSize availSize = aReflowState.ComputedSize(wrapperWM);
LogicalSize availSize = aReflowInput.ComputedSize(wrapperWM);
availSize.BSize(wrapperWM) = NS_UNCONSTRAINEDSIZE;
ReflowInput wrapperReflowState(aPresContext, aReflowState,
ReflowInput wrapperReflowInput(aPresContext, aReflowInput,
outerWrapperFrame, availSize);
// Convert wrapper margin into my own writing-mode (in case it differs):
LogicalMargin wrapperMargin =
wrapperReflowState.ComputedLogicalMargin().ConvertTo(myWM, wrapperWM);
wrapperReflowInput.ComputedLogicalMargin().ConvertTo(myWM, wrapperWM);
// offsets of wrapper frame within this frame:
LogicalPoint
wrapperOffset(myWM,
aReflowState.ComputedLogicalBorderPadding().IStart(myWM) +
aReflowInput.ComputedLogicalBorderPadding().IStart(myWM) +
wrapperMargin.IStart(myWM),
aReflowState.ComputedLogicalBorderPadding().BStart(myWM) +
aReflowInput.ComputedLogicalBorderPadding().BStart(myWM) +
wrapperMargin.BStart(myWM));
nsReflowStatus childStatus;
@@ -182,7 +182,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
// will be fixed later.
const nsSize dummyContainerSize;
ReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
wrapperReflowState, myWM, wrapperOffset, dummyContainerSize, 0,
wrapperReflowInput, myWM, wrapperOffset, dummyContainerSize, 0,
childStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
"We gave our child unconstrained available block-size, "
@@ -198,16 +198,16 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
// Make sure we obey min/max-bsize in the case when we're doing intrinsic
// sizing (we get it for free when we have a non-intrinsic
// aReflowState.ComputedBSize()). Note that we do this before
// aReflowInput.ComputedBSize()). Note that we do this before
// adjusting for borderpadding, since ComputedMaxBSize and
// ComputedMinBSize are content heights.
contentBoxBSize =
NS_CSS_MINMAX(contentBoxBSize,
aReflowState.ComputedMinBSize(),
aReflowState.ComputedMaxBSize());
aReflowInput.ComputedMinBSize(),
aReflowInput.ComputedMaxBSize());
borderBoxBSize = contentBoxBSize +
aReflowState.ComputedLogicalBorderPadding().BStartEnd(myWM);
aReflowInput.ComputedLogicalBorderPadding().BStartEnd(myWM);
}
// Center child in block axis
@@ -220,7 +220,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
// Place the child
FinishReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
&wrapperReflowState, myWM, wrapperOffset,
&wrapperReflowInput, myWM, wrapperOffset,
borderBoxSize, 0);
nsSize contentBoxSize =
@@ -228,7 +228,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
GetPhysicalSize(myWM);
aDesiredSize.SetBlockStartAscent(
wrappersDesiredSize.BlockStartAscent() +
outerWrapperFrame->BStart(aReflowState.GetWritingMode(),
outerWrapperFrame->BStart(aReflowInput.GetWritingMode(),
contentBoxSize));
}
@@ -245,7 +245,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize);
}
void