mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 735577 - followup 1 (v2) - allow reflow-state to be passed to the reflow-metrics constructor to get the writing mode. r=roc
This commit is contained in:
parent
b54968fdba
commit
73fcec8ebe
@ -8279,7 +8279,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,
|
||||
|
@ -405,7 +405,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);
|
||||
@ -470,7 +470,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, barDesiredSize, &reflowState,
|
||||
|
@ -133,7 +133,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
} else {
|
||||
NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?");
|
||||
|
||||
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState.GetWritingMode());
|
||||
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState);
|
||||
|
||||
nsHTMLReflowState wrapperReflowState(aPresContext, aReflowState,
|
||||
outerWrapperFrame,
|
||||
|
@ -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, barDesiredSize, &reflowState,
|
||||
|
@ -368,7 +368,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);
|
||||
@ -390,7 +390,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);
|
||||
@ -417,7 +417,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);
|
||||
|
@ -544,7 +544,7 @@ nsTextControlFrame::ReflowTextControlChild(nsIFrame* aKid,
|
||||
aReflowState.ComputedPhysicalPadding().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,
|
||||
|
@ -1130,7 +1130,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);
|
||||
@ -2363,7 +2363,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);
|
||||
@ -4056,7 +4056,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;
|
||||
|
@ -1138,7 +1138,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;
|
||||
|
@ -995,7 +995,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,
|
||||
@ -2613,7 +2613,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,
|
||||
@ -2987,7 +2987,7 @@ nsFlexContainerFrame::DoFlexLayout(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;
|
||||
|
@ -6,6 +6,7 @@
|
||||
/* struct containing the output from nsIFrame::Reflow */
|
||||
|
||||
#include "nsHTMLReflowMetrics.h"
|
||||
#include "nsHTMLReflowState.h"
|
||||
|
||||
void
|
||||
nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther)
|
||||
@ -35,6 +36,16 @@ nsOverflowAreas::SetAllTo(const nsRect& aRect)
|
||||
}
|
||||
}
|
||||
|
||||
nsHTMLReflowMetrics::nsHTMLReflowMetrics(const nsHTMLReflowState& aState,
|
||||
uint32_t aFlags)
|
||||
: mISize(0)
|
||||
, mBSize(0)
|
||||
, mBlockStartAscent(ASK_FOR_BASELINE)
|
||||
, mFlags(aFlags)
|
||||
, mWritingMode(aState.GetWritingMode())
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLReflowMetrics::SetOverflowAreasToDesiredBounds()
|
||||
{
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class nsHTMLReflowState;
|
||||
|
||||
// Option flags
|
||||
#define NS_REFLOW_CALC_BOUNDING_METRICS 0x0001
|
||||
|
||||
@ -210,6 +212,8 @@ public:
|
||||
, mWritingMode(aWritingMode)
|
||||
{}
|
||||
|
||||
nsHTMLReflowMetrics(const nsHTMLReflowState& aState, uint32_t aFlags = 0);
|
||||
|
||||
// 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
|
||||
|
@ -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);
|
||||
|
@ -272,7 +272,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,
|
||||
@ -325,7 +325,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,
|
||||
|
@ -899,7 +899,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);
|
||||
@ -948,7 +948,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);
|
||||
|
||||
|
@ -236,7 +236,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,
|
||||
@ -275,7 +275,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);
|
||||
@ -359,7 +359,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
||||
childFrame = firstChild;
|
||||
}
|
||||
while (childFrame) {
|
||||
nsHTMLReflowMetrics childSize(aReflowState.GetWritingMode());
|
||||
nsHTMLReflowMetrics childSize(aReflowState);
|
||||
GetReflowAndBoundingMetricsFor(childFrame, childSize, bm);
|
||||
if (firstTime) {
|
||||
firstTime = false;
|
||||
|
@ -167,12 +167,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,
|
||||
|
@ -5199,7 +5199,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) &&
|
||||
|
@ -552,7 +552,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
|
||||
|
@ -375,7 +375,7 @@ nsresult 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));
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
|
||||
// As we've already finished reflow, positionedParts's size and overflow
|
||||
// areas have already been assigned, so we just pull them back out.
|
||||
nsSize size(positionedPart->GetSize());
|
||||
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
||||
desiredSize.Width() = size.width;
|
||||
desiredSize.Height() = size.height;
|
||||
desiredSize.mOverflowAreas = positionedPart->GetOverflowAreasRelativeToSelf();
|
||||
@ -2798,7 +2798,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,
|
||||
@ -2831,7 +2831,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);
|
||||
@ -2937,7 +2937,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
|
||||
|
@ -824,7 +824,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);
|
||||
@ -879,7 +879,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
|
||||
@ -1101,7 +1101,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);
|
||||
|
@ -372,7 +372,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;
|
||||
|
||||
@ -1086,7 +1086,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();
|
||||
|
@ -919,7 +919,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user