--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -893,17 +893,17 @@ nsComboboxControlFrame::Reflow(nsPresCon
buttonRect.BStart(wm) = this->GetLogicalUsedBorder(wm).BStart(wm);
buttonRect.BSize(wm) = mDisplayFrame->BSize(wm) +
this->GetLogicalUsedPadding(wm).BStartEnd(wm);
mButtonFrame->SetRect(buttonRect, containerSize);
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
- !NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
+ !aStatus.IsFullyComplete()) {
// This frame didn't fit inside a fragmentation container. Splitting
// a nsComboboxControlFrame makes no sense, so we override the status here.
aStatus = NS_FRAME_COMPLETE;
}
}
//--------------------------------------------------------------
--- a/layout/forms/nsDateTimeControlFrame.cpp
+++ b/layout/forms/nsDateTimeControlFrame.cpp
@@ -230,17 +230,17 @@ nsDateTimeControlFrame::Reflow(nsPresCon
nsReflowStatus childStatus;
// We initially reflow the child with a dummy containerSize; positioning
// will be fixed later.
const nsSize dummyContainerSize;
ReflowChild(inputAreaFrame, aPresContext, childDesiredSize,
childReflowOuput, myWM, childOffset, dummyContainerSize, 0,
childStatus);
- MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
+ MOZ_ASSERT(childStatus.IsFullyComplete(),
"We gave our child unconstrained available block-size, "
"so it should be complete");
nscoord childMarginBoxBSize =
childDesiredSize.BSize(myWM) + childMargin.BStartEnd(myWM);
if (contentBoxBSize == NS_INTRINSICSIZE) {
// We are intrinsically sized -- we should shrinkwrap the input area's
--- a/layout/forms/nsNumberControlFrame.cpp
+++ b/layout/forms/nsNumberControlFrame.cpp
@@ -178,17 +178,17 @@ nsNumberControlFrame::Reflow(nsPresConte
nsReflowStatus childStatus;
// We initially reflow the child with a dummy containerSize; positioning
// will be fixed later.
const nsSize dummyContainerSize;
ReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
wrapperReflowInput, myWM, wrapperOffset, dummyContainerSize, 0,
childStatus);
- MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
+ MOZ_ASSERT(childStatus.IsFullyComplete(),
"We gave our child unconstrained available block-size, "
"so it should be complete");
nscoord wrappersMarginBoxBSize =
wrappersDesiredSize.BSize(myWM) + wrapperMargin.BStartEnd(myWM);
if (contentBoxBSize == NS_INTRINSICSIZE) {
// We are intrinsically sized -- we should shrinkwrap the outer wrapper's
--- a/layout/forms/nsRangeFrame.cpp
+++ b/layout/forms/nsRangeFrame.cpp
@@ -413,17 +413,17 @@ nsRangeFrame::ReflowAnonymousContent(nsP
// Make relative to our border box instead of our content box:
trackX += aReflowInput.ComputedPhysicalBorderPadding().left;
trackY += aReflowInput.ComputedPhysicalBorderPadding().top;
nsReflowStatus frameStatus;
ReflowOutput trackDesiredSize(aReflowInput);
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
trackReflowInput, trackX, trackY, 0, frameStatus);
- MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
+ MOZ_ASSERT(frameStatus.IsFullyComplete(),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
&trackReflowInput, trackX, trackY, 0);
}
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
if (thumbFrame) { // display:none?
@@ -435,17 +435,17 @@ nsRangeFrame::ReflowAnonymousContent(nsP
// Where we position the thumb depends on its size, so we first reflow
// the thumb at {0,0} to obtain its size, then position it afterwards.
nsReflowStatus frameStatus;
ReflowOutput thumbDesiredSize(aReflowInput);
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbReflowInput, 0, 0, 0, frameStatus);
- MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
+ MOZ_ASSERT(frameStatus.IsFullyComplete(),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
&thumbReflowInput, 0, 0, 0);
DoUpdateThumbPosition(thumbFrame, nsSize(aDesiredSize.Width(),
aDesiredSize.Height()));
}
nsIFrame* rangeProgressFrame = mProgressDiv->GetPrimaryFrame();
@@ -461,17 +461,17 @@ nsRangeFrame::ReflowAnonymousContent(nsP
// unadjusted dimensions, then we adjust it to so that the appropriate edge
// ends at the thumb.
nsReflowStatus frameStatus;
ReflowOutput progressDesiredSize(aReflowInput);
ReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, progressReflowInput, 0, 0,
0, frameStatus);
- MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
+ MOZ_ASSERT(frameStatus.IsFullyComplete(),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, &progressReflowInput, 0, 0, 0);
DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(),
aDesiredSize.Height()));
}
}
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -936,17 +936,17 @@ BlockReflowInput::FlowAndPlaceFloat(nsIF
// We can't use aFloat->ShouldAvoidBreakInside(mReflowInput) here since
// its mIsTopOfPage may be true even though the float isn't at the
// top when floatPos.B(wm) > 0.
if (ContentBSize() != NS_UNCONSTRAINEDSIZE &&
!mustPlaceFloat &&
(!mReflowInput.mFlags.mIsTopOfPage || floatPos.B(wm) > 0) &&
NS_STYLE_PAGE_BREAK_AVOID == aFloat->StyleDisplay()->mBreakInside &&
- (!NS_FRAME_IS_FULLY_COMPLETE(reflowStatus) ||
+ (!reflowStatus.IsFullyComplete() ||
aFloat->BSize(wm) + floatMargin.BStartEnd(wm) >
ContentBEnd() - floatPos.B(wm)) &&
!aFloat->GetPrevInFlow()) {
PushFloatPastBreak(aFloat);
return false;
}
// Calculate the actual origin of the float frame's border rect
@@ -997,17 +997,17 @@ BlockReflowInput::FlowAndPlaceFloat(nsIF
// less damage; e.g., if only height has changed, then only note the
// area into which the float has grown or from which the float has
// shrunk.
nscoord blockStart = std::min(region.BStart(wm), oldRegion.BStart(wm));
nscoord blockEnd = std::max(region.BEnd(wm), oldRegion.BEnd(wm));
FloatManager()->IncludeInDamage(blockStart, blockEnd);
}
- if (!NS_FRAME_IS_FULLY_COMPLETE(reflowStatus)) {
+ if (!reflowStatus.IsFullyComplete()) {
mBlock->SplitFloat(*this, aFloat, reflowStatus);
} else {
MOZ_ASSERT(!aFloat->GetNextInFlow());
}
#ifdef DEBUG
if (nsBlockFrame::gNoisyFloatManager) {
nscoord tI, tB;
--- a/layout/generic/nsAbsoluteContainingBlock.cpp
+++ b/layout/generic/nsAbsoluteContainingBlock.cpp
@@ -133,17 +133,17 @@ nsAbsoluteContainingBlock::Reflow(nsCont
if (kidNeedsReflow && !aPresContext->HasPendingInterrupt()) {
// Reflow the frame
nsReflowStatus kidStatus = NS_FRAME_COMPLETE;
const nsRect& cb = isGrid ? nsGridContainerFrame::GridItemCB(kidFrame)
: aContainingBlock;
ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowInput, cb,
aFlags, kidFrame, kidStatus, aOverflowAreas);
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
- if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus) &&
+ if (!kidStatus.IsFullyComplete() &&
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
// Need a continuation
if (!nextFrame) {
nextFrame =
aPresContext->PresShell()->FrameConstructor()->
CreateContinuingFrame(aPresContext, kidFrame, aDelegatingFrame);
}
// Add it as an overflow container.
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1233,26 +1233,26 @@ nsBlockFrame::Reflow(nsPresContext*
mState &= ~NS_FRAME_FIRST_REFLOW;
// Now reflow...
ReflowDirtyLines(state);
// If we have a next-in-flow, and that next-in-flow has pushed floats from
// this frame from a previous iteration of reflow, then we should not return
- // a status of NS_FRAME_IS_FULLY_COMPLETE, since we actually have overflow,
- // it's just already been handled.
+ // a status with IsFullyComplete() equals to true, since we actually have
+ // overflow, it's just already been handled.
// NOTE: This really shouldn't happen, since we _should_ pull back our floats
// and reflow them, but just in case it does, this is a safety precaution so
// we don't end up with a placeholder pointing to frames that have already
// been deleted as part of removing our next-in-flow.
// XXXmats maybe this code isn't needed anymore?
// XXXmats (layout/generic/crashtests/600100.xhtml doesn't crash without it)
- if (NS_FRAME_IS_FULLY_COMPLETE(state.mReflowStatus)) {
+ if (state.mReflowStatus.IsFullyComplete()) {
nsBlockFrame* nif = static_cast<nsBlockFrame*>(GetNextInFlow());
while (nif) {
if (nif->HasPushedFloatsFromPrevContinuation()) {
bool oc = nif->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER;
NS_MergeReflowStatusInto(&state.mReflowStatus,
oc ? NS_FRAME_OVERFLOW_INCOMPLETE : NS_FRAME_NOT_COMPLETE);
break;
}
@@ -1267,17 +1267,17 @@ nsBlockFrame::Reflow(nsPresContext*
// 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.FloatManager()->ClearContinues(FindTrailingClear())) {
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
}
- if (!NS_FRAME_IS_FULLY_COMPLETE(state.mReflowStatus)) {
+ if (!state.mReflowStatus.IsFullyComplete()) {
if (HasOverflowLines() || HasPushedFloats()) {
state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
#ifdef DEBUG_kipp
ListTag(stdout); printf(": block is not fully complete\n");
#endif
}
@@ -3599,17 +3599,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
bool forceFit = aState.IsAdjacentWithTop() && clearance <= 0 &&
!floatAvailableSpace.mHasFloats;
nsCollapsingMargin collapsedBEndMargin;
nsOverflowAreas overflowAreas;
*aKeepReflowGoing = brc.PlaceBlock(*blockHtmlRI, forceFit, aLine.get(),
collapsedBEndMargin,
overflowAreas,
frameReflowStatus);
- if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus) &&
+ if (!frameReflowStatus.IsFullyComplete() &&
ShouldAvoidBreakInside(aState.mReflowInput)) {
*aKeepReflowGoing = false;
}
if (aLine->SetCarriedOutBEndMargin(collapsedBEndMargin)) {
LineIterator nextLine = aLine;
++nextLine;
if (nextLine != LinesEnd()) {
@@ -3623,17 +3623,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
// Advance to new Y position
nscoord newBCoord = aLine->BEnd();
aState.mBCoord = newBCoord;
// Continue the block frame now if it didn't completely fit in
// the available space.
- if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus)) {
+ if (!frameReflowStatus.IsFullyComplete()) {
bool madeContinuation =
CreateContinuationFor(aState, nullptr, frame);
nsIFrame* nextFrame = frame->GetNextInFlow();
NS_ASSERTION(nextFrame, "We're supposed to have a next-in-flow by now");
if (frameReflowStatus.IsIncomplete()) {
// If nextFrame used to be an overflow container, make it a normal block
@@ -4235,17 +4235,17 @@ nsBlockFrame::ReflowInlineFrame(BlockRef
if (NS_INLINE_IS_BREAK_AFTER(frameReflowStatus) &&
!aLineLayout.GetLineEndsInBR()) {
aLineLayout.SetDirtyNextLine();
}
}
}
}
- if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus)) {
+ if (!frameReflowStatus.IsFullyComplete()) {
// Create a continuation for the incomplete frame. Note that the
// frame may already have a continuation.
CreateContinuationFor(aState, aLine, aFrame);
// Remember that the line has wrapped
if (!aLineLayout.GetLineEndsInBR()) {
aLine->SetLineWrapped(true);
}
@@ -4286,17 +4286,17 @@ nsBlockFrame::CreateContinuationFor(Bloc
return !!newFrame;
}
nsresult
nsBlockFrame::SplitFloat(BlockReflowInput& aState,
nsIFrame* aFloat,
nsReflowStatus aFloatStatus)
{
- MOZ_ASSERT(!NS_FRAME_IS_FULLY_COMPLETE(aFloatStatus),
+ MOZ_ASSERT(!aFloatStatus.IsFullyComplete(),
"why split the frame if it's fully complete?");
MOZ_ASSERT(aState.mBlock == this);
nsIFrame* nextInFlow = aFloat->GetNextInFlow();
if (nextInFlow) {
nsContainerFrame *oldParent = nextInFlow->GetParent();
DebugOnly<nsresult> rv = oldParent->StealFrame(nextInFlow);
NS_ASSERTION(NS_SUCCEEDED(rv), "StealFrame failed");
@@ -4634,17 +4634,17 @@ nsBlockFrame::PlaceLine(BlockReflowInput
// since the line is empty.
// We already called |ShouldApplyBStartMargin|, and if we applied it
// then mShouldApplyBStartMargin is set.
nscoord dy = aState.mFlags.mShouldApplyBStartMargin
? -aState.mPrevBEndMargin.get() : 0;
newBCoord = aState.mBCoord + dy;
}
- if (!NS_FRAME_IS_FULLY_COMPLETE(aState.mReflowStatus) &&
+ if (!aState.mReflowStatus.IsFullyComplete() &&
ShouldAvoidBreakInside(aState.mReflowInput)) {
aLine->AppendFloats(aState.mCurrentLineFloats);
aState.mReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
return true;
}
// See if the line fit (our first line always does).
if (mLines.front() != aLine &&
@@ -6268,17 +6268,17 @@ nsBlockFrame::ReflowFloat(BlockReflowInp
}
brc.ReflowBlock(aAdjustedAvailableSpace, true, margin,
0, isAdjacentWithTop,
nullptr, floatRS,
aReflowStatus, aState);
} while (clearanceFrame);
- if (!NS_FRAME_IS_FULLY_COMPLETE(aReflowStatus) &&
+ if (!aReflowStatus.IsFullyComplete() &&
ShouldAvoidBreakInside(floatRS)) {
aReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
} else if (aReflowStatus.IsIncomplete() &&
(NS_UNCONSTRAINEDSIZE == aAdjustedAvailableSpace.BSize(wm))) {
// An incomplete reflow status means we should split the float
// if the height is constrained (bug 145305).
aReflowStatus = NS_FRAME_COMPLETE;
}
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -331,17 +331,17 @@ nsBlockReflowContext::ReflowBlock(const
}
if (!NS_INLINE_IS_BREAK_BEFORE(aFrameReflowStatus) ||
(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
// 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), unless it is an out of flow frame.
- if (NS_FRAME_IS_FULLY_COMPLETE(aFrameReflowStatus)) {
+ if (aFrameReflowStatus.IsFullyComplete()) {
nsIFrame* kidNextInFlow = mFrame->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).
// Floats will eventually be removed via nsBlockFrame::RemoveFloat
// which detaches the placeholder from the float.
nsOverflowContinuationTracker::AutoFinish fini(aState.mOverflowTracker, mFrame);
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -710,17 +710,17 @@ nsCanvasFrame::Reflow(nsPresContext*
// Reflow the frame
ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowInput,
kidWM, kidPt, containerSize, 0, aStatus);
// Complete the reflow and position and size the child frame
FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, &kidReflowInput,
kidWM, kidPt, containerSize, 0);
- if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
+ if (!aStatus.IsFullyComplete()) {
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
NS_ASSERTION(nextFrame || aStatus & NS_FRAME_REFLOW_NEXTINFLOW,
"If it's incomplete and has no nif yet, it must flag a nif reflow.");
if (!nextFrame) {
nextFrame = aPresContext->PresShell()->FrameConstructor()->
CreateContinuingFrame(aPresContext, kidFrame, this);
SetOverflowFrames(nsFrameList(nextFrame, nextFrame));
// Root overflow containers will be normal children of
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -678,17 +678,17 @@ nsColumnSetFrame::ReflowChildren(ReflowO
ConsiderChildOverflow(overflowRects, child);
contentBEnd = std::max(contentBEnd, childContentBEnd);
aColData.mLastBSize = childContentBEnd;
aColData.mSumBSize += childContentBEnd;
// Build a continuation column if necessary
nsIFrame* kidNextInFlow = child->GetNextInFlow();
- if (NS_FRAME_IS_FULLY_COMPLETE(aStatus) && !NS_FRAME_IS_TRUNCATED(aStatus)) {
+ if (aStatus.IsFullyComplete() && !NS_FRAME_IS_TRUNCATED(aStatus)) {
NS_ASSERTION(!kidNextInFlow, "next in flow should have been deleted");
child = nullptr;
break;
} else {
++columnCount;
// Make sure that the column has a next-in-flow. If not, we must
// create one to hold the overflowing stuff, even if we're just
// going to put it on our overflow list and let *our*
@@ -823,20 +823,20 @@ nsColumnSetFrame::ReflowChildren(ReflowO
// Get the logical position as set previously using a provisional or
// dummy containerSize, and reset with the correct container size.
child->SetPosition(wm, child->GetLogicalPosition(wm, containerSize),
finalContainerSize);
}
}
#ifdef DEBUG_roc
- printf("*** DONE PASS feasible=%d\n", allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
+ printf("*** DONE PASS feasible=%d\n", allFit && aStatus.IsFullyComplete()
&& !NS_FRAME_IS_TRUNCATED(aStatus));
#endif
- return allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
+ return allFit && aStatus.IsFullyComplete()
&& !NS_FRAME_IS_TRUNCATED(aStatus);
}
void
nsColumnSetFrame::DrainOverflowColumns()
{
// First grab the prev-in-flows overflows and reparent them to this
// frame.
@@ -1097,17 +1097,17 @@ nsColumnSetFrame::Reflow(nsPresContext*
if (aPresContext->HasPendingInterrupt() &&
aReflowInput.AvailableBSize() == NS_UNCONSTRAINEDSIZE) {
// In this situation, we might be lying about our reflow status, because
// our last kid (the one that got interrupted) was incomplete. Fix that.
aStatus = NS_FRAME_COMPLETE;
}
- NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
+ NS_ASSERTION(aStatus.IsFullyComplete() ||
aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE,
"Column set should be complete if the available block-size is unconstrained");
// Merge overflow container bounds and status.
aDesiredSize.mOverflowAreas.UnionWith(ocBounds);
NS_MergeReflowStatusInto(&aStatus, ocStatus);
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize, aReflowInput, aStatus, false);
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1025,17 +1025,17 @@ nsContainerFrame::ReflowChild(nsIFrame*
}
// Reflow the child frame
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowInput, aStatus);
// If the child frame is complete, delete any next-in-flows,
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
- NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+ aStatus.IsFullyComplete() &&
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
if (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)
nsOverflowContinuationTracker::AutoFinish fini(aTracker, aKidFrame);
kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
@@ -1068,17 +1068,17 @@ nsContainerFrame::ReflowChild(nsIFrame*
PositionChildViews(aKidFrame);
}
// Reflow the child frame
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowInput, aStatus);
// If the child frame is complete, delete any next-in-flows,
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
- if (NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+ if (aStatus.IsFullyComplete() &&
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
if (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)
nsOverflowContinuationTracker::AutoFinish fini(aTracker, aKidFrame);
kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
@@ -1275,17 +1275,17 @@ nsContainerFrame::ReflowOverflowContaine
ReflowChild(frame, aPresContext, desiredSize, frameState,
wm, pos, containerSize, aFlags, frameStatus, &tracker);
//XXXfr Do we need to override any shrinkwrap effects here?
// e.g. desiredSize.Width() = prevRect.width;
FinishReflowChild(frame, aPresContext, desiredSize, &frameState,
wm, pos, containerSize, aFlags);
// Handle continuations
- if (!NS_FRAME_IS_FULLY_COMPLETE(frameStatus)) {
+ 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),
"overflow container frames can't be incomplete, only overflow-incomplete");
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -11220,17 +11220,17 @@ void nsFrame::DisplayReflowExit(nsPresCo
char width[16];
char height[16];
char x[16];
char y[16];
DR_state->PrettyUC(aMetrics.Width(), width, 16);
DR_state->PrettyUC(aMetrics.Height(), height, 16);
printf("Reflow d=%s,%s", width, height);
- if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
+ if (!aStatus.IsFullyComplete()) {
printf(" status=0x%x", aStatus);
}
if (aFrame->HasOverflowAreas()) {
DR_state->PrettyUC(aMetrics.VisualOverflow().x, x, 16);
DR_state->PrettyUC(aMetrics.VisualOverflow().y, y, 16);
DR_state->PrettyUC(aMetrics.VisualOverflow().width, width, 16);
DR_state->PrettyUC(aMetrics.VisualOverflow().height, height, 16);
printf(" vis-o=(%s,%s) %s x %s", x, y, width, height);
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -5621,17 +5621,17 @@ nsGridContainerFrame::ReflowRowsInFragme
nscoord bSize =
aState.mRows.GridLineEdge(std::min(aEndRow, info->mArea.mRows.mEnd),
GridLineSide::eBeforeGridGap) -
aState.mRows.GridLineEdge(std::max(aStartRow, row),
GridLineSide::eAfterGridGap);
ReflowInFlowChild(child, info, aContainerSize, Some(bSize), &aFragmentainer,
aState, aContentArea, aDesiredSize, childStatus);
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(childStatus) ||
- !NS_FRAME_IS_FULLY_COMPLETE(childStatus) ||
+ !childStatus.IsFullyComplete() ||
!child->GetNextInFlow(),
"fully-complete reflow should destroy any NIFs");
if (NS_INLINE_IS_BREAK_BEFORE(childStatus)) {
MOZ_ASSERT(!child->GetPrevInFlow(),
"continuations should never report BREAK_BEFORE status");
MOZ_ASSERT(!aFragmentainer.mIsTopOfPage,
"got NS_INLINE_IS_BREAK_BEFORE at top of page");
@@ -5680,17 +5680,17 @@ nsGridContainerFrame::ReflowRowsInFragme
NS_FRAME_SET_INCOMPLETE(childStatus);
}
} else if (NS_INLINE_IS_BREAK_AFTER(childStatus)) {
MOZ_ASSERT_UNREACHABLE("unexpected child reflow status");
}
if (childStatus.IsIncomplete()) {
incompleteItems.PutEntry(child);
- } else if (!NS_FRAME_IS_FULLY_COMPLETE(childStatus)) {
+ } else if (!childStatus.IsFullyComplete()) {
overflowIncompleteItems.PutEntry(child);
}
}
// Record a break before |aEndRow|.
aState.mNextFragmentStartRow = aEndRow;
if (aEndRow < aState.mRows.mSizes.Length()) {
aState.mRows.BreakBeforeRow(aEndRow);
@@ -6410,17 +6410,17 @@ nsGridContainerFrame::Reflow(nsPresConte
Properties().Set(ExplicitNamedAreasProperty(), areas);
} else {
Properties().Delete(ExplicitNamedAreasProperty());
}
}
if (!prevInFlow) {
SharedGridData* sharedGridData = Properties().Get(SharedGridData::Prop());
- if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
+ if (!aStatus.IsFullyComplete()) {
if (!sharedGridData) {
sharedGridData = new SharedGridData;
Properties().Set(SharedGridData::Prop(), sharedGridData);
}
sharedGridData->mCols.mSizes.Clear();
sharedGridData->mCols.mSizes.SwapElements(gridReflowInput.mCols.mSizes);
sharedGridData->mCols.mContentBoxSize = gridReflowInput.mCols.mContentBoxSize;
sharedGridData->mCols.mBaselineSubtreeAlign[0] =
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -304,19 +304,16 @@ private:
#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))
-#define NS_FRAME_IS_FULLY_COMPLETE(status) \
- (NS_FRAME_IS_COMPLETE(status) && !NS_FRAME_OVERFLOW_IS_INCOMPLETE(status))
-
// 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
#define NS_FRAME_SET_OVERFLOW_INCOMPLETE(status) \
status = (status & ~NS_FRAME_NOT_COMPLETE) | NS_FRAME_OVERFLOW_INCOMPLETE
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -817,17 +817,17 @@ nsInlineFrame::ReflowInlineFrame(nsPresC
else {
// Preserve reflow status when breaking-before our first child
// and propagate it upward without modification.
}
return;
}
// Create a next-in-flow if needed.
- if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
+ if (!aStatus.IsFullyComplete()) {
CreateNextInFlow(aFrame);
}
if (NS_INLINE_IS_BREAK_AFTER(aStatus)) {
nsIFrame* nextFrame = aFrame->GetNextSibling();
if (nextFrame) {
NS_FRAME_SET_INCOMPLETE(aStatus);
PushFrames(aPresContext, nextFrame, aFrame, irs);
@@ -842,17 +842,17 @@ nsInlineFrame::ReflowInlineFrame(nsPresC
break;
}
nextInFlow = static_cast<nsInlineFrame*>(nextInFlow->GetNextInFlow());
}
}
return;
}
- if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus) && !reflowingFirstLetter) {
+ if (!aStatus.IsFullyComplete() && !reflowingFirstLetter) {
nsIFrame* nextFrame = aFrame->GetNextSibling();
if (nextFrame) {
PushFrames(aPresContext, nextFrame, aFrame, irs);
}
}
}
nsIFrame*
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -83,17 +83,17 @@ nsPageContentFrame::Reflow(nsPresContext
NS_ASSERTION(ratio >= 0.0 && ratio < 1.0, "invalid shrink-to-fit ratio");
mPD->mShrinkToFitRatio = std::min(mPD->mShrinkToFitRatio, ratio);
}
}
// Place and size the child
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, 0, 0, 0);
- NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
+ 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");
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -141,17 +141,17 @@ nsPageFrame::Reflow(nsPresContext*
nscoord yc = mPageContentMargin.top;
// Get the child's desired size
ReflowChild(frame, aPresContext, aDesiredSize, kidReflowInput, xc, yc, 0, aStatus);
// Place and size the child
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, xc, yc, 0);
- NS_ASSERTION(!NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
+ NS_ASSERTION(!aStatus.IsFullyComplete() ||
!frame->GetNextInFlow(), "bad child flow list");
}
PR_PL(("PageFrame::Reflow %p ", this));
PR_PL(("[%d,%d][%d,%d]\n", aDesiredSize.Width(), aDesiredSize.Height(),
aReflowInput.AvailableWidth(), aReflowInput.AvailableHeight()));
// Return our desired size
WritingMode wm = aReflowInput.GetWritingMode();
--- a/layout/generic/nsSimplePageSequenceFrame.cpp
+++ b/layout/generic/nsSimplePageSequenceFrame.cpp
@@ -278,17 +278,17 @@ nsSimplePageSequenceFrame::Reflow(nsPres
y += kidSize.Height();
y += pageCSSMargin.bottom;
maxXMost = std::max(maxXMost, x + kidSize.Width() + pageCSSMargin.right);
// Is the page complete?
nsIFrame* kidNextInFlow = kidFrame->GetNextInFlow();
- if (NS_FRAME_IS_FULLY_COMPLETE(status)) {
+ if (status.IsFullyComplete()) {
NS_ASSERTION(!kidNextInFlow, "bad child flow list");
} else if (!kidNextInFlow) {
// The page isn't complete and it doesn't have a next-in-flow, so
// create a continuing page.
nsIFrame* continuingPage = aPresContext->PresShell()->FrameConstructor()->
CreateContinuingFrame(aPresContext, kidFrame, this);
// Add it to our child list
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -3158,17 +3158,17 @@ nsTableFrame::ReflowChildren(TableReflow
// reorder row groups the reflow may have changed the nextinflows
OrderRowGroups(rowGroups, &thead, &tfoot);
childX = rowGroups.IndexOf(kidFrame);
if (childX == RowGroupArray::NoIndex) {
// XXXbz can this happen?
childX = rowGroups.Length();
}
}
- if (isPaginated && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+ if (isPaginated && !aStatus.IsFullyComplete() &&
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) ||
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -1113,17 +1113,17 @@ nsTableRowFrame::Reflow(nsPresContext*
// see if a special bsize reflow needs to occur due to having a pct bsize
nsTableFrame::CheckRequestSpecialBSizeReflow(aReflowInput);
// See if we have a cell with specified/pct bsize
InitHasCellWithStyleBSize(tableFrame);
ReflowChildren(aPresContext, aDesiredSize, aReflowInput, *tableFrame, aStatus);
- if (aPresContext->IsPaginated() && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+ if (aPresContext->IsPaginated() && !aStatus.IsFullyComplete() &&
ShouldAvoidBreakInside(aReflowInput)) {
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
}
// Just set our isize to what was available.
// The table will calculate the isize and not use our value.
aDesiredSize.ISize(wm) = aReflowInput.AvailableISize();
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -1169,17 +1169,17 @@ nsTableRowGroupFrame::SplitRowGroup(nsPr
// Reflow the cell with the constrained height. A cell with rowspan >1 will get this
// reflow later during SplitSpanningCells.
ReflowChild(rowFrame, aPresContext, rowMetrics, rowReflowInput,
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
rowFrame->SetSize(nsSize(rowMetrics.Width(), rowMetrics.Height()));
rowFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
rowFrame->DidResize();
- if (!aRowForcedPageBreak && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+ if (!aRowForcedPageBreak && !aStatus.IsFullyComplete() &&
ShouldAvoidBreakInside(aReflowInput)) {
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
break;
}
nsTableFrame::InvalidateTableFrame(rowFrame, oldRowRect,
oldRowVisualOverflow,
false);