From 5b57b958d73a7f10e07bb886c88364fb5b8544d0 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Sun, 29 Dec 2013 22:48:13 +0000 Subject: [PATCH] backout changeset 8b6f20bda157 (bug 735577 followup 1) for build failure --- layout/base/nsPresShell.cpp | 2 +- layout/forms/nsComboboxControlFrame.cpp | 2 +- layout/forms/nsFieldSetFrame.cpp | 4 ++-- layout/forms/nsHTMLButtonControlFrame.cpp | 2 +- layout/forms/nsMeterFrame.cpp | 2 +- layout/forms/nsNumberControlFrame.cpp | 2 +- layout/forms/nsProgressFrame.cpp | 2 +- layout/forms/nsRangeFrame.cpp | 6 +++--- layout/forms/nsTextControlFrame.cpp | 2 +- layout/generic/nsAbsoluteContainingBlock.cpp | 2 +- layout/generic/nsBlockFrame.cpp | 6 +++--- layout/generic/nsCanvasFrame.cpp | 2 +- layout/generic/nsContainerFrame.cpp | 2 +- layout/generic/nsFlexContainerFrame.cpp | 6 +++--- layout/generic/nsFrameSetFrame.cpp | 2 +- layout/generic/nsHTMLReflowMetrics.h | 8 -------- layout/generic/nsSimplePageSequence.cpp | 2 +- layout/generic/nsVideoFrame.cpp | 4 ++-- layout/generic/nsViewportFrame.cpp | 2 +- layout/mathml/nsMathMLContainerFrame.cpp | 4 ++-- layout/mathml/nsMathMLmfencedFrame.cpp | 6 +++--- layout/mathml/nsMathMLmrootFrame.cpp | 6 +++--- layout/svg/SVGTextFrame.cpp | 2 +- layout/svg/nsSVGForeignObjectFrame.cpp | 2 +- layout/tables/nsTableColGroupFrame.cpp | 2 +- layout/tables/nsTableFrame.cpp | 6 +++--- layout/tables/nsTableRowFrame.cpp | 6 +++--- layout/tables/nsTableRowGroupFrame.cpp | 4 ++-- layout/xul/nsBoxFrame.cpp | 2 +- 29 files changed, 46 insertions(+), 54 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 69dfbacb018..2a2af1c9cfc 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -8060,7 +8060,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible) mIsReflowing = true; nsReflowStatus status; - nsHTMLReflowMetrics desiredSize(reflowState); + nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode()); target->Reflow(mPresContext, desiredSize, reflowState, status); // If an incremental reflow is initiated at a frame other than the diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index f1486b6d045..06f8f803cca 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -439,7 +439,7 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext, flags = 0; } nsRect rect = mDropdownFrame->GetRect(); - nsHTMLReflowMetrics desiredSize(aReflowState); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); nsReflowStatus ignoredStatus; nsresult rv = ReflowChild(mDropdownFrame, aPresContext, desiredSize, kidReflowState, rect.x, rect.y, flags, diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 86423ae87a2..534663dca35 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -481,7 +481,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext, legendReflowState.construct(aPresContext, aReflowState, legend, availSize); } if (reflowLegend) { - nsHTMLReflowMetrics legendDesiredSize(aReflowState); + nsHTMLReflowMetrics legendDesiredSize(aReflowState.GetWritingMode()); 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, + nsHTMLReflowMetrics kidDesiredSize(kidReflowState.GetWritingMode(), aDesiredSize.mFlags); // Reflow the frame NS_ASSERTION(kidReflowState.ComputedPhysicalMargin() == nsMargin(0,0,0,0), diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index b48b7b2d7ca..5d84d4ca8f5 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -283,7 +283,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext, aFirstKid, availSize); nsReflowStatus contentsReflowStatus; - nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState); + nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState.GetWritingMode()); ReflowChild(aFirstKid, aPresContext, contentsDesiredSize, contentsReflowState, xoffset, diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index 8b60c6ab81a..4403acdddde 100644 --- a/layout/forms/nsMeterFrame.cpp +++ b/layout/forms/nsMeterFrame.cpp @@ -179,7 +179,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame, xoffset += reflowState.ComputedPhysicalMargin().left; yoffset += reflowState.ComputedPhysicalMargin().top; - nsHTMLReflowMetrics barDesiredSize(reflowState); + nsHTMLReflowMetrics barDesiredSize(reflowState.GetWritingMode()); ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset, yoffset, 0, aStatus); FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize, diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp index 256f053e391..d10b835450f 100644 --- a/layout/forms/nsNumberControlFrame.cpp +++ b/layout/forms/nsNumberControlFrame.cpp @@ -82,7 +82,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext, nsFormControlFrame::RegUnRegAccessKey(this, true); } - nsHTMLReflowMetrics wrappersDesiredSize(aReflowState); + nsHTMLReflowMetrics wrappersDesiredSize(aReflowState.GetWritingMode()); nsIFrame* outerWrapperFrame = mOuterWrapper->GetPrimaryFrame(); if (outerWrapperFrame) { // display:none? NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?"); diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index 661084cff9e..3a89865e65c 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -193,7 +193,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame, xoffset += reflowState.ComputedPhysicalMargin().left; yoffset += reflowState.ComputedPhysicalMargin().top; - nsHTMLReflowMetrics barDesiredSize(aReflowState); + nsHTMLReflowMetrics barDesiredSize(aReflowState.GetWritingMode()); ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset, yoffset, 0, aStatus); FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize, diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index f9b6a9d9b67..5724e7a01cf 100644 --- a/layout/forms/nsRangeFrame.cpp +++ b/layout/forms/nsRangeFrame.cpp @@ -350,7 +350,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext, trackY += aReflowState.ComputedPhysicalBorderPadding().top; nsReflowStatus frameStatus; - nsHTMLReflowMetrics trackDesiredSize(aReflowState); + nsHTMLReflowMetrics trackDesiredSize(aReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics thumbDesiredSize(aReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics progressDesiredSize(aReflowState.GetWritingMode()); nsresult rv = ReflowChild(rangeProgressFrame, aPresContext, progressDesiredSize, progressReflowState, 0, 0, 0, frameStatus); diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index cce85d3af86..ee3b0914c68 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -563,7 +563,7 @@ nsTextControlFrame::ReflowTextControlChild(nsIFrame* aKid, + kidReflowState.ComputedPhysicalMargin().top; // reflow the child - nsHTMLReflowMetrics desiredSize(aReflowState); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); ReflowChild(aKid, aPresContext, desiredSize, kidReflowState, xOffset, yOffset, 0, aStatus); diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index 5ea2dcbfa1c..6365feb39f9 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -383,7 +383,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat aReflowState.ComputedWidth() + aReflowState.ComputedPhysicalPadding().LeftRight(); } - nsHTMLReflowMetrics kidDesiredSize(aReflowState); + nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode()); nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame, nsSize(availWidth, NS_UNCONSTRAINEDSIZE), aContainingBlock.width, diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 51a0081cde0..a6c1a4ed82f 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1126,7 +1126,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, mLines.front() != mLines.back() && mLines.begin().next()->IsBlock()))) { // Reflow the bullet - nsHTMLReflowMetrics metrics(aReflowState); + nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode()); // 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); + nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode()); nsIFrame* bullet = GetOutsideBullet(); ReflowBullet(bullet, aState, metrics, aState.mY); NS_ASSERTION(!BulletIsEmpty() || metrics.Height() == 0, diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 3b3bf089b36..fb2bca4a62d 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -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); + nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode()); if (mFrames.IsEmpty()) { // We have no child frame, so return an empty size aDesiredSize.Width() = aDesiredSize.Height() = 0; diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 03bba869392..2faf7ed3026 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -1147,7 +1147,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres // Initialize reflow params nsSize availSpace(prevRect.width, aReflowState.AvailableHeight()); - nsHTMLReflowMetrics desiredSize(aReflowState); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); nsHTMLReflowState frameState(aPresContext, aReflowState, frame, availSpace); nsReflowStatus frameStatus; diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index d20e448563c..53ddb350f13 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -928,7 +928,7 @@ nsFlexContainerFrame:: childRSForMeasuringHeight.mFlags.mVResize = true; } - nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight); + nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight.GetWritingMode()); 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); + nsHTMLReflowMetrics childDesiredSize(aChildReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics childDesiredSize(childReflowState.GetWritingMode()); nsReflowStatus childReflowStatus; nsresult rv = ReflowChild(curItem.Frame(), aPresContext, childDesiredSize, childReflowState, diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 026dc5aabf7..2cd7b8e12dd 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -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); + nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode()); metrics.Width() = aSize.width; metrics.Height() = aSize.height; nsReflowStatus status; diff --git a/layout/generic/nsHTMLReflowMetrics.h b/layout/generic/nsHTMLReflowMetrics.h index a469ee33682..c137064e3e5 100644 --- a/layout/generic/nsHTMLReflowMetrics.h +++ b/layout/generic/nsHTMLReflowMetrics.h @@ -210,14 +210,6 @@ public: , mWritingMode(aWritingMode) {} - nsHTMLReflowMetrics(const nsHTMLReflowState& aState, uint32_t aFlags = 0) - : mISize(0) - , mBSize(0) - , mBlockStartAscent(ASK_FOR_BASELINE) - , mFlags(aFlags) - , mWritingMode(aState.GetWritingMode()) - {} - // ISize and BSize are logical-coordinate dimensions: // ISize is the size in the writing mode's inline direction (which equates to // width in horizontal writing modes, height in vertical ones), and BSize is diff --git a/layout/generic/nsSimplePageSequence.cpp b/layout/generic/nsSimplePageSequence.cpp index 34469ecd7af..730ad0b11de 100644 --- a/layout/generic/nsSimplePageSequence.cpp +++ b/layout/generic/nsSimplePageSequence.cpp @@ -200,7 +200,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, nscoord maxXMost = 0; // Tile the pages vertically - nsHTMLReflowMetrics kidSize(aReflowState); + nsHTMLReflowMetrics kidSize(aReflowState.GetWritingMode()); for (nsIFrame* kidFrame = mFrames.FirstChild(); nullptr != kidFrame; ) { // Set the shared data into the page frame before reflow nsPageFrame * pf = static_cast(kidFrame); diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 474f48e6cb0..415062bc4d1 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -270,7 +270,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext, if (child->GetContent() == mPosterImage) { // Reflow the poster frame. nsImageFrame* imageFrame = static_cast(child); - nsHTMLReflowMetrics kidDesiredSize(aReflowState); + nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode()); nsSize availableSize = nsSize(aReflowState.AvailableWidth(), aReflowState.AvailableHeight()); nsHTMLReflowState kidReflowState(aPresContext, diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 51e432d37d5..ce66f4a6a5d 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -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); + nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode()); nsSize availableSpace(aReflowState.AvailableWidth(), aReflowState.AvailableHeight()); nsHTMLReflowState kidReflowState(aPresContext, aReflowState, diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index 4b99760654c..c9f99643e10 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -913,7 +913,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext, nsSize availSize(aReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE); nsIFrame* childFrame = mFrames.FirstChild(); while (childFrame) { - nsHTMLReflowMetrics childDesiredSize(aReflowState, // ??? + nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(), // ??? 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); + nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode()); GetReflowAndBoundingMetricsFor(childFrame, childDesiredSize, childDesiredSize.mBoundingMetrics); diff --git a/layout/mathml/nsMathMLmfencedFrame.cpp b/layout/mathml/nsMathMLmfencedFrame.cpp index 6ac641e8f20..2706b29cfd8 100644 --- a/layout/mathml/nsMathMLmfencedFrame.cpp +++ b/layout/mathml/nsMathMLmfencedFrame.cpp @@ -239,7 +239,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext, descent = fm->MaxDescent(); } while (childFrame) { - nsHTMLReflowMetrics childDesiredSize(aReflowState, + nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(), 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); + nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode()); // 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); + nsHTMLReflowMetrics childSize(aReflowState.GetWritingMode()); GetReflowAndBoundingMetricsFor(childFrame, childSize, bm); if (firstTime) { firstTime = false; diff --git a/layout/mathml/nsMathMLmrootFrame.cpp b/layout/mathml/nsMathMLmrootFrame.cpp index d4de001671e..556ded28e78 100644 --- a/layout/mathml/nsMathMLmrootFrame.cpp +++ b/layout/mathml/nsMathMLmrootFrame.cpp @@ -164,12 +164,12 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext, int32_t count = 0; nsIFrame* baseFrame = nullptr; nsIFrame* indexFrame = nullptr; - nsHTMLReflowMetrics baseSize(aReflowState); - nsHTMLReflowMetrics indexSize(aReflowState); + nsHTMLReflowMetrics baseSize(aReflowState.GetWritingMode()); + nsHTMLReflowMetrics indexSize(aReflowState.GetWritingMode()); nsIFrame* childFrame = mFrames.FirstChild(); while (childFrame) { // ask our children to compute their bounding metrics - nsHTMLReflowMetrics childDesiredSize(aReflowState, + nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(), aDesiredSize.mFlags | NS_REFLOW_CALC_BOUNDING_METRICS); nsHTMLReflowState childReflowState(aPresContext, aReflowState, diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index d191523ac1c..ca521a8e5c3 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -5166,7 +5166,7 @@ SVGTextFrame::DoReflow() nsHTMLReflowState reflowState(presContext, kid, renderingContext, nsSize(width, NS_UNCONSTRAINEDSIZE)); - nsHTMLReflowMetrics desiredSize(reflowState); + nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode()); nsReflowStatus status; NS_ASSERTION(reflowState.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) && diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index 6bdd81070f3..d114aabb439 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -553,7 +553,7 @@ nsSVGForeignObjectFrame::DoReflow() nsHTMLReflowState reflowState(presContext, kid, renderingContext, nsSize(mRect.width, NS_UNCONSTRAINEDSIZE)); - nsHTMLReflowMetrics desiredSize(reflowState); + nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode()); nsReflowStatus status; // We don't use mRect.height above because that tells the child to do diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index b69edeed672..4f0d3df4e62 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -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); + nsHTMLReflowMetrics kidSize(aReflowState.GetWritingMode()); nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame, nsSize(0,0)); diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 05a1469c84d..fa8e6a5f2e0 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -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); + nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode()); desiredSize.Width() = desiredSize.Height() = 0; // Reflow the child into the available space diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 5a4c5fb5553..e4aa71e1ff3 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -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); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); 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); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); // 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); + nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode()); ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowState, 0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus); diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 0276acfd7c0..129e894f2f1 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -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, + nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode(), 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); + nsHTMLReflowMetrics rowMetrics(aReflowState.GetWritingMode()); // Get the old size before we reflow. nsRect oldRowRect = rowFrame->GetRect(); diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index 8d0282c5c67..9dd88acf5f3 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -913,7 +913,7 @@ nsBoxFrame::DoLayout(nsBoxLayoutState& aState) nsSize(mRect.width, NS_UNCONSTRAINEDSIZE)); // Set up a |desiredSize| to pass into ReflowAbsoluteFrames - nsHTMLReflowMetrics desiredSize(reflowState); + nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode()); desiredSize.Width() = mRect.width; desiredSize.Height() = mRect.height;