mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
backout changeset 8b6f20bda157 (bug 735577 followup 1) for build failure
This commit is contained in:
parent
eb1cfcc097
commit
5b57b958d7
@ -8060,7 +8060,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
|||||||
mIsReflowing = true;
|
mIsReflowing = true;
|
||||||
|
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
nsHTMLReflowMetrics desiredSize(reflowState);
|
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
|
||||||
target->Reflow(mPresContext, desiredSize, reflowState, status);
|
target->Reflow(mPresContext, desiredSize, reflowState, status);
|
||||||
|
|
||||||
// If an incremental reflow is initiated at a frame other than the
|
// If an incremental reflow is initiated at a frame other than the
|
||||||
|
@ -439,7 +439,7 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
|
|||||||
flags = 0;
|
flags = 0;
|
||||||
}
|
}
|
||||||
nsRect rect = mDropdownFrame->GetRect();
|
nsRect rect = mDropdownFrame->GetRect();
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||||
nsReflowStatus ignoredStatus;
|
nsReflowStatus ignoredStatus;
|
||||||
nsresult rv = ReflowChild(mDropdownFrame, aPresContext, desiredSize,
|
nsresult rv = ReflowChild(mDropdownFrame, aPresContext, desiredSize,
|
||||||
kidReflowState, rect.x, rect.y, flags,
|
kidReflowState, rect.x, rect.y, flags,
|
||||||
|
@ -481,7 +481,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
legendReflowState.construct(aPresContext, aReflowState, legend, availSize);
|
legendReflowState.construct(aPresContext, aReflowState, legend, availSize);
|
||||||
}
|
}
|
||||||
if (reflowLegend) {
|
if (reflowLegend) {
|
||||||
nsHTMLReflowMetrics legendDesiredSize(aReflowState);
|
nsHTMLReflowMetrics legendDesiredSize(aReflowState.GetWritingMode());
|
||||||
|
|
||||||
ReflowChild(legend, aPresContext, legendDesiredSize, legendReflowState.ref(),
|
ReflowChild(legend, aPresContext, legendDesiredSize, legendReflowState.ref(),
|
||||||
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
|
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
|
||||||
@ -546,7 +546,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
std::max(0, aReflowState.ComputedMaxHeight() - mLegendSpace);
|
std::max(0, aReflowState.ComputedMaxHeight() - mLegendSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLReflowMetrics kidDesiredSize(kidReflowState,
|
nsHTMLReflowMetrics kidDesiredSize(kidReflowState.GetWritingMode(),
|
||||||
aDesiredSize.mFlags);
|
aDesiredSize.mFlags);
|
||||||
// Reflow the frame
|
// Reflow the frame
|
||||||
NS_ASSERTION(kidReflowState.ComputedPhysicalMargin() == nsMargin(0,0,0,0),
|
NS_ASSERTION(kidReflowState.ComputedPhysicalMargin() == nsMargin(0,0,0,0),
|
||||||
|
@ -283,7 +283,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
|||||||
aFirstKid, availSize);
|
aFirstKid, availSize);
|
||||||
|
|
||||||
nsReflowStatus contentsReflowStatus;
|
nsReflowStatus contentsReflowStatus;
|
||||||
nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState);
|
nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState.GetWritingMode());
|
||||||
ReflowChild(aFirstKid, aPresContext,
|
ReflowChild(aFirstKid, aPresContext,
|
||||||
contentsDesiredSize, contentsReflowState,
|
contentsDesiredSize, contentsReflowState,
|
||||||
xoffset,
|
xoffset,
|
||||||
|
@ -179,7 +179,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
|||||||
xoffset += reflowState.ComputedPhysicalMargin().left;
|
xoffset += reflowState.ComputedPhysicalMargin().left;
|
||||||
yoffset += reflowState.ComputedPhysicalMargin().top;
|
yoffset += reflowState.ComputedPhysicalMargin().top;
|
||||||
|
|
||||||
nsHTMLReflowMetrics barDesiredSize(reflowState);
|
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, &reflowState, barDesiredSize,
|
||||||
|
@ -82,7 +82,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsFormControlFrame::RegUnRegAccessKey(this, true);
|
nsFormControlFrame::RegUnRegAccessKey(this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState);
|
nsHTMLReflowMetrics wrappersDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsIFrame* outerWrapperFrame = mOuterWrapper->GetPrimaryFrame();
|
nsIFrame* outerWrapperFrame = mOuterWrapper->GetPrimaryFrame();
|
||||||
if (outerWrapperFrame) { // display:none?
|
if (outerWrapperFrame) { // display:none?
|
||||||
NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?");
|
NS_ASSERTION(outerWrapperFrame == mFrames.FirstChild(), "huh?");
|
||||||
|
@ -193,7 +193,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
|||||||
xoffset += reflowState.ComputedPhysicalMargin().left;
|
xoffset += reflowState.ComputedPhysicalMargin().left;
|
||||||
yoffset += reflowState.ComputedPhysicalMargin().top;
|
yoffset += reflowState.ComputedPhysicalMargin().top;
|
||||||
|
|
||||||
nsHTMLReflowMetrics barDesiredSize(aReflowState);
|
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, &reflowState, barDesiredSize,
|
||||||
|
@ -350,7 +350,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
|||||||
trackY += aReflowState.ComputedPhysicalBorderPadding().top;
|
trackY += aReflowState.ComputedPhysicalBorderPadding().top;
|
||||||
|
|
||||||
nsReflowStatus frameStatus;
|
nsReflowStatus frameStatus;
|
||||||
nsHTMLReflowMetrics trackDesiredSize(aReflowState);
|
nsHTMLReflowMetrics trackDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsresult rv = ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
nsresult rv = ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||||
trackReflowState, trackX, trackY, 0, frameStatus);
|
trackReflowState, trackX, trackY, 0, frameStatus);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
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.
|
// the thumb at {0,0} to obtain its size, then position it afterwards.
|
||||||
|
|
||||||
nsReflowStatus frameStatus;
|
nsReflowStatus frameStatus;
|
||||||
nsHTMLReflowMetrics thumbDesiredSize(aReflowState);
|
nsHTMLReflowMetrics thumbDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsresult rv = ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
nsresult rv = ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||||
thumbReflowState, 0, 0, 0, frameStatus);
|
thumbReflowState, 0, 0, 0, frameStatus);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
@ -399,7 +399,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
|||||||
// ends at the thumb.
|
// ends at the thumb.
|
||||||
|
|
||||||
nsReflowStatus frameStatus;
|
nsReflowStatus frameStatus;
|
||||||
nsHTMLReflowMetrics progressDesiredSize(aReflowState);
|
nsHTMLReflowMetrics progressDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsresult rv = ReflowChild(rangeProgressFrame, aPresContext,
|
nsresult rv = ReflowChild(rangeProgressFrame, aPresContext,
|
||||||
progressDesiredSize, progressReflowState, 0, 0,
|
progressDesiredSize, progressReflowState, 0, 0,
|
||||||
0, frameStatus);
|
0, frameStatus);
|
||||||
|
@ -563,7 +563,7 @@ nsTextControlFrame::ReflowTextControlChild(nsIFrame* aKid,
|
|||||||
+ kidReflowState.ComputedPhysicalMargin().top;
|
+ kidReflowState.ComputedPhysicalMargin().top;
|
||||||
|
|
||||||
// reflow the child
|
// reflow the child
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||||
ReflowChild(aKid, aPresContext, desiredSize, kidReflowState,
|
ReflowChild(aKid, aPresContext, desiredSize, kidReflowState,
|
||||||
xOffset, yOffset, 0, aStatus);
|
xOffset, yOffset, 0, aStatus);
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
|||||||
aReflowState.ComputedWidth() + aReflowState.ComputedPhysicalPadding().LeftRight();
|
aReflowState.ComputedWidth() + aReflowState.ComputedPhysicalPadding().LeftRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
|
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
|
||||||
nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
|
nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
|
||||||
aContainingBlock.width,
|
aContainingBlock.width,
|
||||||
|
@ -1126,7 +1126,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
mLines.front() != mLines.back() &&
|
mLines.front() != mLines.back() &&
|
||||||
mLines.begin().next()->IsBlock()))) {
|
mLines.begin().next()->IsBlock()))) {
|
||||||
// Reflow the bullet
|
// Reflow the bullet
|
||||||
nsHTMLReflowMetrics metrics(aReflowState);
|
nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode());
|
||||||
// XXX Use the entire line when we fix bug 25888.
|
// XXX Use the entire line when we fix bug 25888.
|
||||||
nsLayoutUtils::LinePosition position;
|
nsLayoutUtils::LinePosition position;
|
||||||
bool havePosition = nsLayoutUtils::GetFirstLinePosition(this, &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
|
// Handle an odd-ball case: a list-item with no lines
|
||||||
if (HasOutsideBullet() && mLines.empty()) {
|
if (HasOutsideBullet() && mLines.empty()) {
|
||||||
nsHTMLReflowMetrics metrics(aState.mReflowState);
|
nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode());
|
||||||
nsIFrame* bullet = GetOutsideBullet();
|
nsIFrame* bullet = GetOutsideBullet();
|
||||||
ReflowBullet(bullet, aState, metrics,
|
ReflowBullet(bullet, aState, metrics,
|
||||||
aState.mReflowState.ComputedPhysicalBorderPadding().top);
|
aState.mReflowState.ComputedPhysicalBorderPadding().top);
|
||||||
@ -4052,7 +4052,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState,
|
|||||||
(mLines.front() != mLines.back() &&
|
(mLines.front() != mLines.back() &&
|
||||||
0 == mLines.front()->mBounds.height &&
|
0 == mLines.front()->mBounds.height &&
|
||||||
aLine == mLines.begin().next()))) {
|
aLine == mLines.begin().next()))) {
|
||||||
nsHTMLReflowMetrics metrics(aState.mReflowState);
|
nsHTMLReflowMetrics metrics(aState.mReflowState.GetWritingMode());
|
||||||
nsIFrame* bullet = GetOutsideBullet();
|
nsIFrame* bullet = GetOutsideBullet();
|
||||||
ReflowBullet(bullet, aState, metrics, aState.mY);
|
ReflowBullet(bullet, aState, metrics, aState.mY);
|
||||||
NS_ASSERTION(!BulletIsEmpty() || metrics.Height() == 0,
|
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
|
// don't need to be reflowed. The normal child is always comes before
|
||||||
// the fixed-pos placeholders, because we insert it at the start
|
// the fixed-pos placeholders, because we insert it at the start
|
||||||
// of the child list, above.
|
// of the child list, above.
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
|
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
|
||||||
if (mFrames.IsEmpty()) {
|
if (mFrames.IsEmpty()) {
|
||||||
// We have no child frame, so return an empty size
|
// We have no child frame, so return an empty size
|
||||||
aDesiredSize.Width() = aDesiredSize.Height() = 0;
|
aDesiredSize.Width() = aDesiredSize.Height() = 0;
|
||||||
|
@ -1147,7 +1147,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
|
|||||||
|
|
||||||
// Initialize reflow params
|
// Initialize reflow params
|
||||||
nsSize availSpace(prevRect.width, aReflowState.AvailableHeight());
|
nsSize availSpace(prevRect.width, aReflowState.AvailableHeight());
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||||
nsHTMLReflowState frameState(aPresContext, aReflowState,
|
nsHTMLReflowState frameState(aPresContext, aReflowState,
|
||||||
frame, availSpace);
|
frame, availSpace);
|
||||||
nsReflowStatus frameStatus;
|
nsReflowStatus frameStatus;
|
||||||
|
@ -928,7 +928,7 @@ nsFlexContainerFrame::
|
|||||||
childRSForMeasuringHeight.mFlags.mVResize = true;
|
childRSForMeasuringHeight.mFlags.mVResize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight);
|
nsHTMLReflowMetrics childDesiredSize(childRSForMeasuringHeight.GetWritingMode());
|
||||||
nsReflowStatus childReflowStatus;
|
nsReflowStatus childReflowStatus;
|
||||||
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
||||||
nsresult rv = ReflowChild(aFlexItem.Frame(), aPresContext,
|
nsresult rv = ReflowChild(aFlexItem.Frame(), aPresContext,
|
||||||
@ -2486,7 +2486,7 @@ nsFlexContainerFrame::SizeItemInCrossAxis(
|
|||||||
// whether any of its ancestors are being resized).
|
// whether any of its ancestors are being resized).
|
||||||
aChildReflowState.mFlags.mVResize = true;
|
aChildReflowState.mFlags.mVResize = true;
|
||||||
}
|
}
|
||||||
nsHTMLReflowMetrics childDesiredSize(aChildReflowState);
|
nsHTMLReflowMetrics childDesiredSize(aChildReflowState.GetWritingMode());
|
||||||
nsReflowStatus childReflowStatus;
|
nsReflowStatus childReflowStatus;
|
||||||
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
const uint32_t flags = NS_FRAME_NO_MOVE_FRAME;
|
||||||
nsresult rv = ReflowChild(aItem.Frame(), aPresContext,
|
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)
|
// after this point, because some of its methods (e.g. SetComputedWidth)
|
||||||
// internally call InitResizeFlags and stomp on mVResize & mHResize.
|
// internally call InitResizeFlags and stomp on mVResize & mHResize.
|
||||||
|
|
||||||
nsHTMLReflowMetrics childDesiredSize(childReflowState);
|
nsHTMLReflowMetrics childDesiredSize(childReflowState.GetWritingMode());
|
||||||
nsReflowStatus childReflowStatus;
|
nsReflowStatus childReflowStatus;
|
||||||
nsresult rv = ReflowChild(curItem.Frame(), aPresContext,
|
nsresult rv = ReflowChild(curItem.Frame(), aPresContext,
|
||||||
childDesiredSize, childReflowState,
|
childDesiredSize, childReflowState,
|
||||||
|
@ -739,7 +739,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
|
|||||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
|
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
|
||||||
reflowState.SetComputedWidth(std::max(0, aSize.width - reflowState.ComputedPhysicalBorderPadding().LeftRight()));
|
reflowState.SetComputedWidth(std::max(0, aSize.width - reflowState.ComputedPhysicalBorderPadding().LeftRight()));
|
||||||
reflowState.SetComputedHeight(std::max(0, aSize.height - reflowState.ComputedPhysicalBorderPadding().TopBottom()));
|
reflowState.SetComputedHeight(std::max(0, aSize.height - reflowState.ComputedPhysicalBorderPadding().TopBottom()));
|
||||||
nsHTMLReflowMetrics metrics(aReflowState);
|
nsHTMLReflowMetrics metrics(aReflowState.GetWritingMode());
|
||||||
metrics.Width() = aSize.width;
|
metrics.Width() = aSize.width;
|
||||||
metrics.Height() = aSize.height;
|
metrics.Height() = aSize.height;
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
|
@ -210,14 +210,6 @@ public:
|
|||||||
, mWritingMode(aWritingMode)
|
, 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 and BSize are logical-coordinate dimensions:
|
||||||
// ISize is the size in the writing mode's inline direction (which equates to
|
// 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
|
// width in horizontal writing modes, height in vertical ones), and BSize is
|
||||||
|
@ -200,7 +200,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nscoord maxXMost = 0;
|
nscoord maxXMost = 0;
|
||||||
|
|
||||||
// Tile the pages vertically
|
// Tile the pages vertically
|
||||||
nsHTMLReflowMetrics kidSize(aReflowState);
|
nsHTMLReflowMetrics kidSize(aReflowState.GetWritingMode());
|
||||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); nullptr != kidFrame; ) {
|
for (nsIFrame* kidFrame = mFrames.FirstChild(); nullptr != kidFrame; ) {
|
||||||
// Set the shared data into the page frame before reflow
|
// Set the shared data into the page frame before reflow
|
||||||
nsPageFrame * pf = static_cast<nsPageFrame*>(kidFrame);
|
nsPageFrame * pf = static_cast<nsPageFrame*>(kidFrame);
|
||||||
|
@ -270,7 +270,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
if (child->GetContent() == mPosterImage) {
|
if (child->GetContent() == mPosterImage) {
|
||||||
// Reflow the poster frame.
|
// Reflow the poster frame.
|
||||||
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
|
nsImageFrame* imageFrame = static_cast<nsImageFrame*>(child);
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
|
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
|
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
|
||||||
aReflowState.AvailableHeight());
|
aReflowState.AvailableHeight());
|
||||||
nsHTMLReflowState kidReflowState(aPresContext,
|
nsHTMLReflowState kidReflowState(aPresContext,
|
||||||
@ -323,7 +323,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
} else if (child->GetContent() == mCaptionDiv) {
|
} else if (child->GetContent() == mCaptionDiv) {
|
||||||
// Reflow to caption div
|
// Reflow to caption div
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
|
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
|
nsSize availableSize = nsSize(aReflowState.AvailableWidth(),
|
||||||
aReflowState.AvailableHeight());
|
aReflowState.AvailableHeight());
|
||||||
nsHTMLReflowState kidReflowState(aPresContext,
|
nsHTMLReflowState kidReflowState(aPresContext,
|
||||||
|
@ -210,7 +210,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
NS_SUBTREE_DIRTY(mFrames.FirstChild())) {
|
NS_SUBTREE_DIRTY(mFrames.FirstChild())) {
|
||||||
// Reflow our one-and-only principal child frame
|
// Reflow our one-and-only principal child frame
|
||||||
nsIFrame* kidFrame = mFrames.FirstChild();
|
nsIFrame* kidFrame = mFrames.FirstChild();
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aReflowState);
|
nsHTMLReflowMetrics kidDesiredSize(aReflowState.GetWritingMode());
|
||||||
nsSize availableSpace(aReflowState.AvailableWidth(),
|
nsSize availableSpace(aReflowState.AvailableWidth(),
|
||||||
aReflowState.AvailableHeight());
|
aReflowState.AvailableHeight());
|
||||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
|
||||||
|
@ -913,7 +913,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsSize availSize(aReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE);
|
nsSize availSize(aReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE);
|
||||||
nsIFrame* childFrame = mFrames.FirstChild();
|
nsIFrame* childFrame = mFrames.FirstChild();
|
||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
nsHTMLReflowMetrics childDesiredSize(aReflowState, // ???
|
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(), // ???
|
||||||
aDesiredSize.mFlags);
|
aDesiredSize.mFlags);
|
||||||
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
||||||
childFrame, availSize);
|
childFrame, availSize);
|
||||||
@ -962,7 +962,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsIMathMLFrame* mathMLFrame = do_QueryFrame(childFrame);
|
nsIMathMLFrame* mathMLFrame = do_QueryFrame(childFrame);
|
||||||
if (mathMLFrame) {
|
if (mathMLFrame) {
|
||||||
// retrieve the metrics that was stored at the previous pass
|
// retrieve the metrics that was stored at the previous pass
|
||||||
nsHTMLReflowMetrics childDesiredSize(aReflowState);
|
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode());
|
||||||
GetReflowAndBoundingMetricsFor(childFrame,
|
GetReflowAndBoundingMetricsFor(childFrame,
|
||||||
childDesiredSize, childDesiredSize.mBoundingMetrics);
|
childDesiredSize, childDesiredSize.mBoundingMetrics);
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
descent = fm->MaxDescent();
|
descent = fm->MaxDescent();
|
||||||
}
|
}
|
||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
nsHTMLReflowMetrics childDesiredSize(aReflowState,
|
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(),
|
||||||
aDesiredSize.mFlags
|
aDesiredSize.mFlags
|
||||||
| NS_REFLOW_CALC_BOUNDING_METRICS);
|
| NS_REFLOW_CALC_BOUNDING_METRICS);
|
||||||
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
||||||
@ -278,7 +278,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
nsIMathMLFrame* mathmlChild = do_QueryFrame(childFrame);
|
nsIMathMLFrame* mathmlChild = do_QueryFrame(childFrame);
|
||||||
if (mathmlChild) {
|
if (mathmlChild) {
|
||||||
nsHTMLReflowMetrics childDesiredSize(aReflowState);
|
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode());
|
||||||
// retrieve the metrics that was stored at the previous pass
|
// retrieve the metrics that was stored at the previous pass
|
||||||
GetReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
GetReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
||||||
childDesiredSize.mBoundingMetrics);
|
childDesiredSize.mBoundingMetrics);
|
||||||
@ -362,7 +362,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
childFrame = firstChild;
|
childFrame = firstChild;
|
||||||
}
|
}
|
||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
nsHTMLReflowMetrics childSize(aReflowState);
|
nsHTMLReflowMetrics childSize(aReflowState.GetWritingMode());
|
||||||
GetReflowAndBoundingMetricsFor(childFrame, childSize, bm);
|
GetReflowAndBoundingMetricsFor(childFrame, childSize, bm);
|
||||||
if (firstTime) {
|
if (firstTime) {
|
||||||
firstTime = false;
|
firstTime = false;
|
||||||
|
@ -164,12 +164,12 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
int32_t count = 0;
|
int32_t count = 0;
|
||||||
nsIFrame* baseFrame = nullptr;
|
nsIFrame* baseFrame = nullptr;
|
||||||
nsIFrame* indexFrame = nullptr;
|
nsIFrame* indexFrame = nullptr;
|
||||||
nsHTMLReflowMetrics baseSize(aReflowState);
|
nsHTMLReflowMetrics baseSize(aReflowState.GetWritingMode());
|
||||||
nsHTMLReflowMetrics indexSize(aReflowState);
|
nsHTMLReflowMetrics indexSize(aReflowState.GetWritingMode());
|
||||||
nsIFrame* childFrame = mFrames.FirstChild();
|
nsIFrame* childFrame = mFrames.FirstChild();
|
||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
// ask our children to compute their bounding metrics
|
// ask our children to compute their bounding metrics
|
||||||
nsHTMLReflowMetrics childDesiredSize(aReflowState,
|
nsHTMLReflowMetrics childDesiredSize(aReflowState.GetWritingMode(),
|
||||||
aDesiredSize.mFlags
|
aDesiredSize.mFlags
|
||||||
| NS_REFLOW_CALC_BOUNDING_METRICS);
|
| NS_REFLOW_CALC_BOUNDING_METRICS);
|
||||||
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
|
||||||
|
@ -5166,7 +5166,7 @@ SVGTextFrame::DoReflow()
|
|||||||
nsHTMLReflowState reflowState(presContext, kid,
|
nsHTMLReflowState reflowState(presContext, kid,
|
||||||
renderingContext,
|
renderingContext,
|
||||||
nsSize(width, NS_UNCONSTRAINEDSIZE));
|
nsSize(width, NS_UNCONSTRAINEDSIZE));
|
||||||
nsHTMLReflowMetrics desiredSize(reflowState);
|
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
|
|
||||||
NS_ASSERTION(reflowState.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) &&
|
NS_ASSERTION(reflowState.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) &&
|
||||||
|
@ -553,7 +553,7 @@ nsSVGForeignObjectFrame::DoReflow()
|
|||||||
nsHTMLReflowState reflowState(presContext, kid,
|
nsHTMLReflowState reflowState(presContext, kid,
|
||||||
renderingContext,
|
renderingContext,
|
||||||
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
|
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
|
||||||
nsHTMLReflowMetrics desiredSize(reflowState);
|
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
|
|
||||||
// We don't use mRect.height above because that tells the child to do
|
// 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;
|
for (nsIFrame *kidFrame = mFrames.FirstChild(); kidFrame;
|
||||||
kidFrame = kidFrame->GetNextSibling()) {
|
kidFrame = kidFrame->GetNextSibling()) {
|
||||||
// Give the child frame a chance to reflow, even though we know it'll have 0 size
|
// 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,
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||||
nsSize(0,0));
|
nsSize(0,0));
|
||||||
|
|
||||||
|
@ -2684,7 +2684,7 @@ nsTableFrame::SetupHeaderFooterChild(const nsTableReflowState& aReflowState,
|
|||||||
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
|
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
|
||||||
InitChildReflowState(kidReflowState);
|
InitChildReflowState(kidReflowState);
|
||||||
kidReflowState.mFlags.mIsTopOfPage = true;
|
kidReflowState.mFlags.mIsTopOfPage = true;
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
|
||||||
desiredSize.Width() = desiredSize.Height() = 0;
|
desiredSize.Width() = desiredSize.Height() = 0;
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
nsresult rv = ReflowChild(aFrame, presContext, desiredSize, kidReflowState,
|
nsresult rv = ReflowChild(aFrame, presContext, desiredSize, kidReflowState,
|
||||||
@ -2717,7 +2717,7 @@ nsTableFrame::PlaceRepeatedFooter(nsTableReflowState& aReflowState,
|
|||||||
nsRect origTfootVisualOverflow = aTfoot->GetVisualOverflowRect();
|
nsRect origTfootVisualOverflow = aTfoot->GetVisualOverflowRect();
|
||||||
|
|
||||||
nsReflowStatus footerStatus;
|
nsReflowStatus footerStatus;
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
|
||||||
desiredSize.Width() = desiredSize.Height() = 0;
|
desiredSize.Width() = desiredSize.Height() = 0;
|
||||||
ReflowChild(aTfoot, presContext, desiredSize, footerReflowState,
|
ReflowChild(aTfoot, presContext, desiredSize, footerReflowState,
|
||||||
aReflowState.x, aReflowState.y, 0, footerStatus);
|
aReflowState.x, aReflowState.y, 0, footerStatus);
|
||||||
@ -2823,7 +2823,7 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
|
|||||||
nsRect oldKidRect = kidFrame->GetRect();
|
nsRect oldKidRect = kidFrame->GetRect();
|
||||||
nsRect oldKidVisualOverflow = kidFrame->GetVisualOverflowRect();
|
nsRect oldKidVisualOverflow = kidFrame->GetVisualOverflowRect();
|
||||||
|
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode());
|
||||||
desiredSize.Width() = desiredSize.Height() = 0;
|
desiredSize.Width() = desiredSize.Height() = 0;
|
||||||
|
|
||||||
// Reflow the child into the available space
|
// Reflow the child into the available space
|
||||||
|
@ -814,7 +814,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||||||
kidFrame, nsSize(0,0),
|
kidFrame, nsSize(0,0),
|
||||||
nsHTMLReflowState::CALLER_WILL_INIT);
|
nsHTMLReflowState::CALLER_WILL_INIT);
|
||||||
InitChildReflowState(*aPresContext, nsSize(0,0), false, kidReflowState);
|
InitChildReflowState(*aPresContext, nsSize(0,0), false, kidReflowState);
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||||
nsReflowStatus status;
|
nsReflowStatus status;
|
||||||
ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState, 0, 0, 0, status);
|
ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState, 0, 0, 0, status);
|
||||||
kidFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
kidFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||||
@ -869,7 +869,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||||||
nscoord availCellWidth =
|
nscoord availCellWidth =
|
||||||
CalcAvailWidth(aTableFrame, *cellFrame, cellSpacingX);
|
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
|
// 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
|
// 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);
|
InitChildReflowState(*aPresContext, availSize, borderCollapse, cellReflowState);
|
||||||
cellReflowState.mFlags.mIsTopOfPage = aIsTopOfPage;
|
cellReflowState.mFlags.mIsTopOfPage = aIsTopOfPage;
|
||||||
|
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
nsHTMLReflowMetrics desiredSize(aReflowState.GetWritingMode());
|
||||||
|
|
||||||
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowState,
|
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowState,
|
||||||
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
|
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
|
// XXXldb We used to only pass aDesiredSize.mFlags through for the
|
||||||
// incremental reflow codepath.
|
// incremental reflow codepath.
|
||||||
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState,
|
nsHTMLReflowMetrics desiredSize(aReflowState.reflowState.GetWritingMode(),
|
||||||
aDesiredSize.mFlags);
|
aDesiredSize.mFlags);
|
||||||
desiredSize.Width() = desiredSize.Height() = 0;
|
desiredSize.Width() = desiredSize.Height() = 0;
|
||||||
|
|
||||||
@ -1076,7 +1076,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
InitChildReflowState(*aPresContext, borderCollapse, rowReflowState);
|
InitChildReflowState(*aPresContext, borderCollapse, rowReflowState);
|
||||||
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
|
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
|
||||||
nsHTMLReflowMetrics rowMetrics(aReflowState);
|
nsHTMLReflowMetrics rowMetrics(aReflowState.GetWritingMode());
|
||||||
|
|
||||||
// Get the old size before we reflow.
|
// Get the old size before we reflow.
|
||||||
nsRect oldRowRect = rowFrame->GetRect();
|
nsRect oldRowRect = rowFrame->GetRect();
|
||||||
|
@ -913,7 +913,7 @@ nsBoxFrame::DoLayout(nsBoxLayoutState& aState)
|
|||||||
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
|
nsSize(mRect.width, NS_UNCONSTRAINEDSIZE));
|
||||||
|
|
||||||
// Set up a |desiredSize| to pass into ReflowAbsoluteFrames
|
// Set up a |desiredSize| to pass into ReflowAbsoluteFrames
|
||||||
nsHTMLReflowMetrics desiredSize(reflowState);
|
nsHTMLReflowMetrics desiredSize(reflowState.GetWritingMode());
|
||||||
desiredSize.Width() = mRect.width;
|
desiredSize.Width() = mRect.width;
|
||||||
desiredSize.Height() = mRect.height;
|
desiredSize.Height() = mRect.height;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user