Bug 959874 - Reorder two parameters in nsContainerFrame::FinishReflowChild(), for consistency with nsContainerFrame::ReflowChild(). r=dholbert

This commit is contained in:
Peiyong Lin 2014-01-16 17:34:44 -08:00
parent bd5ead0e51
commit e0dbe148bc
38 changed files with 69 additions and 69 deletions

View File

@ -446,8 +446,8 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
ignoredStatus); ignoredStatus);
// Set the child's width and height to its desired size // Set the child's width and height to its desired size
FinishReflowChild(mDropdownFrame, aPresContext, &kidReflowState, FinishReflowChild(mDropdownFrame, aPresContext, desiredSize,
desiredSize, rect.x, rect.y, flags); &kidReflowState, rect.x, rect.y, flags);
return rv; return rv;
} }

View File

@ -512,8 +512,8 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
reflowInner = true; reflowInner = true;
} }
FinishReflowChild(legend, aPresContext, &legendReflowState.ref(), FinishReflowChild(legend, aPresContext, legendDesiredSize,
legendDesiredSize, 0, 0, NS_FRAME_NO_MOVE_FRAME); &legendReflowState.ref(), 0, 0, NS_FRAME_NO_MOVE_FRAME);
} else if (!legend) { } else if (!legend) {
mLegendRect.SetEmpty(); mLegendRect.SetEmpty();
mLegendSpace = 0; mLegendSpace = 0;
@ -557,8 +557,8 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowState, ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowState,
pt.x, pt.y, 0, aStatus); pt.x, pt.y, 0, aStatus);
FinishReflowChild(inner, aPresContext, &kidReflowState, FinishReflowChild(inner, aPresContext, kidDesiredSize,
kidDesiredSize, pt.x, pt.y, 0); &kidReflowState, pt.x, pt.y, 0);
NS_FRAME_TRACE_REFLOW_OUT("FieldSet::Reflow", aStatus); NS_FRAME_TRACE_REFLOW_OUT("FieldSet::Reflow", aStatus);
} }

View File

@ -329,7 +329,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// Place the child // Place the child
FinishReflowChild(aFirstKid, aPresContext, FinishReflowChild(aFirstKid, aPresContext,
&contentsReflowState, contentsDesiredSize, contentsDesiredSize, &contentsReflowState,
xoffset, yoffset, 0); xoffset, yoffset, 0);
// Make sure we have a useful 'ascent' value for the child // Make sure we have a useful 'ascent' value for the child

View File

@ -182,7 +182,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame,
nsHTMLReflowMetrics barDesiredSize(reflowState.GetWritingMode()); nsHTMLReflowMetrics barDesiredSize(reflowState.GetWritingMode());
ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset, ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset,
yoffset, 0, aStatus); yoffset, 0, aStatus);
FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize, FinishReflowChild(aBarFrame, aPresContext, barDesiredSize, &reflowState,
xoffset, yoffset, 0); xoffset, yoffset, 0);
} }

View File

@ -150,7 +150,7 @@ nsNumberControlFrame::
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
"We gave our child unconstrained height, so it should be complete"); "We gave our child unconstrained height, so it should be complete");
return FinishReflowChild(aOuterWrapperFrame, aPresContext, return FinishReflowChild(aOuterWrapperFrame, aPresContext,
&wrapperReflowState, aWrappersDesiredSize, aWrappersDesiredSize, &wrapperReflowState,
xoffset, yoffset, 0); xoffset, yoffset, 0);
} }

View File

@ -196,7 +196,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame,
nsHTMLReflowMetrics barDesiredSize(aReflowState.GetWritingMode()); nsHTMLReflowMetrics barDesiredSize(aReflowState.GetWritingMode());
ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset, ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset,
yoffset, 0, aStatus); yoffset, 0, aStatus);
FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize, FinishReflowChild(aBarFrame, aPresContext, barDesiredSize, &reflowState,
xoffset, yoffset, 0); xoffset, yoffset, 0);
} }

View File

@ -356,8 +356,8 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete"); "We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(trackFrame, aPresContext, &trackReflowState, rv = FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
trackDesiredSize, trackX, trackY, 0); &trackReflowState, trackX, trackY, 0);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} }
@ -378,8 +378,8 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete"); "We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(thumbFrame, aPresContext, &thumbReflowState, rv = FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbDesiredSize, 0, 0, 0); &thumbReflowState, 0, 0, 0);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
DoUpdateThumbPosition(thumbFrame, nsSize(aDesiredSize.Width(), DoUpdateThumbPosition(thumbFrame, nsSize(aDesiredSize.Width(),
@ -407,7 +407,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus), MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete"); "We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(rangeProgressFrame, aPresContext, rv = FinishReflowChild(rangeProgressFrame, aPresContext,
&progressReflowState, progressDesiredSize, 0, 0, 0); progressDesiredSize, &progressReflowState, 0, 0, 0);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(), DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(),

View File

@ -549,8 +549,8 @@ nsTextControlFrame::ReflowTextControlChild(nsIFrame* aKid,
xOffset, yOffset, 0, aStatus); xOffset, yOffset, 0, aStatus);
// place the child // place the child
FinishReflowChild(aKid, aPresContext, &kidReflowState, FinishReflowChild(aKid, aPresContext, desiredSize,
desiredSize, xOffset, yOffset, 0); &kidReflowState, xOffset, yOffset, 0);
// consider the overflow // consider the overflow
aParentDesiredSize.mOverflowAreas.UnionWith(desiredSize.mOverflowAreas); aParentDesiredSize.mOverflowAreas.UnionWith(desiredSize.mOverflowAreas);

View File

@ -392,8 +392,8 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
aReflowState.ApplyRelativePositioning(&position); aReflowState.ApplyRelativePositioning(&position);
// Now place the frame and complete the reflow process // Now place the frame and complete the reflow process
nsContainerFrame::FinishReflowChild(mFrame, mPresContext, &aReflowState, nsContainerFrame::FinishReflowChild(mFrame, mPresContext, mMetrics,
mMetrics, position.x, position.y, 0); &aReflowState, position.x, position.y, 0);
aOverflowAreas = mMetrics.mOverflowAreas + position; aOverflowAreas = mMetrics.mOverflowAreas + position;

View File

@ -521,7 +521,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
kidPt.x, kidPt.y, 0, aStatus); kidPt.x, kidPt.y, 0, aStatus);
// Complete the reflow and position and size the child frame // Complete the reflow and position and size the child frame
FinishReflowChild(kidFrame, aPresContext, &kidReflowState, kidDesiredSize, FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, &kidReflowState,
kidPt.x, kidPt.y, 0); kidPt.x, kidPt.y, 0);
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) { if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {

View File

@ -591,8 +591,8 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
*aBottomMarginCarriedOut = kidDesiredSize.mCarriedOutBottomMargin; *aBottomMarginCarriedOut = kidDesiredSize.mCarriedOutBottomMargin;
FinishReflowChild(child, PresContext(), &kidReflowState, FinishReflowChild(child, PresContext(), kidDesiredSize,
kidDesiredSize, childOrigin.x, childOrigin.y, 0); &kidReflowState, childOrigin.x, childOrigin.y, 0);
childContentBottom = nsLayoutUtils::CalculateContentBottom(child); childContentBottom = nsLayoutUtils::CalculateContentBottom(child);
if (childContentBottom > aConfig.mColMaxHeight) { if (childContentBottom > aConfig.mColMaxHeight) {

View File

@ -1034,8 +1034,8 @@ nsContainerFrame::PositionChildViews(nsIFrame* aFrame)
nsresult nsresult
nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame, nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext, nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
const nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState* aReflowState,
nscoord aX, nscoord aX,
nscoord aY, nscoord aY,
uint32_t aFlags) uint32_t aFlags)
@ -1158,7 +1158,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
//XXXfr Do we need to override any shrinkwrap effects here? //XXXfr Do we need to override any shrinkwrap effects here?
// e.g. desiredSize.Width() = prevRect.width; // e.g. desiredSize.Width() = prevRect.width;
rv = FinishReflowChild(frame, aPresContext, &frameState, desiredSize, rv = FinishReflowChild(frame, aPresContext, desiredSize, &frameState,
prevRect.x, 0, aFlags); prevRect.x, 0, aFlags);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);

View File

@ -227,8 +227,8 @@ public:
*/ */
static nsresult FinishReflowChild(nsIFrame* aKidFrame, static nsresult FinishReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext, nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
const nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState* aReflowState,
nscoord aX, nscoord aX,
nscoord aY, nscoord aY,
uint32_t aFlags); uint32_t aFlags);

View File

@ -953,7 +953,7 @@ nsFlexContainerFrame::
"should be complete"); "should be complete");
rv = FinishReflowChild(aFlexItem.Frame(), aPresContext, rv = FinishReflowChild(aFlexItem.Frame(), aPresContext,
&childRSForMeasuringHeight, childDesiredSize, childDesiredSize, &childRSForMeasuringHeight,
0, 0, flags); 0, 0, flags);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
@ -2526,7 +2526,7 @@ nsFlexContainerFrame::SizeItemInCrossAxis(
// Tell the child we're done with its initial reflow. // Tell the child we're done with its initial reflow.
// (Necessary for e.g. GetBaseline() to work below w/out asserting) // (Necessary for e.g. GetBaseline() to work below w/out asserting)
rv = FinishReflowChild(aItem.Frame(), aPresContext, rv = FinishReflowChild(aItem.Frame(), aPresContext,
&aChildReflowState, childDesiredSize, 0, 0, flags); childDesiredSize, &aChildReflowState, 0, 0, flags);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
// Save the sizing info that we learned from this reflow // Save the sizing info that we learned from this reflow
@ -2863,7 +2863,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
childReflowState.ApplyRelativePositioning(&physicalPosn); childReflowState.ApplyRelativePositioning(&physicalPosn);
rv = FinishReflowChild(curItem.Frame(), aPresContext, rv = FinishReflowChild(curItem.Frame(), aPresContext,
&childReflowState, childDesiredSize, childDesiredSize, &childReflowState,
physicalPosn.x, physicalPosn.y, 0); physicalPosn.x, physicalPosn.y, 0);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);

View File

@ -7975,8 +7975,8 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
NS_ASSERTION(NS_FRAME_IS_COMPLETE(status), "bad status"); NS_ASSERTION(NS_FRAME_IS_COMPLETE(status), "bad status");
uint32_t layoutFlags = aState.LayoutFlags(); uint32_t layoutFlags = aState.LayoutFlags();
nsContainerFrame::FinishReflowChild(this, aPresContext, &reflowState, nsContainerFrame::FinishReflowChild(this, aPresContext, aDesiredSize,
aDesiredSize, aX, aY, layoutFlags | NS_FRAME_NO_MOVE_FRAME); &reflowState, aX, aY, layoutFlags | NS_FRAME_NO_MOVE_FRAME);
// Save the ascent. (bug 103925) // Save the ascent. (bug 103925)
if (IsCollapsed()) { if (IsCollapsed()) {

View File

@ -751,7 +751,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
// Place and size the child // Place and size the child
metrics.Width() = aSize.width; metrics.Width() = aSize.width;
metrics.Height() = aSize.height; metrics.Height() = aSize.height;
FinishReflowChild(aChild, aPresContext, nullptr, metrics, aOffset.x, aOffset.y, 0); FinishReflowChild(aChild, aPresContext, metrics, nullptr, aOffset.x, aOffset.y, 0);
} }
static static

View File

@ -467,7 +467,7 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
// which will usually be different from the scrollport height; // which will usually be different from the scrollport height;
// invalidating the difference will cause unnecessary repainting. // invalidating the difference will cause unnecessary repainting.
FinishReflowChild(mHelper.mScrolledFrame, presContext, FinishReflowChild(mHelper.mScrolledFrame, presContext,
&kidReflowState, *aMetrics, 0, 0, *aMetrics, &kidReflowState, 0, 0,
NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_SIZE_VIEW); NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_SIZE_VIEW);
// XXX Some frames (e.g., nsObjectFrame, nsFrameFrame, nsTextFrame) don't bother // XXX Some frames (e.g., nsObjectFrame, nsFrameFrame, nsTextFrame) don't bother

View File

@ -214,8 +214,8 @@ nsHTMLCanvasFrame::Reflow(nsPresContext* aPresContext,
availSize); availSize);
ReflowChild(childFrame, aPresContext, childDesiredSize, childReflowState, ReflowChild(childFrame, aPresContext, childDesiredSize, childReflowState,
0, 0, 0, childStatus, nullptr); 0, 0, 0, childStatus, nullptr);
FinishReflowChild(childFrame, aPresContext, &childReflowState, FinishReflowChild(childFrame, aPresContext, childDesiredSize,
childDesiredSize, 0, 0, 0); &childReflowState, 0, 0, 0);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("exit nsHTMLCanvasFrame::Reflow: size=%d,%d", ("exit nsHTMLCanvasFrame::Reflow: size=%d,%d",

View File

@ -81,7 +81,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
} }
// Place and size the child // Place and size the child
FinishReflowChild(frame, aPresContext, &kidReflowState, aDesiredSize, 0, 0, 0); FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowState, 0, 0, 0);
NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) || NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
!frame->GetNextInFlow(), "bad child flow list"); !frame->GetNextInFlow(), "bad child flow list");

View File

@ -138,7 +138,7 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(frame, aPresContext, aDesiredSize, kidReflowState, xc, yc, 0, aStatus); ReflowChild(frame, aPresContext, aDesiredSize, kidReflowState, xc, yc, 0, aStatus);
// Place and size the child // Place and size the child
FinishReflowChild(frame, aPresContext, &kidReflowState, aDesiredSize, xc, yc, 0); FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowState, xc, yc, 0);
NS_ASSERTION(!NS_FRAME_IS_FULLY_COMPLETE(aStatus) || NS_ASSERTION(!NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
!frame->GetNextInFlow(), "bad child flow list"); !frame->GetNextInFlow(), "bad child flow list");

View File

@ -223,7 +223,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
// max width then center it horizontally // max width then center it horizontally
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, x, y, 0, status); ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, x, y, 0, status);
FinishReflowChild(kidFrame, aPresContext, nullptr, kidSize, x, y, 0); FinishReflowChild(kidFrame, aPresContext, kidSize, nullptr, x, y, 0);
y += kidSize.Height(); y += kidSize.Height();
y += pageCSSMargin.bottom; y += pageCSSMargin.bottom;

View File

@ -306,7 +306,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowState, ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowState,
posterTopLeft.x, posterTopLeft.y, 0, aStatus); posterTopLeft.x, posterTopLeft.y, 0, aStatus);
FinishReflowChild(imageFrame, aPresContext, &kidReflowState, kidDesiredSize, FinishReflowChild(imageFrame, aPresContext, kidDesiredSize, &kidReflowState,
posterTopLeft.x, posterTopLeft.y, 0); posterTopLeft.x, posterTopLeft.y, 0);
} else if (child->GetContent() == mVideoControls) { } else if (child->GetContent() == mVideoControls) {
// Reflow the video controls frame. // Reflow the video controls frame.
@ -343,7 +343,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
ReflowChild(child, aPresContext, kidDesiredSize, kidReflowState, ReflowChild(child, aPresContext, kidDesiredSize, kidReflowState,
mBorderPadding.left, mBorderPadding.top, 0, aStatus); mBorderPadding.left, mBorderPadding.top, 0, aStatus);
FinishReflowChild(child, aPresContext, FinishReflowChild(child, aPresContext,
&kidReflowState, kidDesiredSize, kidDesiredSize, &kidReflowState,
mBorderPadding.left, mBorderPadding.top, 0); mBorderPadding.left, mBorderPadding.top, 0);
} }
} }

View File

@ -222,7 +222,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
0, 0, 0, aStatus); 0, 0, 0, aStatus);
kidHeight = kidDesiredSize.Height(); kidHeight = kidDesiredSize.Height();
FinishReflowChild(kidFrame, aPresContext, nullptr, kidDesiredSize, 0, 0, 0); FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, nullptr, 0, 0, 0);
} else { } else {
kidHeight = mFrames.FirstChild()->GetSize().height; kidHeight = mFrames.FirstChild()->GetSize().height;
} }

View File

@ -1325,8 +1325,8 @@ nsMathMLContainerFrame::PositionRowChildFrames(nscoord aOffsetX,
while (child.Frame()) { while (child.Frame()) {
nscoord dx = aOffsetX + child.X(); nscoord dx = aOffsetX + child.X();
nscoord dy = aBaseline - child.Ascent(); nscoord dy = aBaseline - child.Ascent();
FinishReflowChild(child.Frame(), PresContext(), nullptr, FinishReflowChild(child.Frame(), PresContext(), child.ReflowMetrics(),
child.ReflowMetrics(), dx, dy, 0); nullptr, dx, dy, 0);
++child; ++child;
} }
} }

View File

@ -144,7 +144,7 @@ nsMathMLSelectedFrame::Place(nsRenderingContext& aRenderingContext,
if (childFrame) { if (childFrame) {
GetReflowAndBoundingMetricsFor(childFrame, aDesiredSize, mBoundingMetrics); GetReflowAndBoundingMetricsFor(childFrame, aDesiredSize, mBoundingMetrics);
if (aPlaceOrigin) { if (aPlaceOrigin) {
FinishReflowChild(childFrame, PresContext(), nullptr, aDesiredSize, 0, 0, 0); FinishReflowChild(childFrame, PresContext(), aDesiredSize, nullptr, 0, 0, 0);
} }
mReference.x = 0; mReference.x = 0;
mReference.y = aDesiredSize.TopAscent(); mReference.y = aDesiredSize.TopAscent();

View File

@ -215,7 +215,7 @@ nsMathMLTokenFrame::Place(nsRenderingContext& aRenderingContext,
// place and size the child; (dx,0) makes the caret happy - bug 188146 // place and size the child; (dx,0) makes the caret happy - bug 188146
dy = childSize.Height() == 0 ? 0 : aDesiredSize.TopAscent() - childSize.TopAscent(); dy = childSize.Height() == 0 ? 0 : aDesiredSize.TopAscent() - childSize.TopAscent();
FinishReflowChild(childFrame, PresContext(), nullptr, childSize, dx, dy, 0); FinishReflowChild(childFrame, PresContext(), childSize, nullptr, dx, dy, 0);
dx += childSize.Width(); dx += childSize.Width();
} }
} }

View File

@ -368,7 +368,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
else else
aDesiredSize.mBoundingMetrics += bm; aDesiredSize.mBoundingMetrics += bm;
FinishReflowChild(childFrame, aPresContext, nullptr, childSize, FinishReflowChild(childFrame, aPresContext, childSize, nullptr,
dx, ascent - childSize.TopAscent(), 0); dx, ascent - childSize.TopAscent(), 0);
dx += childSize.Width(); dx += childSize.Width();

View File

@ -369,10 +369,10 @@ nsMathMLmfracFrame::PlaceInternal(nsRenderingContext& aRenderingContext,
nscoord dy; nscoord dy;
// place numerator // place numerator
dy = 0; dy = 0;
FinishReflowChild(frameNum, presContext, nullptr, sizeNum, dxNum, dy, 0); FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dxNum, dy, 0);
// place denominator // place denominator
dy = aDesiredSize.Height() - sizeDen.Height(); dy = aDesiredSize.Height() - sizeDen.Height();
FinishReflowChild(frameDen, presContext, nullptr, sizeDen, dxDen, dy, 0); FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dxDen, dy, 0);
// place the fraction bar - dy is top of bar // place the fraction bar - dy is top of bar
dy = aDesiredSize.TopAscent() - (axisHeight + actualRuleThickness/2); dy = aDesiredSize.TopAscent() - (axisHeight + actualRuleThickness/2);
mLineRect.SetRect(leftSpace, dy, width - (leftSpace + rightSpace), mLineRect.SetRect(leftSpace, dy, width - (leftSpace + rightSpace),
@ -483,7 +483,7 @@ nsMathMLmfracFrame::PlaceInternal(nsRenderingContext& aRenderingContext,
dx = MirrorIfRTL(aDesiredSize.Width(), sizeNum.Width(), dx = MirrorIfRTL(aDesiredSize.Width(), sizeNum.Width(),
leadingSpace); leadingSpace);
dy = aDesiredSize.TopAscent() - numShift - sizeNum.TopAscent(); dy = aDesiredSize.TopAscent() - numShift - sizeNum.TopAscent();
FinishReflowChild(frameNum, presContext, nullptr, sizeNum, dx, dy, 0); FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dx, dy, 0);
// place the fraction bar // place the fraction bar
dx = MirrorIfRTL(aDesiredSize.Width(), mLineRect.width, dx = MirrorIfRTL(aDesiredSize.Width(), mLineRect.width,
@ -496,7 +496,7 @@ nsMathMLmfracFrame::PlaceInternal(nsRenderingContext& aRenderingContext,
dx = MirrorIfRTL(aDesiredSize.Width(), sizeDen.Width(), dx = MirrorIfRTL(aDesiredSize.Width(), sizeDen.Width(),
leadingSpace + bmNum.width + mLineRect.width); leadingSpace + bmNum.width + mLineRect.width);
dy = aDesiredSize.TopAscent() + denShift - sizeDen.TopAscent(); dy = aDesiredSize.TopAscent() + denShift - sizeDen.TopAscent();
FinishReflowChild(frameDen, presContext, nullptr, sizeDen, dx, dy, 0); FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dx, dy, 0);
} }
} }

View File

@ -565,7 +565,7 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
// place the base ... // place the base ...
childFrame = baseFrame; childFrame = baseFrame;
dy = aDesiredSize.TopAscent() - baseSize.TopAscent(); dy = aDesiredSize.TopAscent() - baseSize.TopAscent();
FinishReflowChild (baseFrame, aPresContext, nullptr, baseSize, FinishReflowChild (baseFrame, aPresContext, baseSize, nullptr,
aFrame->MirrorIfRTL(aDesiredSize.Width(), aFrame->MirrorIfRTL(aDesiredSize.Width(),
baseSize.Width(), baseSize.Width(),
dx), dx),
@ -598,8 +598,8 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
x += width - subScriptSize.Width(); x += width - subScriptSize.Width();
dy = aDesiredSize.TopAscent() - subScriptSize.TopAscent() + dy = aDesiredSize.TopAscent() - subScriptSize.TopAscent() +
maxSubScriptShift; maxSubScriptShift;
FinishReflowChild (subScriptFrame, aPresContext, nullptr, FinishReflowChild (subScriptFrame, aPresContext, subScriptSize,
subScriptSize, nullptr,
aFrame->MirrorIfRTL(aDesiredSize.Width(), aFrame->MirrorIfRTL(aDesiredSize.Width(),
subScriptSize.Width(), subScriptSize.Width(),
x), x),
@ -612,8 +612,8 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
x += width - supScriptSize.Width(); x += width - supScriptSize.Width();
dy = aDesiredSize.TopAscent() - supScriptSize.TopAscent() - dy = aDesiredSize.TopAscent() - supScriptSize.TopAscent() -
maxSupScriptShift; maxSupScriptShift;
FinishReflowChild (supScriptFrame, aPresContext, nullptr, FinishReflowChild (supScriptFrame, aPresContext, supScriptSize,
supScriptSize, nullptr,
aFrame->MirrorIfRTL(aDesiredSize.Width(), aFrame->MirrorIfRTL(aDesiredSize.Width(),
supScriptSize.Width(), supScriptSize.Width(),
x), x),

View File

@ -327,7 +327,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
// place the index // place the index
nscoord dx = dxIndex; nscoord dx = dxIndex;
nscoord dy = aDesiredSize.TopAscent() - (indexRaisedAscent + indexSize.TopAscent() - bmIndex.ascent); nscoord dy = aDesiredSize.TopAscent() - (indexRaisedAscent + indexSize.TopAscent() - bmIndex.ascent);
FinishReflowChild(indexFrame, aPresContext, nullptr, indexSize, FinishReflowChild(indexFrame, aPresContext, indexSize, nullptr,
MirrorIfRTL(aDesiredSize.Width(), indexSize.Width(), dx), MirrorIfRTL(aDesiredSize.Width(), indexSize.Width(), dx),
dy, 0); dy, 0);
@ -342,7 +342,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
// place the base // place the base
dy = aDesiredSize.TopAscent() - baseSize.TopAscent(); dy = aDesiredSize.TopAscent() - baseSize.TopAscent();
FinishReflowChild(baseFrame, aPresContext, nullptr, baseSize, FinishReflowChild(baseFrame, aPresContext, baseSize, nullptr,
MirrorIfRTL(aDesiredSize.Width(), baseSize.Width(), dx), MirrorIfRTL(aDesiredSize.Width(), baseSize.Width(), dx),
dy, 0); dy, 0);

View File

@ -607,16 +607,16 @@ nsMathMLmunderoverFrame::Place(nsRenderingContext& aRenderingContext,
if (overFrame) { if (overFrame) {
dy = aDesiredSize.TopAscent() - mBoundingMetrics.ascent + bmOver.ascent dy = aDesiredSize.TopAscent() - mBoundingMetrics.ascent + bmOver.ascent
- overSize.TopAscent(); - overSize.TopAscent();
FinishReflowChild (overFrame, PresContext(), nullptr, overSize, dxOver, dy, 0); FinishReflowChild (overFrame, PresContext(), overSize, nullptr, dxOver, dy, 0);
} }
// place base // place base
dy = aDesiredSize.TopAscent() - baseSize.TopAscent(); dy = aDesiredSize.TopAscent() - baseSize.TopAscent();
FinishReflowChild (baseFrame, PresContext(), nullptr, baseSize, dxBase, dy, 0); FinishReflowChild (baseFrame, PresContext(), baseSize, nullptr, dxBase, dy, 0);
// place underscript // place underscript
if (underFrame) { if (underFrame) {
dy = aDesiredSize.TopAscent() + mBoundingMetrics.descent - bmUnder.descent dy = aDesiredSize.TopAscent() + mBoundingMetrics.descent - bmUnder.descent
- underSize.TopAscent(); - underSize.TopAscent();
FinishReflowChild (underFrame, PresContext(), nullptr, underSize, FinishReflowChild (underFrame, PresContext(), underSize, nullptr,
dxUnder, dy, 0); dxUnder, dy, 0);
} }
} }

View File

@ -569,7 +569,7 @@ nsSVGForeignObjectFrame::DoReflow()
NS_FRAME_NO_MOVE_FRAME, status); NS_FRAME_NO_MOVE_FRAME, status);
NS_ASSERTION(mRect.width == desiredSize.Width() && NS_ASSERTION(mRect.width == desiredSize.Width() &&
mRect.height == desiredSize.Height(), "unexpected size"); mRect.height == desiredSize.Height(), "unexpected size");
FinishReflowChild(kid, presContext, &reflowState, desiredSize, 0, 0, FinishReflowChild(kid, presContext, desiredSize, &reflowState, 0, 0,
NS_FRAME_NO_MOVE_FRAME); NS_FRAME_NO_MOVE_FRAME);
mInReflow = false; mInReflow = false;

View File

@ -948,7 +948,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
SetContentEmpty(isEmpty); SetContentEmpty(isEmpty);
// Place the child // Place the child
FinishReflowChild(firstKid, aPresContext, &kidReflowState, kidSize, FinishReflowChild(firstKid, aPresContext, kidSize, &kidReflowState,
kidOrigin.x, kidOrigin.y, 0); kidOrigin.x, kidOrigin.y, 0);
nsTableFrame::InvalidateTableFrame(firstKid, origRect, origVisualOverflow, nsTableFrame::InvalidateTableFrame(firstKid, origRect, origVisualOverflow,

View File

@ -377,7 +377,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
nsReflowStatus status; nsReflowStatus status;
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, 0, 0, 0, status); ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, 0, 0, 0, status);
FinishReflowChild(kidFrame, aPresContext, nullptr, kidSize, 0, 0, 0); FinishReflowChild(kidFrame, aPresContext, kidSize, nullptr, 0, 0, 0);
} }
aDesiredSize.Width() = 0; aDesiredSize.Width() = 0;

View File

@ -2538,7 +2538,7 @@ void nsTableFrame::PlaceChild(nsTableReflowState& aReflowState,
(aKidFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) != 0; (aKidFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) != 0;
// Place and size the child // Place and size the child
FinishReflowChild(aKidFrame, PresContext(), nullptr, aKidDesiredSize, FinishReflowChild(aKidFrame, PresContext(), aKidDesiredSize, nullptr,
aReflowState.x, aReflowState.y, 0); aReflowState.x, aReflowState.y, 0);
InvalidateTableFrame(aKidFrame, aOriginalKidRect, aOriginalKidVisualOverflow, InvalidateTableFrame(aKidFrame, aOriginalKidRect, aOriginalKidVisualOverflow,
@ -3020,7 +3020,7 @@ nsTableFrame::ReflowColGroups(nsRenderingContext *aRenderingContext)
nsReflowStatus cgStatus; nsReflowStatus cgStatus;
ReflowChild(kidFrame, presContext, kidMet, kidReflowState, 0, 0, 0, ReflowChild(kidFrame, presContext, kidMet, kidReflowState, 0, 0, 0,
cgStatus); cgStatus);
FinishReflowChild(kidFrame, presContext, nullptr, kidMet, 0, 0, 0); FinishReflowChild(kidFrame, presContext, kidMet, nullptr, 0, 0, 0);
} }
} }
SetHaveReflowedColGroups(true); SetHaveReflowedColGroups(true);

View File

@ -1032,8 +1032,8 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
nsPoint captionOrigin; nsPoint captionOrigin;
GetCaptionOrigin(captionSide, containSize, innerSize, GetCaptionOrigin(captionSide, containSize, innerSize,
innerMargin, captionSize, captionMargin, captionOrigin); innerMargin, captionSize, captionMargin, captionOrigin);
FinishReflowChild(mCaptionFrames.FirstChild(), aPresContext, captionRS, FinishReflowChild(mCaptionFrames.FirstChild(), aPresContext, captionMet,
captionMet, captionOrigin.x, captionOrigin.y, 0); captionRS, captionOrigin.x, captionOrigin.y, 0);
captionRS->~nsHTMLReflowState(); captionRS->~nsHTMLReflowState();
} }
// XXX If the height is constrained then we need to check whether // XXX If the height is constrained then we need to check whether
@ -1042,7 +1042,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
nsPoint innerOrigin; nsPoint innerOrigin;
GetInnerOrigin(captionSide, containSize, captionSize, GetInnerOrigin(captionSide, containSize, captionSize,
captionMargin, innerSize, innerMargin, innerOrigin); captionMargin, innerSize, innerMargin, innerOrigin);
FinishReflowChild(InnerTableFrame(), aPresContext, innerRS, innerMet, FinishReflowChild(InnerTableFrame(), aPresContext, innerMet, innerRS,
innerOrigin.x, innerOrigin.y, 0); innerOrigin.x, innerOrigin.y, 0);
innerRS->~nsHTMLReflowState(); innerRS->~nsHTMLReflowState();

View File

@ -951,7 +951,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
// Place the child // Place the child
desiredSize.Width() = availCellWidth; desiredSize.Width() = availCellWidth;
FinishReflowChild(kidFrame, aPresContext, nullptr, desiredSize, x, 0, 0); FinishReflowChild(kidFrame, aPresContext, desiredSize, nullptr, x, 0, 0);
nsTableFrame::InvalidateTableFrame(kidFrame, kidRect, kidVisualOverflow, nsTableFrame::InvalidateTableFrame(kidFrame, kidRect, kidVisualOverflow,
firstReflow); firstReflow);

View File

@ -270,7 +270,7 @@ nsTableRowGroupFrame::PlaceChild(nsPresContext* aPresContext,
(aKidFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) != 0; (aKidFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) != 0;
// Place and size the child // Place and size the child
FinishReflowChild(aKidFrame, aPresContext, nullptr, aDesiredSize, 0, FinishReflowChild(aKidFrame, aPresContext, aDesiredSize, nullptr, 0,
aReflowState.y, 0); aReflowState.y, 0);
nsTableFrame::InvalidateTableFrame(aKidFrame, aOriginalKidRect, nsTableFrame::InvalidateTableFrame(aKidFrame, aOriginalKidRect,