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:
@@ -108,9 +108,9 @@ nsTableCellFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||
// nsIPercentBSizeObserver methods
|
||||
|
||||
void
|
||||
nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowState)
|
||||
nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowInput)
|
||||
{
|
||||
// ReflowInput ensures the mCBReflowState of blocks inside a
|
||||
// ReflowInput ensures the mCBReflowInput of blocks inside a
|
||||
// cell is the cell frame, not the inner-cell block, and that the
|
||||
// containing block of an inner table is the containing block of its
|
||||
// table wrapper.
|
||||
@@ -118,7 +118,7 @@ nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowState)
|
||||
// these tests are probably unnecessary.
|
||||
|
||||
// Maybe the cell reflow state; we sure if we're inside the |if|.
|
||||
const ReflowInput *cellRS = aReflowState.mCBReflowState;
|
||||
const ReflowInput *cellRS = aReflowInput.mCBReflowInput;
|
||||
|
||||
if (cellRS && cellRS->mFrame == this &&
|
||||
(cellRS->ComputedBSize() == NS_UNCONSTRAINEDSIZE ||
|
||||
@@ -133,12 +133,12 @@ nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowState)
|
||||
|
||||
if (nsTableFrame::AncestorsHaveStyleBSize(*cellRS) ||
|
||||
(GetTableFrame()->GetEffectiveRowSpan(*this) == 1 &&
|
||||
cellRS->mParentReflowState->mFrame->
|
||||
cellRS->mParentReflowInput->mFrame->
|
||||
HasAnyStateBits(NS_ROW_HAS_CELL_WITH_STYLE_BSIZE))) {
|
||||
|
||||
for (const ReflowInput *rs = aReflowState.mParentReflowState;
|
||||
for (const ReflowInput *rs = aReflowInput.mParentReflowInput;
|
||||
rs != cellRS;
|
||||
rs = rs->mParentReflowState) {
|
||||
rs = rs->mParentReflowInput) {
|
||||
rs->mFrame->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
|
||||
}
|
||||
|
||||
@@ -149,9 +149,9 @@ nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowState)
|
||||
|
||||
// The cell needs to observe its block and things inside its block but nothing below that
|
||||
bool
|
||||
nsTableCellFrame::NeedsToObserve(const ReflowInput& aReflowState)
|
||||
nsTableCellFrame::NeedsToObserve(const ReflowInput& aReflowInput)
|
||||
{
|
||||
const ReflowInput *rs = aReflowState.mParentReflowState;
|
||||
const ReflowInput *rs = aReflowInput.mParentReflowInput;
|
||||
if (!rs)
|
||||
return false;
|
||||
if (rs->mFrame == this) {
|
||||
@@ -160,14 +160,14 @@ nsTableCellFrame::NeedsToObserve(const ReflowInput& aReflowState)
|
||||
// propagated to its kids.
|
||||
return true;
|
||||
}
|
||||
rs = rs->mParentReflowState;
|
||||
rs = rs->mParentReflowInput;
|
||||
if (!rs) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We always need to let the percent bsize observer be propagated
|
||||
// from a table wrapper frame to an inner table frame.
|
||||
nsIAtom *fType = aReflowState.mFrame->GetType();
|
||||
nsIAtom *fType = aReflowInput.mFrame->GetType();
|
||||
if (fType == nsGkAtoms::tableFrame) {
|
||||
return true;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
nsIFrame::LogicalSides
|
||||
nsTableCellFrame::GetLogicalSkipSides(const ReflowInput* aReflowState) const
|
||||
nsTableCellFrame::GetLogicalSkipSides(const ReflowInput* aReflowInput) const
|
||||
{
|
||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
||||
@@ -858,26 +858,26 @@ CalcUnpaginatedBSize(nsTableCellFrame& aCellFrame,
|
||||
void
|
||||
nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
const ReflowInput& aReflowState,
|
||||
const ReflowInput& aReflowInput,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableCellFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
|
||||
|
||||
if (aReflowState.mFlags.mSpecialBSizeReflow) {
|
||||
if (aReflowInput.mFlags.mSpecialBSizeReflow) {
|
||||
FirstInFlow()->AddStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW);
|
||||
}
|
||||
|
||||
// see if a special bsize reflow needs to occur due to having a pct height
|
||||
nsTableFrame::CheckRequestSpecialBSizeReflow(aReflowState);
|
||||
nsTableFrame::CheckRequestSpecialBSizeReflow(aReflowInput);
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
WritingMode wm = aReflowState.GetWritingMode();
|
||||
LogicalSize availSize(wm, aReflowState.AvailableISize(),
|
||||
aReflowState.AvailableBSize());
|
||||
WritingMode wm = aReflowInput.GetWritingMode();
|
||||
LogicalSize availSize(wm, aReflowInput.AvailableISize(),
|
||||
aReflowInput.AvailableBSize());
|
||||
|
||||
LogicalMargin borderPadding = aReflowState.ComputedLogicalPadding();
|
||||
LogicalMargin borderPadding = aReflowInput.ComputedLogicalPadding();
|
||||
LogicalMargin border = GetBorderWidth(wm);
|
||||
borderPadding += border;
|
||||
|
||||
@@ -895,13 +895,13 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
ReflowOutput kidSize(wm, aDesiredSize.mFlags);
|
||||
kidSize.ClearSize();
|
||||
SetPriorAvailISize(aReflowState.AvailableISize());
|
||||
SetPriorAvailISize(aReflowInput.AvailableISize());
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
NS_ASSERTION(firstKid, "Frame construction error, a table cell always has an inner cell frame");
|
||||
nsTableFrame* tableFrame = GetTableFrame();
|
||||
|
||||
if (aReflowState.mFlags.mSpecialBSizeReflow) {
|
||||
const_cast<ReflowInput&>(aReflowState).
|
||||
if (aReflowInput.mFlags.mSpecialBSizeReflow) {
|
||||
const_cast<ReflowInput&>(aReflowInput).
|
||||
SetComputedBSize(BSize(wm) - borderPadding.BStartEnd(wm));
|
||||
DISPLAY_REFLOW_CHANGE();
|
||||
}
|
||||
@@ -910,7 +910,7 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
CalcUnpaginatedBSize((nsTableCellFrame&)*this,
|
||||
*tableFrame, borderPadding.BStartEnd(wm));
|
||||
if (computedUnpaginatedBSize > 0) {
|
||||
const_cast<ReflowInput&>(aReflowState).SetComputedBSize(computedUnpaginatedBSize);
|
||||
const_cast<ReflowInput&>(aReflowInput).SetComputedBSize(computedUnpaginatedBSize);
|
||||
DISPLAY_REFLOW_CHANGE();
|
||||
}
|
||||
}
|
||||
@@ -919,31 +919,31 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
WritingMode kidWM = firstKid->GetWritingMode();
|
||||
ReflowInput kidReflowState(aPresContext, aReflowState, firstKid,
|
||||
ReflowInput kidReflowInput(aPresContext, aReflowInput, firstKid,
|
||||
availSize.ConvertTo(kidWM, wm));
|
||||
|
||||
// Don't be a percent height observer if we're in the middle of
|
||||
// special-bsize reflow, in case we get an accidental NotifyPercentBSize()
|
||||
// call (which we shouldn't honor during special-bsize reflow)
|
||||
if (!aReflowState.mFlags.mSpecialBSizeReflow) {
|
||||
if (!aReflowInput.mFlags.mSpecialBSizeReflow) {
|
||||
// mPercentBSizeObserver is for children of cells in quirks mode,
|
||||
// but only those than are tables in standards mode. NeedsToObserve
|
||||
// will determine how far this is propagated to descendants.
|
||||
kidReflowState.mPercentBSizeObserver = this;
|
||||
kidReflowInput.mPercentBSizeObserver = this;
|
||||
}
|
||||
// Don't propagate special bsize reflow state to our kids
|
||||
kidReflowState.mFlags.mSpecialBSizeReflow = false;
|
||||
kidReflowInput.mFlags.mSpecialBSizeReflow = false;
|
||||
|
||||
if (aReflowState.mFlags.mSpecialBSizeReflow ||
|
||||
if (aReflowInput.mFlags.mSpecialBSizeReflow ||
|
||||
FirstInFlow()->HasAnyStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) {
|
||||
// We need to force the kid to have mBResize set if we've had a
|
||||
// special reflow in the past, since the non-special reflow needs to
|
||||
// resize back to what it was without the special bsize reflow.
|
||||
kidReflowState.SetBResize(true);
|
||||
kidReflowInput.SetBResize(true);
|
||||
}
|
||||
|
||||
nsSize containerSize =
|
||||
aReflowState.ComputedSizeAsContainerIfConstrained();
|
||||
aReflowInput.ComputedSizeAsContainerIfConstrained();
|
||||
|
||||
LogicalPoint kidOrigin(wm, borderPadding.IStart(wm),
|
||||
borderPadding.BStart(wm));
|
||||
@@ -951,7 +951,7 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsRect origVisualOverflow = firstKid->GetVisualOverflowRect();
|
||||
bool firstReflow = firstKid->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
|
||||
|
||||
ReflowChild(firstKid, aPresContext, kidSize, kidReflowState,
|
||||
ReflowChild(firstKid, aPresContext, kidSize, kidReflowInput,
|
||||
wm, kidOrigin, containerSize, 0, aStatus);
|
||||
if (NS_FRAME_OVERFLOW_IS_INCOMPLETE(aStatus)) {
|
||||
// Don't pass OVERFLOW_INCOMPLETE through tables until they can actually handle it
|
||||
@@ -981,7 +981,7 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
SetContentEmpty(isEmpty);
|
||||
|
||||
// Place the child
|
||||
FinishReflowChild(firstKid, aPresContext, kidSize, &kidReflowState,
|
||||
FinishReflowChild(firstKid, aPresContext, kidSize, &kidReflowInput,
|
||||
wm, kidOrigin, containerSize, 0);
|
||||
|
||||
nsTableFrame::InvalidateTableFrame(firstKid, origRect, origVisualOverflow,
|
||||
@@ -1009,13 +1009,13 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// the overflow area will be computed when BlockDirAlignChild() gets called
|
||||
|
||||
if (aReflowState.mFlags.mSpecialBSizeReflow) {
|
||||
if (aReflowInput.mFlags.mSpecialBSizeReflow) {
|
||||
if (aDesiredSize.BSize(wm) > BSize(wm)) {
|
||||
// set a bit indicating that the pct bsize contents exceeded
|
||||
// the height that they could honor in the pass 2 reflow
|
||||
SetHasPctOverBSize(true);
|
||||
}
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.AvailableBSize()) {
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowInput.AvailableBSize()) {
|
||||
aDesiredSize.BSize(wm) = BSize(wm);
|
||||
}
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
// dirtiness to them before our parent clears our dirty bits.
|
||||
PushDirtyBitToAbsoluteFrames();
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize);
|
||||
}
|
||||
|
||||
/* ----- global methods ----- */
|
||||
|
||||
Reference in New Issue
Block a user