bug 735577 - followup 1 - allow reflow-state to be passed to the reflow-metrics constructor to get the writing mode. r=roc

This commit is contained in:
Jonathan Kew 2013-12-29 22:04:02 +00:00
Родитель 7260967d47
Коммит 9d097b2e05
29 изменённых файлов: 54 добавлений и 46 удалений

Просмотреть файл

@ -8060,7 +8060,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
mIsReflowing = true;
nsReflowStatus status;
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(reflowState);
target->Reflow(mPresContext, desiredSize, reflowState, status);
// If an incremental reflow is initiated at a frame other than the

Просмотреть файл

@ -439,7 +439,7 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
flags = 0;
}
nsRect rect = mDropdownFrame->GetRect();
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
nsReflowStatus ignoredStatus;
nsresult rv = ReflowChild(mDropdownFrame, aPresContext, desiredSize,
kidReflowState, rect.x, rect.y, flags,

Просмотреть файл

@ -481,7 +481,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
legendReflowState.construct(aPresContext, aReflowState, legend, availSize);
}
if (reflowLegend) {
nsHTMLReflowMetrics legendDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics legendDesiredSize(aReflowState);
ReflowChild(legend, aPresContext, legendDesiredSize, legendReflowState.ref(),
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
@ -546,7 +546,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
std::max(0, aReflowState.ComputedMaxHeight() - mLegendSpace);
}
nsHTMLReflowMetrics kidDesiredSize(kidReflowState.GetWritingMode(),
nsHTMLReflowMetrics kidDesiredSize(kidReflowState,
aDesiredSize.mFlags);
// Reflow the frame
NS_ASSERTION(kidReflowState.ComputedPhysicalMargin() == nsMargin(0,0,0,0),

Просмотреть файл

@ -283,7 +283,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
aFirstKid, availSize);
nsReflowStatus contentsReflowStatus;
nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState.GetWritingMode());
nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState);
ReflowChild(aFirstKid, aPresContext,
contentsDesiredSize, contentsReflowState,
xoffset,

Просмотреть файл

@ -179,7 +179,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame,
xoffset += reflowState.ComputedPhysicalMargin().left;
yoffset += reflowState.ComputedPhysicalMargin().top;
nsHTMLReflowMetrics barDesiredSize(reflowState.GetWritingMode());
nsHTMLReflowMetrics barDesiredSize(reflowState);
ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset,
yoffset, 0, aStatus);
FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize,

Просмотреть файл

@ -82,7 +82,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
nsFormControlFrame::RegUnRegAccessKey(this, true);
}
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState);
nsIFrame* outerWrapperFrame = mOuterWrapper->GetPrimaryFrame();
if (outerWrapperFrame) { // display:none?
NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?");

Просмотреть файл

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

Просмотреть файл

@ -350,7 +350,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
trackY += aReflowState.ComputedPhysicalBorderPadding().top;
nsReflowStatus frameStatus;
nsHTMLReflowMetrics trackDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics trackDesiredSize(aReflowState);
nsresult rv = ReflowChild(trackFrame, aPresContext, trackDesiredSize,
trackReflowState, trackX, trackY, 0, frameStatus);
NS_ENSURE_SUCCESS(rv, rv);
@ -372,7 +372,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
// the thumb at {0,0} to obtain its size, then position it afterwards.
nsReflowStatus frameStatus;
nsHTMLReflowMetrics thumbDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics thumbDesiredSize(aReflowState);
nsresult rv = ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbReflowState, 0, 0, 0, frameStatus);
NS_ENSURE_SUCCESS(rv, rv);
@ -399,7 +399,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
// ends at the thumb.
nsReflowStatus frameStatus;
nsHTMLReflowMetrics progressDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics progressDesiredSize(aReflowState);
nsresult rv = ReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, progressReflowState, 0, 0,
0, frameStatus);

Просмотреть файл

@ -563,7 +563,7 @@ nsTextControlFrame::ReflowTextControlChild(nsIFrame* aKid,
+ kidReflowState.ComputedPhysicalMargin().top;
// reflow the child
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
ReflowChild(aKid, aPresContext, desiredSize, kidReflowState,
xOffset, yOffset, 0, aStatus);

Просмотреть файл

@ -383,7 +383,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
aReflowState.ComputedWidth() + aReflowState.ComputedPhysicalPadding().LeftRight();
}
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
aContainingBlock.width,

Просмотреть файл

@ -1126,7 +1126,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
mLines.front() != mLines.back() &&
mLines.begin().next()->IsBlock()))) {
// Reflow the bullet
nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode());
nsHTMLReflowMetrics metrics(aReflowState);
// XXX Use the entire line when we fix bug 25888.
nsLayoutUtils::LinePosition position;
bool havePosition = nsLayoutUtils::GetFirstLinePosition(this, &position);
@ -2359,7 +2359,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
// Handle an odd-ball case: a list-item with no lines
if (HasOutsideBullet() && mLines.empty()) {
nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode());
nsHTMLReflowMetrics metrics(aState.mReflowState);
nsIFrame* bullet = GetOutsideBullet();
ReflowBullet(bullet, aState, metrics,
aState.mReflowState.ComputedPhysicalBorderPadding().top);
@ -4052,7 +4052,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState,
(mLines.front() != mLines.back() &&
0 == mLines.front()->mBounds.height &&
aLine == mLines.begin().next()))) {
nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode());
nsHTMLReflowMetrics metrics(aState.mReflowState);
nsIFrame* bullet = GetOutsideBullet();
ReflowBullet(bullet, aState, metrics, aState.mY);
NS_ASSERTION(!BulletIsEmpty() || metrics.Height() == 0,

Просмотреть файл

@ -492,7 +492,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
// don't need to be reflowed. The normal child is always comes before
// the fixed-pos placeholders, because we insert it at the start
// of the child list, above.
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
if (mFrames.IsEmpty()) {
// We have no child frame, so return an empty size
aDesiredSize.Width() = aDesiredSize.Height() = 0;

Просмотреть файл

@ -1147,7 +1147,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
// Initialize reflow params
nsSize availSpace(prevRect.width, aReflowState.AvailableHeight());
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
nsHTMLReflowState frameState(aPresContext, aReflowState,
frame, availSpace);
nsReflowStatus frameStatus;

Просмотреть файл

@ -928,7 +928,7 @@ nsFlexContainerFrame::
childRSForMeasuringHeight.mFlags.mVResize = true;
}
nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight.GetWritingMode());
nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight);
nsReflowStatus childReflowStatus;
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
nsresult rv = ReflowChild(aFlexItem.Frame(), aPresContext,
@ -2486,7 +2486,7 @@ nsFlexContainerFrame::SizeItemInCrossAxis(
// whether any of its ancestors are being resized).
aChildReflowState.mFlags.mVResize = true;
}
nsHTMLReflowMetrics childDesiredSize(aChildReflowState.GetWritingMode());
nsHTMLReflowMetrics childDesiredSize(aChildReflowState);
nsReflowStatus childReflowStatus;
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
nsresult rv = ReflowChild(aItem.Frame(), aPresContext,
@ -2823,7 +2823,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
// after this point, because some of its methods (e.g. SetComputedWidth)
// internally call InitResizeFlags and stomp on mVResize & mHResize.
nsHTMLReflowMetrics childDesiredSize(childReflowState.GetWritingMode());
nsHTMLReflowMetrics childDesiredSize(childReflowState);
nsReflowStatus childReflowStatus;
nsresult rv = ReflowChild(curItem.Frame(), aPresContext,
childDesiredSize, childReflowState,

Просмотреть файл

@ -739,7 +739,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
reflowState.SetComputedWidth(std::max(0, aSize.width - reflowState.ComputedPhysicalBorderPadding().LeftRight()));
reflowState.SetComputedHeight(std::max(0, aSize.height - reflowState.ComputedPhysicalBorderPadding().TopBottom()));
nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode());
nsHTMLReflowMetrics metrics(aReflowState);
metrics.Width() = aSize.width;
metrics.Height() = aSize.height;
nsReflowStatus status;

Просмотреть файл

@ -210,6 +210,14 @@ public:
, mWritingMode(aWritingMode)
{}
nsHTMLReflowMetrics(const nsHTMLReflowState& aState, uint32_t aFlags = 0)
: mISize(0)
, mBSize(0)
, mBlockStartAscent(ASK_FOR_BASELINE)
, mFlags(aFlags)
, mWritingMode(aState.GetWritingMode())
{}
nscoord ISize() const { return mISize; }
nscoord BSize() const { return mBSize; }

Просмотреть файл

@ -200,7 +200,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
nscoord maxXMost = 0;
// Tile the pages vertically
nsHTMLReflowMetrics kidSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidSize(aReflowState);
for (nsIFrame* kidFrame = mFrames.FirstChild(); nullptr != kidFrame; ) {
// Set the shared data into the page frame before reflow
nsPageFrame * pf = static_cast<nsPageFrame*>(kidFrame);

Просмотреть файл

@ -270,7 +270,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
if (child->GetContent() == mPosterImage) {
// Reflow the poster frame.
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
aReflowState.AvailableHeight());
nsHTMLReflowState kidReflowState(aPresContext,
@ -323,7 +323,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
}
} else if (child->GetContent() == mCaptionDiv) {
// Reflow to caption div
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
aReflowState.AvailableHeight());
nsHTMLReflowState kidReflowState(aPresContext,

Просмотреть файл

@ -210,7 +210,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
NS_SUBTREE_DIRTY(mFrames.FirstChild())) {
// Reflow our one-and-only principal child frame
nsIFrame* kidFrame = mFrames.FirstChild();
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
nsSize availableSpace(aReflowState.AvailableWidth(),
aReflowState.AvailableHeight());
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,

Просмотреть файл

@ -913,7 +913,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
nsSize availSize(aReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE);
nsIFrame* childFrame = mFrames.FirstChild();
while (childFrame) {
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(), // ???
nsHTMLReflowMetrics childDesiredSize(aReflowState, // ???
aDesiredSize.mFlags);
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
childFrame, availSize);
@ -962,7 +962,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
nsIMathMLFrame* mathMLFrame = do_QueryFrame(childFrame);
if (mathMLFrame) {
// retrieve the metrics that was stored at the previous pass
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics childDesiredSize(aReflowState);
GetReflowAndBoundingMetricsFor(childFrame,
childDesiredSize, childDesiredSize.mBoundingMetrics);

Просмотреть файл

@ -239,7 +239,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
descent = fm->MaxDescent();
}
while (childFrame) {
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(),
nsHTMLReflowMetrics childDesiredSize(aReflowState,
aDesiredSize.mFlags
| NS_REFLOW_CALC_BOUNDING_METRICS);
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
@ -278,7 +278,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
while (childFrame) {
nsIMathMLFrame* mathmlChild = do_QueryFrame(childFrame);
if (mathmlChild) {
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics childDesiredSize(aReflowState);
// retrieve the metrics that was stored at the previous pass
GetReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
childDesiredSize.mBoundingMetrics);
@ -362,7 +362,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
childFrame = firstChild;
}
while (childFrame) {
nsHTMLReflowMetrics childSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics childSize(aReflowState);
GetReflowAndBoundingMetricsFor(childFrame, childSize, bm);
if (firstTime) {
firstTime = false;

Просмотреть файл

@ -164,12 +164,12 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
int32_t count = 0;
nsIFrame* baseFrame = nullptr;
nsIFrame* indexFrame = nullptr;
nsHTMLReflowMetrics baseSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics indexSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics baseSize(aReflowState);
nsHTMLReflowMetrics indexSize(aReflowState);
nsIFrame* childFrame = mFrames.FirstChild();
while (childFrame) {
// ask our children to compute their bounding metrics
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(),
nsHTMLReflowMetrics childDesiredSize(aReflowState,
aDesiredSize.mFlags
| NS_REFLOW_CALC_BOUNDING_METRICS);
nsHTMLReflowState childReflowState(aPresContext, aReflowState,

Просмотреть файл

@ -5166,7 +5166,7 @@ SVGTextFrame::DoReflow()
nsHTMLReflowState reflowState(presContext, kid,
renderingContext,
nsSize(width, NS_UNCONSTRAINEDSIZE));
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(reflowState);
nsReflowStatus status;
NS_ASSERTION(reflowState.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) &&

Просмотреть файл

@ -553,7 +553,7 @@ nsSVGForeignObjectFrame::DoReflow()
nsHTMLReflowState reflowState(presContext, kid,
renderingContext,
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(reflowState);
nsReflowStatus status;
// We don't use mRect.height above because that tells the child to do

Просмотреть файл

@ -371,7 +371,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
for (nsIFrame *kidFrame = mFrames.FirstChild(); kidFrame;
kidFrame = kidFrame->GetNextSibling()) {
// Give the child frame a chance to reflow, even though we know it'll have 0 size
nsHTMLReflowMetrics kidSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics kidSize(aReflowState);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
nsSize(0,0));

Просмотреть файл

@ -2684,7 +2684,7 @@ nsTableFrame::SetupHeaderFooterChild(const nsTableReflowState& aReflowState,
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
InitChildReflowState(kidReflowState);
kidReflowState.mFlags.mIsTopOfPage = true;
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
desiredSize.Width() = desiredSize.Height() = 0;
nsReflowStatus status;
nsresult rv = ReflowChild(aFrame, presContext, desiredSize, kidReflowState,
@ -2717,7 +2717,7 @@ nsTableFrame::PlaceRepeatedFooter(nsTableReflowState& aReflowState,
nsRect origTfootVisualOverflow = aTfoot->GetVisualOverflowRect();
nsReflowStatus footerStatus;
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
desiredSize.Width() = desiredSize.Height() = 0;
ReflowChild(aTfoot, presContext, desiredSize, footerReflowState,
aReflowState.x, aReflowState.y, 0, footerStatus);
@ -2823,7 +2823,7 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
nsRect oldKidRect = kidFrame->GetRect();
nsRect oldKidVisualOverflow = kidFrame->GetVisualOverflowRect();
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
desiredSize.Width() = desiredSize.Height() = 0;
// Reflow the child into the available space

Просмотреть файл

@ -814,7 +814,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
kidFrame, nsSize(0,0),
nsHTMLReflowState::CALLER_WILL_INIT);
InitChildReflowState(*aPresContext, nsSize(0,0), false, kidReflowState);
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
nsReflowStatus status;
ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState, 0, 0, 0, status);
kidFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
@ -869,7 +869,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
nscoord availCellWidth =
CalcAvailWidth(aTableFrame, *cellFrame, cellSpacingX);
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
// If the avail width is not the same as last time we reflowed the cell or
// the cell wants to be bigger than what was available last time or
@ -1091,7 +1091,7 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
InitChildReflowState(*aPresContext, availSize, borderCollapse, cellReflowState);
cellReflowState.mFlags.mIsTopOfPage = aIsTopOfPage;
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(aReflowState);
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowState,
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);

Просмотреть файл

@ -362,7 +362,7 @@ nsTableRowGroupFrame::ReflowChildren(nsPresContext* aPresContext,
// XXXldb We used to only pass aDesiredSize.mFlags through for the
// incremental reflow codepath.
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode(),
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState,
aDesiredSize.mFlags);
desiredSize.Width() = desiredSize.Height() = 0;
@ -1076,7 +1076,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
InitChildReflowState(*aPresContext, borderCollapse, rowReflowState);
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
nsHTMLReflowMetrics rowMetrics(aReflowState.GetWritingMode());
nsHTMLReflowMetrics rowMetrics(aReflowState);
// Get the old size before we reflow.
nsRect oldRowRect = rowFrame->GetRect();

Просмотреть файл

@ -913,7 +913,7 @@ nsBoxFrame::DoLayout(nsBoxLayoutState& aState)
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
// Set up a |desiredSize| to pass into ReflowAbsoluteFrames
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
nsHTMLReflowMetrics desiredSize(reflowState);
desiredSize.Width() = mRect.width;
desiredSize.Height() = mRect.height;