--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -252,17 +252,17 @@ nsHTMLButtonControlFrame::ReflowButtonCo
// child to determine its size.
// We just pass a dummy containerSize here, as the child will be
// repositioned later by FinishReflowChild.
nsSize dummyContainerSize;
ReflowChild(aFirstKid, aPresContext,
contentsDesiredSize, contentsReflowInput,
wm, childPos, dummyContainerSize, 0, contentsReflowStatus);
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(contentsReflowStatus),
+ MOZ_ASSERT(contentsReflowStatus.IsComplete(),
"We gave button-contents frame unconstrained available height, "
"so it should be complete");
// Compute the button's content-box size:
LogicalSize buttonContentBox(wm);
if (aButtonReflowInput.ComputedBSize() != NS_INTRINSICSIZE) {
// Button has a fixed block-size -- that's its content-box bSize.
buttonContentBox.BSize(wm) = aButtonReflowInput.ComputedBSize();
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -770,17 +770,17 @@ BlockReflowInput::FlowAndPlaceFloat(nsIF
// orthogonal writing mode and 'auto' block-size (in its mode).
bool earlyFloatReflow =
aFloat->GetType() == nsGkAtoms::letterFrame ||
floatMarginISize == NS_UNCONSTRAINEDSIZE;
if (earlyFloatReflow) {
mBlock->ReflowFloat(*this, adjustedAvailableSpace, aFloat, floatMargin,
floatOffsets, false, reflowStatus);
floatMarginISize = aFloat->ISize(wm) + floatMargin.IStartEnd(wm);
- NS_ASSERTION(NS_FRAME_IS_COMPLETE(reflowStatus),
+ NS_ASSERTION(reflowStatus.IsComplete(),
"letter frames and orthogonal floats with auto block-size "
"shouldn't break, and if they do now, then they're breaking "
"at the wrong point");
}
// Find a place to place the float. The CSS2 spec doesn't want
// floats overlapping each other or sticking out of the containing
// block if possible (CSS2 spec section 9.5.1, see the rule list).
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1262,17 +1262,17 @@ nsBlockFrame::Reflow(nsPresContext*
}
NS_MergeReflowStatusInto(&state.mReflowStatus, ocStatus);
NS_MergeReflowStatusInto(&state.mReflowStatus, fcStatus);
// If we end in a BR with clear and affected floats continue,
// we need to continue, too.
if (NS_UNCONSTRAINEDSIZE != reflowInput->AvailableBSize() &&
- NS_FRAME_IS_COMPLETE(state.mReflowStatus) &&
+ state.mReflowStatus.IsComplete() &&
state.FloatManager()->ClearContinues(FindTrailingClear())) {
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
}
if (!state.mReflowStatus.IsFullyComplete()) {
if (HasOverflowLines() || HasPushedFloats()) {
state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
@@ -1467,17 +1467,17 @@ nsBlockFrame::Reflow(nsPresContext*
// continuation of its containing block. But it's not permitted
// outside that time.
nsLayoutUtils::AssertNoDuplicateContinuations(this, mFloats);
if (gNoisyReflow) {
IndentBy(stdout, gNoiseIndent);
ListTag(stdout);
printf(": status=%x (%scomplete) metrics=%d,%d carriedMargin=%d",
- aStatus, NS_FRAME_IS_COMPLETE(aStatus) ? "" : "not ",
+ aStatus, aStatus.IsComplete() ? "" : "not ",
aMetrics.ISize(parentWM), aMetrics.BSize(parentWM),
aMetrics.mCarriedOutBEndMargin.get());
if (HasOverflowAreas()) {
printf(" overflow-vis={%d,%d,%d,%d}",
aMetrics.VisualOverflow().x,
aMetrics.VisualOverflow().y,
aMetrics.VisualOverflow().width,
aMetrics.VisualOverflow().height);
@@ -1608,17 +1608,17 @@ nsBlockFrame::ComputeFinalSize(const Ref
}
if (NS_UNCONSTRAINEDSIZE != aReflowInput.ComputedBSize()
&& (GetParent()->GetType() != nsGkAtoms::columnSetFrame ||
aReflowInput.mParentReflowInput->AvailableBSize() == NS_UNCONSTRAINEDSIZE)) {
ComputeFinalBSize(aReflowInput, &aState.mReflowStatus,
aState.mBCoord + nonCarriedOutBDirMargin,
borderPadding, finalSize, aState.mConsumedBSize);
- if (!NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+ if (!aState.mReflowStatus.IsComplete()) {
// Use the current height; continuations will take up the rest.
// Do extend the height to at least consume the available
// height, otherwise our left/right borders (for example) won't
// extend all the way to the break.
finalSize.BSize(wm) = std::max(aReflowInput.AvailableBSize(),
aState.mBCoord + nonCarriedOutBDirMargin);
// ... but don't take up more block size than is available
nscoord effectiveComputedBSize =
@@ -1630,17 +1630,17 @@ nsBlockFrame::ComputeFinalSize(const Ref
// on its own on the last-in-flow, even if we ran out of height
// here. We need GetSkipSides to check whether we ran out of content
// height in the current frame, not whether it's last-in-flow.
}
// Don't carry out a block-end margin when our BSize is fixed.
aMetrics.mCarriedOutBEndMargin.Zero();
}
- else if (NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+ else if (aState.mReflowStatus.IsComplete()) {
nscoord contentBSize = blockEndEdgeOfChildren - borderPadding.BStart(wm);
nscoord autoBSize = aReflowInput.ApplyMinMaxBSize(contentBSize);
if (autoBSize != contentBSize) {
// Our min- or max-bsize value made our bsize change. Don't carry out
// our kids' block-end margins.
aMetrics.mCarriedOutBEndMargin.Zero();
}
autoBSize += borderPadding.BStart(wm) + borderPadding.BEnd(wm);
@@ -1662,34 +1662,34 @@ nsBlockFrame::ComputeFinalSize(const Ref
// Overflow containers can only be overflow complete.
// Note that auto height overflow containers have no normal children
NS_ASSERTION(finalSize.BSize(wm) == 0,
"overflow containers must be zero-block-size");
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aState.mReflowStatus);
}
} else if (aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE &&
!NS_INLINE_IS_BREAK_BEFORE(aState.mReflowStatus) &&
- NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+ aState.mReflowStatus.IsComplete()) {
// Currently only used for grid items, but could be used in other contexts.
// The FragStretchBSizeProperty is our expected non-fragmented block-size
// we should stretch to (for align-self:stretch etc). In some fragmentation
// cases though, the last fragment (this frame since we're complete), needs
// to have extra size applied because earlier fragments consumed too much of
// our computed size due to overflowing their containing block. (E.g. this
// ensures we fill the last row when a multi-row grid item is fragmented).
bool found;
nscoord bSize = Properties().Get(FragStretchBSizeProperty(), &found);
if (found) {
finalSize.BSize(wm) = std::max(bSize, finalSize.BSize(wm));
}
}
// Clamp the content size to fit within the margin-box clamp size, if any.
if (MOZ_UNLIKELY(aReflowInput.mFlags.mBClampMarginBoxMinSize) &&
- NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+ aState.mReflowStatus.IsComplete()) {
bool found;
nscoord cbSize = Properties().Get(BClampMarginBoxMinSizeProperty(), &found);
if (found) {
auto marginBoxBSize = finalSize.BSize(wm) +
aReflowInput.ComputedLogicalMargin().BStartEnd(wm);
auto overflow = marginBoxBSize - cbSize;
if (overflow > 0) {
auto contentBSize = finalSize.BSize(wm) - borderPadding.BStartEnd(wm);
@@ -4223,17 +4223,17 @@ nsBlockFrame::ReflowInlineFrame(BlockRef
}
// Break-after cases
if (breakType == StyleClear::Line) {
if (!aLineLayout.GetLineEndsInBR()) {
breakType = StyleClear::None;
}
}
aLine->SetBreakTypeAfter(breakType);
- if (NS_FRAME_IS_COMPLETE(frameReflowStatus)) {
+ if (frameReflowStatus.IsComplete()) {
// Split line, but after the frame just reflowed
SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
if (NS_INLINE_IS_BREAK_AFTER(frameReflowStatus) &&
!aLineLayout.GetLineEndsInBR()) {
aLineLayout.SetDirtyNextLine();
}
}
@@ -7411,17 +7411,17 @@ nsBlockFrame::ComputeFinalBSize(const Re
if (aStatus->IsIncomplete() &&
aFinalSize.BSize(wm) < aReflowInput.AvailableBSize()) {
// We fit in the available space - change status to OVERFLOW_INCOMPLETE.
// XXXmats why didn't Reflow report OVERFLOW_INCOMPLETE in the first place?
// XXXmats and why exclude the case when our size == AvailableBSize?
NS_FRAME_SET_OVERFLOW_INCOMPLETE(*aStatus);
}
- if (NS_FRAME_IS_COMPLETE(*aStatus)) {
+ if (aStatus->IsComplete()) {
if (computedBSizeLeftOver > 0 &&
NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableBSize() &&
aFinalSize.BSize(wm) > aReflowInput.AvailableBSize()) {
if (ShouldAvoidBreakInside(aReflowInput)) {
*aStatus = NS_INLINE_LINE_BREAK_BEFORE();
return;
}
// We don't fit and we consumed some of the computed height,
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -362,17 +362,17 @@ nsBlockReflowContext::PlaceBlock(const R
nsLineBox* aLine,
nsCollapsingMargin& aBEndMarginResult,
nsOverflowAreas& aOverflowAreas,
nsReflowStatus aReflowStatus)
{
// Compute collapsed block-end margin value.
WritingMode wm = aReflowInput.GetWritingMode();
WritingMode parentWM = mMetrics.GetWritingMode();
- if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
+ if (aReflowStatus.IsComplete()) {
aBEndMarginResult = mMetrics.mCarriedOutBEndMargin;
aBEndMarginResult.Include(aReflowInput.ComputedLogicalMargin().
ConvertTo(parentWM, wm).BEnd(parentWM));
} else {
// The used block-end-margin is set to zero before a break.
aBEndMarginResult.Zero();
}
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1282,17 +1282,17 @@ nsContainerFrame::ReflowOverflowContaine
// Handle continuations
if (!frameStatus.IsFullyComplete()) {
if (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
// Abspos frames can't cause their parent to be incomplete,
// only overflow incomplete.
NS_FRAME_SET_OVERFLOW_INCOMPLETE(frameStatus);
}
else {
- NS_ASSERTION(NS_FRAME_IS_COMPLETE(frameStatus),
+ NS_ASSERTION(frameStatus.IsComplete(),
"overflow container frames can't be incomplete, only overflow-incomplete");
}
// Acquire a next-in-flow, creating it if necessary
nsIFrame* nif = frame->GetNextInFlow();
if (!nif) {
NS_ASSERTION(frameStatus & NS_FRAME_REFLOW_NEXTINFLOW,
"Someone forgot a REFLOW_NEXTINFLOW flag");
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -263,17 +263,17 @@ nsFirstLetterFrame::Reflow(nsPresContext
} else {
nsLayoutUtils::SetBSizeFromFontMetrics(this, aMetrics, bp, lineWM, wm);
}
}
if (!NS_INLINE_IS_BREAK_BEFORE(aReflowStatus)) {
// Create a continuation or remove existing continuations based on
// the reflow completion status.
- if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
+ if (aReflowStatus.IsComplete()) {
if (aReflowInput.mLineLayout) {
aReflowInput.mLineLayout->SetFirstLetterStyleOK(false);
}
nsIFrame* kidNextInFlow = kid->GetNextInFlow();
if (kidNextInFlow) {
// Remove all of the childs next-in-flows
kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
}
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1841,17 +1841,17 @@ nsFlexContainerFrame::MeasureAscentAndHe
ReflowChild(aItem.Frame(), aPresContext,
childDesiredSize, aChildReflowInput,
0, 0, flags, childReflowStatus);
aItem.SetHadMeasuringReflow();
// XXXdholbert Once we do pagination / splitting, we'll need to actually
// handle incomplete childReflowStatuses. But for now, we give our kids
// unconstrained available height, which means they should always complete.
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childReflowStatus),
+ MOZ_ASSERT(childReflowStatus.IsComplete(),
"We gave flex item unconstrained available height, so it "
"should be complete");
// Tell the child we're done with its initial reflow.
// (Necessary for e.g. GetBaseline() to work below w/out asserting)
FinishReflowChild(aItem.Frame(), aPresContext,
childDesiredSize, &aChildReflowInput, 0, 0, flags);
@@ -4621,17 +4621,17 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
// Now: If we're complete, add bottom border/padding to desired height (which
// we skipped via skipSides) -- unless that pushes us over available height,
// in which case we become incomplete (unless we already weren't asking for
// any height, in which case we stay complete to avoid looping forever).
// NOTE: If we're auto-height, we allow our bottom border/padding to push us
// over the available height without requesting a continuation, for
// consistency with the behavior of "display:block" elements.
- if (NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (aStatus.IsComplete()) {
nscoord desiredBSizeWithBEndBP =
desiredSizeInFlexWM.BSize(flexWM) + blockEndContainerBP;
if (aReflowInput.AvailableBSize() == NS_UNCONSTRAINEDSIZE ||
desiredSizeInFlexWM.BSize(flexWM) == 0 ||
desiredBSizeWithBEndBP <= aReflowInput.AvailableBSize() ||
aReflowInput.ComputedBSize() == NS_INTRINSICSIZE) {
// Update desired height to include block-end border/padding
@@ -4775,17 +4775,17 @@ nsFlexContainerFrame::ReflowFlexItem(nsP
childDesiredSize, childReflowInput,
outerWM, aFramePos, aContainerSize,
0, childReflowStatus);
// XXXdholbert Once we do pagination / splitting, we'll need to actually
// handle incomplete childReflowStatuses. But for now, we give our kids
// unconstrained available height, which means they should always
// complete.
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childReflowStatus),
+ MOZ_ASSERT(childReflowStatus.IsComplete(),
"We gave flex item unconstrained available height, so it "
"should be complete");
LogicalMargin offsets =
childReflowInput.ComputedLogicalOffsets().ConvertTo(outerWM, wm);
ReflowInput::ApplyRelativePositioning(aItem.Frame(), outerWM,
offsets, &aFramePos,
aContainerSize);
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -9941,17 +9941,17 @@ nsFrame::BoxReflow(nsBoxLayoutState&
nsAdaptorPrintReason(reflowInput);
printf("\n");
#endif
// place the child and reflow
Reflow(aPresContext, aDesiredSize, reflowInput, status);
- NS_ASSERTION(NS_FRAME_IS_COMPLETE(status), "bad status");
+ NS_ASSERTION(status.IsComplete(), "bad status");
uint32_t layoutFlags = aState.LayoutFlags();
nsContainerFrame::FinishReflowChild(this, aPresContext, aDesiredSize,
&reflowInput, aX, aY, layoutFlags | NS_FRAME_NO_MOVE_FRAME);
// Save the ascent. (bug 103925)
if (IsXULCollapsed()) {
metrics->mAscent = 0;
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -700,17 +700,17 @@ nsHTMLFramesetFrame::ReflowPlaceChild(ns
reflowInput.SetComputedHeight(std::max(0, aSize.height - reflowInput.ComputedPhysicalBorderPadding().TopBottom()));
ReflowOutput reflowOutput(aReflowInput);
reflowOutput.Width() = aSize.width;
reflowOutput.Height() = aSize.height;
nsReflowStatus status;
ReflowChild(aChild, aPresContext, reflowOutput, reflowInput, aOffset.x,
aOffset.y, 0, status);
- NS_ASSERTION(NS_FRAME_IS_COMPLETE(status), "bad status");
+ NS_ASSERTION(status.IsComplete(), "bad status");
// Place and size the child
reflowOutput.Width() = aSize.width;
reflowOutput.Height() = aSize.height;
FinishReflowChild(aChild, aPresContext, reflowOutput, nullptr, aOffset.x, aOffset.y, 0);
}
static
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -5282,17 +5282,17 @@ nsGridContainerFrame::ReflowInFlowChild(
ReflowChild(aChild, pc, childSize, childRI, childWM, LogicalPoint(childWM),
dummyContainerSize, 0, aStatus);
LogicalPoint childPos =
cb.Origin(wm).ConvertTo(childWM, wm,
aContainerSize - childSize.PhysicalSize());
// Apply align/justify-self and reflow again if that affects the size.
if (MOZ_LIKELY(isGridItem)) {
LogicalSize size = childSize.Size(childWM); // from the ReflowChild()
- if (NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (aStatus.IsComplete()) {
auto align = childRI.mStylePosition->UsedAlignSelf(containerSC);
auto state = aGridItemInfo->mState[eLogicalAxisBlock];
if (state & ItemState::eContentBaseline) {
align = (state & ItemState::eFirstBaseline) ? NS_STYLE_ALIGN_SELF_START
: NS_STYLE_ALIGN_SELF_END;
}
nscoord cbsz = cb.BSize(wm) - consumedGridAreaBSize;
AlignSelf(*aGridItemInfo, align, cbsz, wm, childRI, size, &childPos);
@@ -5343,17 +5343,17 @@ nsGridContainerFrame::ReflowInFragmentai
std::sort(sortedItems.begin(), sortedItems.end(),
GridItemInfo::IsStartRowLessThan);
// Reflow our placeholder children; they must all be complete.
for (auto child : placeholders) {
nsReflowStatus childStatus;
ReflowInFlowChild(child, nullptr, aContainerSize, Nothing(), &aFragmentainer,
aState, aContentArea, aDesiredSize, childStatus);
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childStatus),
+ MOZ_ASSERT(childStatus.IsComplete(),
"nsPlaceholderFrame should never need to be fragmented");
}
// The available size for children - we'll set this to the edge of the last
// row in most cases below, but for now use the full size.
nscoord childAvailableSize = aFragmentainer.mToFragmentainerEnd;
const uint32_t startRow = aState.mStartRow;
const uint32_t numRows = aState.mRows.mSizes.Length();
@@ -5511,17 +5511,17 @@ nsGridContainerFrame::ReflowInFragmentai
(aFragmentainer.mIsAutoBSize && bEndRow == bSize))) {
bSize = ClampToCSSMaxBSize(bEndRow, aState.mReflowInput, &aStatus);
}
}
// If we can't fit all rows then we're at least overflow-incomplete.
if (endRow < numRows) {
childAvailableSize = bEndRow;
- if (NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (aStatus.IsComplete()) {
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
} else {
// Children always have the full size of the rows in this fragment.
childAvailableSize = std::max(childAvailableSize, bEndRow);
}
@@ -5697,17 +5697,17 @@ nsGridContainerFrame::ReflowRowsInFragme
if (aState.mSharedGridData) {
aState.mSharedGridData->mRows.BreakBeforeRow(aEndRow);
}
}
if (!pushedItems.IsEmpty() ||
!incompleteItems.IsEmpty() ||
!overflowIncompleteItems.IsEmpty()) {
- if (NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (aStatus.IsComplete()) {
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
// Iterate the children in normal document order and append them (or a NIF)
// to one of the following frame lists according to their status.
nsFrameList pushedList;
nsFrameList incompleteList;
nsFrameList overflowIncompleteList;
@@ -5848,17 +5848,17 @@ nsGridContainerFrame::ReflowChildren(Gri
for (; !aState.mIter.AtEnd(); aState.mIter.Next()) {
nsIFrame* child = *aState.mIter;
const GridItemInfo* info = nullptr;
if (child->GetType() != nsGkAtoms::placeholderFrame) {
info = &aState.mGridItems[aState.mIter.GridItemIndex()];
}
ReflowInFlowChild(*aState.mIter, info, containerSize, Nothing(), nullptr,
aState, aContentArea, aDesiredSize, aStatus);
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(aStatus), "child should be complete "
+ MOZ_ASSERT(aStatus.IsComplete(), "child should be complete "
"in unconstrained reflow");
}
}
// Merge overflow container bounds and status.
aDesiredSize.mOverflowAreas.UnionWith(ocBounds);
NS_MergeReflowStatusInto(&aStatus, ocStatus);
@@ -6152,32 +6152,32 @@ nsGridContainerFrame::Reflow(nsPresConte
// CalculateTrackSizes did the columns.
gridReflowInput.mRows.AlignJustifyContent(stylePos, wm, contentArea.Size(wm));
}
bSize = ReflowChildren(gridReflowInput, contentArea, aDesiredSize, aStatus);
bSize = std::max(bSize - consumedBSize, 0);
// Skip our block-end border if we're INCOMPLETE.
- if (!NS_FRAME_IS_COMPLETE(aStatus) &&
+ if (!aStatus.IsComplete() &&
!gridReflowInput.mSkipSides.BEnd() &&
StyleBorder()->mBoxDecorationBreak !=
StyleBoxDecorationBreak::Clone) {
bp.BEnd(wm) = nscoord(0);
}
LogicalSize desiredSize(wm, computedISize + bp.IStartEnd(wm),
bSize + bp.BStartEnd(wm));
aDesiredSize.SetSize(wm, desiredSize);
nsRect frameRect(0, 0, aDesiredSize.Width(), aDesiredSize.Height());
aDesiredSize.mOverflowAreas.UnionAllWith(frameRect);
// Convert INCOMPLETE -> OVERFLOW_INCOMPLETE and zero bsize if we're an OC.
if (HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER)) {
- if (!NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (!aStatus.IsComplete()) {
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
bSize = 0;
desiredSize.BSize(wm) = bSize + bp.BStartEnd(wm);
aDesiredSize.SetSize(wm, desiredSize);
}
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -298,19 +298,16 @@ private:
bool mOverflowIncomplete : 1;
};
#define NS_FRAME_COMPLETE 0 // Note: not a bit!
#define NS_FRAME_NOT_COMPLETE 0x1
#define NS_FRAME_REFLOW_NEXTINFLOW 0x2
#define NS_FRAME_OVERFLOW_INCOMPLETE 0x4
-#define NS_FRAME_IS_COMPLETE(status) \
- (0 == ((status) & NS_FRAME_NOT_COMPLETE))
-
#define NS_FRAME_OVERFLOW_IS_INCOMPLETE(status) \
(0 != ((status) & NS_FRAME_OVERFLOW_INCOMPLETE))
// These macros set or switch incomplete statuses without touching the
// NS_FRAME_REFLOW_NEXTINFLOW bit.
#define NS_FRAME_SET_INCOMPLETE(status) \
status = (status & ~NS_FRAME_OVERFLOW_INCOMPLETE) | NS_FRAME_NOT_COMPLETE
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -729,17 +729,17 @@ nsInlineFrame::ReflowFrames(nsPresContex
(!reflowingFirstLetter && aStatus.IsIncomplete())) {
break;
}
irs.mPrevFrame = frame;
frame = frame->GetNextSibling();
}
}
- NS_ASSERTION(!NS_FRAME_IS_COMPLETE(aStatus) || !GetOverflowFrames(),
+ NS_ASSERTION(!aStatus.IsComplete() || !GetOverflowFrames(),
"We can't be complete AND have overflow frames!");
// If after reflowing our children they take up no area then make
// sure that we don't either.
//
// Note: CSS demands that empty inline elements still affect the
// line-height calculations. However, continuations of an inline
// that are empty we force to empty so that things like collapsed
@@ -766,17 +766,17 @@ nsInlineFrame::ReflowFrames(nsPresContex
/*
* We want to only apply the end border and padding if we're the last
* continuation and either not in an {ib} split or the last part of it. To
* be the last continuation we have to be complete (so that we won't get a
* next-in-flow) and have no non-fluid continuations on our continuation
* chain. For box-decoration-break:clone we always apply the end border and
* padding since all continuations have them.
*/
- if ((NS_FRAME_IS_COMPLETE(aStatus) &&
+ if ((aStatus.IsComplete() &&
!LastInFlow()->GetNextContinuation() &&
!FrameIsNonLastInIBSplit()) ||
boxDecorationBreakClone) {
aMetrics.ISize(lineWM) += framePadding.IEnd(frameWM);
}
nsLayoutUtils::SetBSizeFromFontMetrics(this, aMetrics,
framePadding, lineWM, frameWM);
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -1067,17 +1067,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
*aMetrics = reflowOutput;
}
if (!NS_INLINE_IS_BREAK_BEFORE(aReflowStatus)) {
// If frame is complete and has a next-in-flow, we need to delete
// them now. Do not do this when a break-before is signaled because
// the frame is going to get reflowed again (and may end up wanting
// a next-in-flow where it ends up).
- if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
+ if (aReflowStatus.IsComplete()) {
nsIFrame* kidNextInFlow = aFrame->GetNextInFlow();
if (nullptr != kidNextInFlow) {
// Remove all of the childs next-in-flows. Make sure that we ask
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
kidNextInFlow->GetParent()->
DeleteNextInFlowChild(kidNextInFlow, true);
}
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -90,17 +90,17 @@ nsPageContentFrame::Reflow(nsPresContext
NS_ASSERTION(aPresContext->IsDynamic() || !aStatus.IsFullyComplete() ||
!frame->GetNextInFlow(), "bad child flow list");
}
// Reflow our fixed frames
nsReflowStatus fixedStatus = NS_FRAME_COMPLETE;
ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowInput, fixedStatus);
- NS_ASSERTION(NS_FRAME_IS_COMPLETE(fixedStatus), "fixed frames can be truncated, but not incomplete");
+ NS_ASSERTION(fixedStatus.IsComplete(), "fixed frames can be truncated, but not incomplete");
// Return our desired size
WritingMode wm = aReflowInput.GetWritingMode();
aDesiredSize.ISize(wm) = aReflowInput.ComputedISize();
if (aReflowInput.ComputedBSize() != NS_UNCONSTRAINEDSIZE) {
aDesiredSize.BSize(wm) = aReflowInput.ComputedBSize();
}
FinishAndStoreOverflow(&aDesiredSize);
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -400,19 +400,19 @@ nsRubyBaseContainerFrame::Reflow(nsPresC
// XXX When bug 765861 gets fixed, this warning should be upgraded.
NS_WARNING_ASSERTION(
NS_INLINE_IS_BREAK(aStatus) || isize == lineSpanSize || mFrames.IsEmpty(),
"bad isize");
// If there exists any span, the columns must either be completely
// reflowed, or be not reflowed at all.
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
- NS_FRAME_IS_COMPLETE(aStatus) || !hasSpan);
+ aStatus.IsComplete() || !hasSpan);
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
- NS_FRAME_IS_COMPLETE(aStatus) && hasSpan) {
+ aStatus.IsComplete() && hasSpan) {
// Reflow spans
RubyReflowInput reflowInput = {
false, false, textContainers, aReflowInput, reflowInputs
};
nscoord spanISize = ReflowSpans(reflowInput);
isize = std::max(isize, spanISize);
}
@@ -523,17 +523,17 @@ nsRubyBaseContainerFrame::ReflowColumns(
if (NS_INLINE_IS_BREAK_BEFORE(reflowStatus)) {
if (!columnIndex || !aReflowInput.mAllowLineBreak) {
// If no column has been placed yet, or we have any span,
// the whole container should be in the next line.
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
return 0;
}
aStatus = NS_INLINE_LINE_BREAK_AFTER(aStatus);
- MOZ_ASSERT(NS_FRAME_IS_COMPLETE(aStatus) || aReflowInput.mAllowLineBreak);
+ MOZ_ASSERT(aStatus.IsComplete() || aReflowInput.mAllowLineBreak);
// If we are on an intra-level whitespace column, null values in
// column.mBaseFrame and column.mTextFrames don't represent the
// end of the frame-sibling-chain at that level -- instead, they
// represent an anonymous empty intra-level whitespace box. It is
// likely that there are frames in the next column (which can't be
// intra-level whitespace). Those frames should be pushed as well.
Maybe<RubyColumn> nextColumn;
--- a/layout/generic/nsRubyFrame.cpp
+++ b/layout/generic/nsRubyFrame.cpp
@@ -166,17 +166,17 @@ nsRubyFrame::Reflow(nsPresContext* aPres
}
// We never handle overflow in ruby.
MOZ_ASSERT(!NS_FRAME_OVERFLOW_IS_INCOMPLETE(aStatus));
aDesiredSize.ISize(lineWM) = aReflowInput.mLineLayout->EndSpan(this);
if (boxDecorationBreakClone || !GetPrevContinuation()) {
aDesiredSize.ISize(lineWM) += borderPadding.IStart(frameWM);
}
- if (boxDecorationBreakClone || NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (boxDecorationBreakClone || aStatus.IsComplete()) {
aDesiredSize.ISize(lineWM) += borderPadding.IEnd(frameWM);
}
// Update descendant leadings of ancestor ruby base container.
if (nsRubyBaseContainerFrame* rbc = FindRubyBaseContainerAncestor(this)) {
rbc->UpdateDescendantLeadings(mLeadings);
}
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -889,17 +889,17 @@ nsMathMLContainerFrame::Reflow(nsPresCon
aDesiredSize.mFlags);
WritingMode wm = childFrame->GetWritingMode();
LogicalSize availSize = aReflowInput.ComputedSize(wm);
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput childReflowInput(aPresContext, aReflowInput,
childFrame, availSize);
ReflowChild(childFrame, aPresContext, childDesiredSize,
childReflowInput, childStatus);
- //NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
+ //NS_ASSERTION(childStatus.IsComplete(), "bad status");
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
childDesiredSize.mBoundingMetrics);
childFrame = childFrame->GetNextSibling();
}
/////////////
// If we are a container which is entitled to stretch its children, then we
// ask our stretchy children to stretch themselves
--- a/layout/mathml/nsMathMLTokenFrame.cpp
+++ b/layout/mathml/nsMathMLTokenFrame.cpp
@@ -139,17 +139,17 @@ nsMathMLTokenFrame::Reflow(nsPresContext
| NS_REFLOW_CALC_BOUNDING_METRICS);
WritingMode wm = childFrame->GetWritingMode();
LogicalSize availSize = aReflowInput.ComputedSize(wm);
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput childReflowInput(aPresContext, aReflowInput,
childFrame, availSize);
ReflowChild(childFrame, aPresContext, childDesiredSize,
childReflowInput, aStatus);
- //NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
+ //NS_ASSERTION(aStatus.IsComplete(), "bad status");
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
childDesiredSize.mBoundingMetrics);
}
// place and size children
FinalizeReflow(aReflowInput.mRenderingContext->GetDrawTarget(), aDesiredSize);
aStatus = NS_FRAME_COMPLETE;
--- a/layout/mathml/nsMathMLmfencedFrame.cpp
+++ b/layout/mathml/nsMathMLmfencedFrame.cpp
@@ -260,17 +260,17 @@ nsMathMLmfencedFrame::Reflow(nsPresConte
| NS_REFLOW_CALC_BOUNDING_METRICS);
WritingMode wm = childFrame->GetWritingMode();
LogicalSize availSize = aReflowInput.ComputedSize(wm);
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput childReflowInput(aPresContext, aReflowInput,
childFrame, availSize);
ReflowChild(childFrame, aPresContext, childDesiredSize,
childReflowInput, childStatus);
- //NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
+ //NS_ASSERTION(childStatus.IsComplete(), "bad status");
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
childDesiredSize.mBoundingMetrics);
mozilla::WritingMode outerWM = aReflowInput.GetWritingMode();
nscoord childDescent = childDesiredSize.BSize(outerWM) -
childDesiredSize.BlockStartAscent();
if (descent < childDescent)
descent = childDescent;
--- a/layout/mathml/nsMathMLmpaddedFrame.cpp
+++ b/layout/mathml/nsMathMLmpaddedFrame.cpp
@@ -310,17 +310,17 @@ nsMathMLmpaddedFrame::Reflow(nsPresConte
{
mPresentationData.flags &= ~NS_MATHML_ERROR;
ProcessAttributes();
///////////////
// Let the base class format our content like an inferred mrow
nsMathMLContainerFrame::Reflow(aPresContext, aDesiredSize,
aReflowInput, aStatus);
- //NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
+ //NS_ASSERTION(aStatus.IsComplete(), "bad status");
}
/* virtual */ nsresult
nsMathMLmpaddedFrame::Place(DrawTarget* aDrawTarget,
bool aPlaceOrigin,
ReflowOutput& aDesiredSize)
{
nsresult rv =
--- a/layout/mathml/nsMathMLmrootFrame.cpp
+++ b/layout/mathml/nsMathMLmrootFrame.cpp
@@ -191,17 +191,17 @@ nsMathMLmrootFrame::Reflow(nsPresContext
| NS_REFLOW_CALC_BOUNDING_METRICS);
WritingMode wm = childFrame->GetWritingMode();
LogicalSize availSize = aReflowInput.ComputedSize(wm);
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput childReflowInput(aPresContext, aReflowInput,
childFrame, availSize);
ReflowChild(childFrame, aPresContext,
childDesiredSize, childReflowInput, childStatus);
- //NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
+ //NS_ASSERTION(childStatus.IsComplete(), "bad status");
if (0 == count) {
// base
baseFrame = childFrame;
baseSize = childDesiredSize;
bmBase = childDesiredSize.mBoundingMetrics;
}
else if (1 == count) {
// index
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1924,17 +1924,17 @@ nsTableFrame::Reflow(nsPresContext*
aReflowInput.ComputedWidth() == NS_UNCONSTRAINEDSIZE;
// reevaluate special bsize reflow conditions
if (HasAnyStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE)) {
needToInitiateSpecialReflow = true;
}
// XXXldb Are all these conditions correct?
- if (needToInitiateSpecialReflow && NS_FRAME_IS_COMPLETE(aStatus)) {
+ if (needToInitiateSpecialReflow && aStatus.IsComplete()) {
// XXXldb Do we need to set the IsBResize flag on any reflow states?
ReflowInput &mutable_rs =
const_cast<ReflowInput&>(aReflowInput);
// distribute extra block-direction space to rows
CalcDesiredBSize(aReflowInput, aDesiredSize);
mutable_rs.mFlags.mSpecialBSizeReflow = true;
@@ -3167,17 +3167,17 @@ nsTableFrame::ReflowChildren(TableReflow
ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
break;
}
// see if the rowgroup did not fit on this page might be pushed on
// the next page
if (isPaginated &&
(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
- (NS_FRAME_IS_COMPLETE(aStatus) &&
+ (aStatus.IsComplete() &&
(NS_UNCONSTRAINEDSIZE != kidReflowInput.AvailableHeight()) &&
kidReflowInput.AvailableHeight() < desiredSize.Height()))) {
if (ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
break;
}
// if we are on top of the page place with dataloss
if (kidReflowInput.mFlags.mIsTopOfPage) {
@@ -3228,17 +3228,17 @@ nsTableFrame::ReflowChildren(TableReflow
}
}
}
aLastChildReflowed = kidFrame;
pageBreak = false;
// see if there is a page break after this row group or before the next one
- if (NS_FRAME_IS_COMPLETE(aStatus) && isPaginated &&
+ if (aStatus.IsComplete() && isPaginated &&
(NS_UNCONSTRAINEDSIZE != kidReflowInput.AvailableHeight())) {
nsIFrame* nextKid =
(childX + 1 < rowGroups.Length()) ? rowGroups[childX + 1] : nullptr;
pageBreak = PageBreakAfter(kidFrame, nextKid);
}
// Place the child
PlaceChild(aReflowInput, kidFrame,
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -1172,17 +1172,17 @@ nsTableRowFrame::ReflowCellFrame(nsPresC
ReflowInput::CALLER_WILL_INIT);
InitChildReflowInput(*aPresContext, availSize, borderCollapse, cellReflowInput);
cellReflowInput.mFlags.mIsTopOfPage = aIsTopOfPage;
ReflowOutput desiredSize(aReflowInput);
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowInput,
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
- bool fullyComplete = NS_FRAME_IS_COMPLETE(aStatus) && !NS_FRAME_IS_TRUNCATED(aStatus);
+ bool fullyComplete = aStatus.IsComplete() && !NS_FRAME_IS_TRUNCATED(aStatus);
if (fullyComplete) {
desiredSize.BSize(wm) = aAvailableBSize;
}
aCellFrame->SetSize(wm, LogicalSize(wm, cellSize.ISize(wm),
desiredSize.BSize(wm)));
// Note: BlockDirAlignChild can affect the overflow rect.
// XXX What happens if this cell has 'vertical-align: baseline' ?
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -1023,17 +1023,17 @@ nsTableRowGroupFrame::SplitSpanningCells
ReflowInput::CALLER_WILL_INIT);
InitChildReflowInput(aPresContext, borderCollapse, rowReflowInput);
rowReflowInput.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
nscoord cellBSize = row->ReflowCellFrame(&aPresContext, rowReflowInput,
isTopOfPage, cell,
cellAvailBSize, status);
aDesiredBSize = std::max(aDesiredBSize, rowPos.y + cellBSize);
- if (NS_FRAME_IS_COMPLETE(status)) {
+ if (status.IsComplete()) {
if (cellBSize > cellAvailBSize) {
aFirstTruncatedRow = row;
if ((row != &aFirstRow) || !aFirstRowIsTopOfPage) {
// return now, since we will be getting another reflow after either (1) row is
// moved to the next page or (2) the row group is moved to the next page
return;
}
}