зеркало из https://github.com/mozilla/gecko-dev.git
Bug 775624 Part 4 - Remove NS_FRAME_IS_FULLY_COMPLETE. r=dholbert
This patch is written by the help of the following script. function rename() { find layout\ -type f\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -r "s/$1/$2/g" "{}" \; } rename "NS_FRAME_IS_FULLY_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsFullyComplete()" MozReview-Commit-ID: GOd4y2N6dcz --HG-- extra : rebase_source : 200639e836cebe26fd77cde21f478fd027e1725f
This commit is contained in:
Родитель
b31150930a
Коммит
99ebdf6cf3
|
@ -898,7 +898,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||||
mButtonFrame->SetRect(buttonRect, containerSize);
|
mButtonFrame->SetRect(buttonRect, containerSize);
|
||||||
|
|
||||||
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
|
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
|
// This frame didn't fit inside a fragmentation container. Splitting
|
||||||
// a nsComboboxControlFrame makes no sense, so we override the status here.
|
// a nsComboboxControlFrame makes no sense, so we override the status here.
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
|
|
@ -235,7 +235,7 @@ nsDateTimeControlFrame::Reflow(nsPresContext* aPresContext,
|
||||||
ReflowChild(inputAreaFrame, aPresContext, childDesiredSize,
|
ReflowChild(inputAreaFrame, aPresContext, childDesiredSize,
|
||||||
childReflowOuput, myWM, childOffset, dummyContainerSize, 0,
|
childReflowOuput, myWM, childOffset, dummyContainerSize, 0,
|
||||||
childStatus);
|
childStatus);
|
||||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
|
MOZ_ASSERT(childStatus.IsFullyComplete(),
|
||||||
"We gave our child unconstrained available block-size, "
|
"We gave our child unconstrained available block-size, "
|
||||||
"so it should be complete");
|
"so it should be complete");
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||||
ReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
|
ReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
|
||||||
wrapperReflowInput, myWM, wrapperOffset, dummyContainerSize, 0,
|
wrapperReflowInput, myWM, wrapperOffset, dummyContainerSize, 0,
|
||||||
childStatus);
|
childStatus);
|
||||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
|
MOZ_ASSERT(childStatus.IsFullyComplete(),
|
||||||
"We gave our child unconstrained available block-size, "
|
"We gave our child unconstrained available block-size, "
|
||||||
"so it should be complete");
|
"so it should be complete");
|
||||||
|
|
||||||
|
|
|
@ -418,7 +418,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||||
ReflowOutput trackDesiredSize(aReflowInput);
|
ReflowOutput trackDesiredSize(aReflowInput);
|
||||||
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||||
trackReflowInput, trackX, trackY, 0, frameStatus);
|
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");
|
"We gave our child unconstrained height, so it should be complete");
|
||||||
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||||
&trackReflowInput, trackX, trackY, 0);
|
&trackReflowInput, trackX, trackY, 0);
|
||||||
|
@ -440,7 +440,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||||
ReflowOutput thumbDesiredSize(aReflowInput);
|
ReflowOutput thumbDesiredSize(aReflowInput);
|
||||||
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||||
thumbReflowInput, 0, 0, 0, frameStatus);
|
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");
|
"We gave our child unconstrained height, so it should be complete");
|
||||||
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||||
&thumbReflowInput, 0, 0, 0);
|
&thumbReflowInput, 0, 0, 0);
|
||||||
|
@ -466,7 +466,7 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||||
ReflowChild(rangeProgressFrame, aPresContext,
|
ReflowChild(rangeProgressFrame, aPresContext,
|
||||||
progressDesiredSize, progressReflowInput, 0, 0,
|
progressDesiredSize, progressReflowInput, 0, 0,
|
||||||
0, frameStatus);
|
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");
|
"We gave our child unconstrained height, so it should be complete");
|
||||||
FinishReflowChild(rangeProgressFrame, aPresContext,
|
FinishReflowChild(rangeProgressFrame, aPresContext,
|
||||||
progressDesiredSize, &progressReflowInput, 0, 0, 0);
|
progressDesiredSize, &progressReflowInput, 0, 0, 0);
|
||||||
|
|
|
@ -941,7 +941,7 @@ BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||||
!mustPlaceFloat &&
|
!mustPlaceFloat &&
|
||||||
(!mReflowInput.mFlags.mIsTopOfPage || floatPos.B(wm) > 0) &&
|
(!mReflowInput.mFlags.mIsTopOfPage || floatPos.B(wm) > 0) &&
|
||||||
NS_STYLE_PAGE_BREAK_AVOID == aFloat->StyleDisplay()->mBreakInside &&
|
NS_STYLE_PAGE_BREAK_AVOID == aFloat->StyleDisplay()->mBreakInside &&
|
||||||
(!NS_FRAME_IS_FULLY_COMPLETE(reflowStatus) ||
|
(!reflowStatus.IsFullyComplete() ||
|
||||||
aFloat->BSize(wm) + floatMargin.BStartEnd(wm) >
|
aFloat->BSize(wm) + floatMargin.BStartEnd(wm) >
|
||||||
ContentBEnd() - floatPos.B(wm)) &&
|
ContentBEnd() - floatPos.B(wm)) &&
|
||||||
!aFloat->GetPrevInFlow()) {
|
!aFloat->GetPrevInFlow()) {
|
||||||
|
@ -1002,7 +1002,7 @@ BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||||
FloatManager()->IncludeInDamage(blockStart, blockEnd);
|
FloatManager()->IncludeInDamage(blockStart, blockEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(reflowStatus)) {
|
if (!reflowStatus.IsFullyComplete()) {
|
||||||
mBlock->SplitFloat(*this, aFloat, reflowStatus);
|
mBlock->SplitFloat(*this, aFloat, reflowStatus);
|
||||||
} else {
|
} else {
|
||||||
MOZ_ASSERT(!aFloat->GetNextInFlow());
|
MOZ_ASSERT(!aFloat->GetNextInFlow());
|
||||||
|
|
|
@ -138,7 +138,7 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame,
|
||||||
ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowInput, cb,
|
ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowInput, cb,
|
||||||
aFlags, kidFrame, kidStatus, aOverflowAreas);
|
aFlags, kidFrame, kidStatus, aOverflowAreas);
|
||||||
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus) &&
|
if (!kidStatus.IsFullyComplete() &&
|
||||||
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
|
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
|
||||||
// Need a continuation
|
// Need a continuation
|
||||||
if (!nextFrame) {
|
if (!nextFrame) {
|
||||||
|
|
|
@ -1238,8 +1238,8 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
// If we have a next-in-flow, and that next-in-flow has pushed floats from
|
// 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
|
// 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,
|
// a status with IsFullyComplete() equals to true, since we actually have
|
||||||
// it's just already been handled.
|
// overflow, it's just already been handled.
|
||||||
|
|
||||||
// NOTE: This really shouldn't happen, since we _should_ pull back our floats
|
// 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
|
// and reflow them, but just in case it does, this is a safety precaution so
|
||||||
|
@ -1247,7 +1247,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// been deleted as part of removing our next-in-flow.
|
// been deleted as part of removing our next-in-flow.
|
||||||
// XXXmats maybe this code isn't needed anymore?
|
// XXXmats maybe this code isn't needed anymore?
|
||||||
// XXXmats (layout/generic/crashtests/600100.xhtml doesn't crash without it)
|
// 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());
|
nsBlockFrame* nif = static_cast<nsBlockFrame*>(GetNextInFlow());
|
||||||
while (nif) {
|
while (nif) {
|
||||||
if (nif->HasPushedFloatsFromPrevContinuation()) {
|
if (nif->HasPushedFloatsFromPrevContinuation()) {
|
||||||
|
@ -1272,7 +1272,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||||
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
|
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(state.mReflowStatus)) {
|
if (!state.mReflowStatus.IsFullyComplete()) {
|
||||||
if (HasOverflowLines() || HasPushedFloats()) {
|
if (HasOverflowLines() || HasPushedFloats()) {
|
||||||
state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||||
}
|
}
|
||||||
|
@ -3604,7 +3604,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
||||||
collapsedBEndMargin,
|
collapsedBEndMargin,
|
||||||
overflowAreas,
|
overflowAreas,
|
||||||
frameReflowStatus);
|
frameReflowStatus);
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus) &&
|
if (!frameReflowStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(aState.mReflowInput)) {
|
ShouldAvoidBreakInside(aState.mReflowInput)) {
|
||||||
*aKeepReflowGoing = false;
|
*aKeepReflowGoing = false;
|
||||||
}
|
}
|
||||||
|
@ -3628,7 +3628,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
||||||
|
|
||||||
// Continue the block frame now if it didn't completely fit in
|
// Continue the block frame now if it didn't completely fit in
|
||||||
// the available space.
|
// the available space.
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus)) {
|
if (!frameReflowStatus.IsFullyComplete()) {
|
||||||
bool madeContinuation =
|
bool madeContinuation =
|
||||||
CreateContinuationFor(aState, nullptr, frame);
|
CreateContinuationFor(aState, nullptr, frame);
|
||||||
|
|
||||||
|
@ -4240,7 +4240,7 @@ nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus)) {
|
if (!frameReflowStatus.IsFullyComplete()) {
|
||||||
// Create a continuation for the incomplete frame. Note that the
|
// Create a continuation for the incomplete frame. Note that the
|
||||||
// frame may already have a continuation.
|
// frame may already have a continuation.
|
||||||
CreateContinuationFor(aState, aLine, aFrame);
|
CreateContinuationFor(aState, aLine, aFrame);
|
||||||
|
@ -4291,7 +4291,7 @@ nsBlockFrame::SplitFloat(BlockReflowInput& aState,
|
||||||
nsIFrame* aFloat,
|
nsIFrame* aFloat,
|
||||||
nsReflowStatus aFloatStatus)
|
nsReflowStatus aFloatStatus)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!NS_FRAME_IS_FULLY_COMPLETE(aFloatStatus),
|
MOZ_ASSERT(!aFloatStatus.IsFullyComplete(),
|
||||||
"why split the frame if it's fully complete?");
|
"why split the frame if it's fully complete?");
|
||||||
MOZ_ASSERT(aState.mBlock == this);
|
MOZ_ASSERT(aState.mBlock == this);
|
||||||
|
|
||||||
|
@ -4639,7 +4639,7 @@ nsBlockFrame::PlaceLine(BlockReflowInput& aState,
|
||||||
newBCoord = aState.mBCoord + dy;
|
newBCoord = aState.mBCoord + dy;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aState.mReflowStatus) &&
|
if (!aState.mReflowStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(aState.mReflowInput)) {
|
ShouldAvoidBreakInside(aState.mReflowInput)) {
|
||||||
aLine->AppendFloats(aState.mCurrentLineFloats);
|
aLine->AppendFloats(aState.mCurrentLineFloats);
|
||||||
aState.mReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
aState.mReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
||||||
|
@ -6273,7 +6273,7 @@ nsBlockFrame::ReflowFloat(BlockReflowInput& aState,
|
||||||
aReflowStatus, aState);
|
aReflowStatus, aState);
|
||||||
} while (clearanceFrame);
|
} while (clearanceFrame);
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aReflowStatus) &&
|
if (!aReflowStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(floatRS)) {
|
ShouldAvoidBreakInside(floatRS)) {
|
||||||
aReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
aReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
||||||
} else if (aReflowStatus.IsIncomplete() &&
|
} else if (aReflowStatus.IsIncomplete() &&
|
||||||
|
|
|
@ -336,7 +336,7 @@ nsBlockReflowContext::ReflowBlock(const LogicalRect& aSpace,
|
||||||
// them now. Do not do this when a break-before is signaled because
|
// 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
|
// 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.
|
// 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();
|
nsIFrame* kidNextInFlow = mFrame->GetNextInFlow();
|
||||||
if (nullptr != kidNextInFlow) {
|
if (nullptr != kidNextInFlow) {
|
||||||
// Remove all of the childs next-in-flows. Make sure that we ask
|
// Remove all of the childs next-in-flows. Make sure that we ask
|
||||||
|
|
|
@ -715,7 +715,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||||
FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, &kidReflowInput,
|
FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, &kidReflowInput,
|
||||||
kidWM, kidPt, containerSize, 0);
|
kidWM, kidPt, containerSize, 0);
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
|
if (!aStatus.IsFullyComplete()) {
|
||||||
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
||||||
NS_ASSERTION(nextFrame || aStatus & NS_FRAME_REFLOW_NEXTINFLOW,
|
NS_ASSERTION(nextFrame || aStatus & NS_FRAME_REFLOW_NEXTINFLOW,
|
||||||
"If it's incomplete and has no nif yet, it must flag a nif reflow.");
|
"If it's incomplete and has no nif yet, it must flag a nif reflow.");
|
||||||
|
|
|
@ -683,7 +683,7 @@ nsColumnSetFrame::ReflowChildren(ReflowOutput& aDesiredSize,
|
||||||
// Build a continuation column if necessary
|
// Build a continuation column if necessary
|
||||||
nsIFrame* kidNextInFlow = child->GetNextInFlow();
|
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");
|
NS_ASSERTION(!kidNextInFlow, "next in flow should have been deleted");
|
||||||
child = nullptr;
|
child = nullptr;
|
||||||
break;
|
break;
|
||||||
|
@ -828,10 +828,10 @@ nsColumnSetFrame::ReflowChildren(ReflowOutput& aDesiredSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_roc
|
#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));
|
&& !NS_FRAME_IS_TRUNCATED(aStatus));
|
||||||
#endif
|
#endif
|
||||||
return allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
|
return allFit && aStatus.IsFullyComplete()
|
||||||
&& !NS_FRAME_IS_TRUNCATED(aStatus);
|
&& !NS_FRAME_IS_TRUNCATED(aStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1102,7 +1102,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
|
NS_ASSERTION(aStatus.IsFullyComplete() ||
|
||||||
aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE,
|
aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE,
|
||||||
"Column set should be complete if the available block-size is unconstrained");
|
"Column set should be complete if the available block-size is unconstrained");
|
||||||
|
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||||
// If the child frame is complete, delete any next-in-flows,
|
// If the child frame is complete, delete any next-in-flows,
|
||||||
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
|
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
|
||||||
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
|
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
|
||||||
NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
aStatus.IsFullyComplete() &&
|
||||||
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
|
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
|
||||||
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
|
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
|
||||||
if (kidNextInFlow) {
|
if (kidNextInFlow) {
|
||||||
|
@ -1073,7 +1073,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||||
|
|
||||||
// If the child frame is complete, delete any next-in-flows,
|
// If the child frame is complete, delete any next-in-flows,
|
||||||
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
|
// 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)) {
|
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
|
||||||
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
|
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
|
||||||
if (kidNextInFlow) {
|
if (kidNextInFlow) {
|
||||||
|
@ -1280,7 +1280,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
|
||||||
wm, pos, containerSize, aFlags);
|
wm, pos, containerSize, aFlags);
|
||||||
|
|
||||||
// Handle continuations
|
// Handle continuations
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(frameStatus)) {
|
if (!frameStatus.IsFullyComplete()) {
|
||||||
if (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
|
if (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
|
||||||
// Abspos frames can't cause their parent to be incomplete,
|
// Abspos frames can't cause their parent to be incomplete,
|
||||||
// only overflow incomplete.
|
// only overflow incomplete.
|
||||||
|
|
|
@ -11225,7 +11225,7 @@ void nsFrame::DisplayReflowExit(nsPresContext* aPresContext,
|
||||||
DR_state->PrettyUC(aMetrics.Height(), height, 16);
|
DR_state->PrettyUC(aMetrics.Height(), height, 16);
|
||||||
printf("Reflow d=%s,%s", width, height);
|
printf("Reflow d=%s,%s", width, height);
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
|
if (!aStatus.IsFullyComplete()) {
|
||||||
printf(" status=0x%x", aStatus);
|
printf(" status=0x%x", aStatus);
|
||||||
}
|
}
|
||||||
if (aFrame->HasOverflowAreas()) {
|
if (aFrame->HasOverflowAreas()) {
|
||||||
|
|
|
@ -5626,7 +5626,7 @@ nsGridContainerFrame::ReflowRowsInFragmentainer(
|
||||||
ReflowInFlowChild(child, info, aContainerSize, Some(bSize), &aFragmentainer,
|
ReflowInFlowChild(child, info, aContainerSize, Some(bSize), &aFragmentainer,
|
||||||
aState, aContentArea, aDesiredSize, childStatus);
|
aState, aContentArea, aDesiredSize, childStatus);
|
||||||
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(childStatus) ||
|
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(childStatus) ||
|
||||||
!NS_FRAME_IS_FULLY_COMPLETE(childStatus) ||
|
!childStatus.IsFullyComplete() ||
|
||||||
!child->GetNextInFlow(),
|
!child->GetNextInFlow(),
|
||||||
"fully-complete reflow should destroy any NIFs");
|
"fully-complete reflow should destroy any NIFs");
|
||||||
|
|
||||||
|
@ -5685,7 +5685,7 @@ nsGridContainerFrame::ReflowRowsInFragmentainer(
|
||||||
|
|
||||||
if (childStatus.IsIncomplete()) {
|
if (childStatus.IsIncomplete()) {
|
||||||
incompleteItems.PutEntry(child);
|
incompleteItems.PutEntry(child);
|
||||||
} else if (!NS_FRAME_IS_FULLY_COMPLETE(childStatus)) {
|
} else if (!childStatus.IsFullyComplete()) {
|
||||||
overflowIncompleteItems.PutEntry(child);
|
overflowIncompleteItems.PutEntry(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6415,7 +6415,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
if (!prevInFlow) {
|
if (!prevInFlow) {
|
||||||
SharedGridData* sharedGridData = Properties().Get(SharedGridData::Prop());
|
SharedGridData* sharedGridData = Properties().Get(SharedGridData::Prop());
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
|
if (!aStatus.IsFullyComplete()) {
|
||||||
if (!sharedGridData) {
|
if (!sharedGridData) {
|
||||||
sharedGridData = new SharedGridData;
|
sharedGridData = new SharedGridData;
|
||||||
Properties().Set(SharedGridData::Prop(), sharedGridData);
|
Properties().Set(SharedGridData::Prop(), sharedGridData);
|
||||||
|
|
|
@ -309,9 +309,6 @@ private:
|
||||||
#define NS_FRAME_OVERFLOW_IS_INCOMPLETE(status) \
|
#define NS_FRAME_OVERFLOW_IS_INCOMPLETE(status) \
|
||||||
(0 != ((status) & NS_FRAME_OVERFLOW_INCOMPLETE))
|
(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
|
// These macros set or switch incomplete statuses without touching the
|
||||||
// NS_FRAME_REFLOW_NEXTINFLOW bit.
|
// NS_FRAME_REFLOW_NEXTINFLOW bit.
|
||||||
#define NS_FRAME_SET_INCOMPLETE(status) \
|
#define NS_FRAME_SET_INCOMPLETE(status) \
|
||||||
|
|
|
@ -822,7 +822,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a next-in-flow if needed.
|
// Create a next-in-flow if needed.
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
|
if (!aStatus.IsFullyComplete()) {
|
||||||
CreateNextInFlow(aFrame);
|
CreateNextInFlow(aFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -847,7 +847,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus) && !reflowingFirstLetter) {
|
if (!aStatus.IsFullyComplete() && !reflowingFirstLetter) {
|
||||||
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
||||||
if (nextFrame) {
|
if (nextFrame) {
|
||||||
PushFrames(aPresContext, nextFrame, aFrame, irs);
|
PushFrames(aPresContext, nextFrame, aFrame, irs);
|
||||||
|
|
|
@ -88,7 +88,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// Place and size the child
|
// Place and size the child
|
||||||
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, 0, 0, 0);
|
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");
|
!frame->GetNextInFlow(), "bad child flow list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// Place and size the child
|
// Place and size the child
|
||||||
FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, xc, yc, 0);
|
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");
|
!frame->GetNextInFlow(), "bad child flow list");
|
||||||
}
|
}
|
||||||
PR_PL(("PageFrame::Reflow %p ", this));
|
PR_PL(("PageFrame::Reflow %p ", this));
|
||||||
|
|
|
@ -283,7 +283,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// Is the page complete?
|
// Is the page complete?
|
||||||
nsIFrame* kidNextInFlow = kidFrame->GetNextInFlow();
|
nsIFrame* kidNextInFlow = kidFrame->GetNextInFlow();
|
||||||
|
|
||||||
if (NS_FRAME_IS_FULLY_COMPLETE(status)) {
|
if (status.IsFullyComplete()) {
|
||||||
NS_ASSERTION(!kidNextInFlow, "bad child flow list");
|
NS_ASSERTION(!kidNextInFlow, "bad child flow list");
|
||||||
} else if (!kidNextInFlow) {
|
} else if (!kidNextInFlow) {
|
||||||
// The page isn't complete and it doesn't have a next-in-flow, so
|
// The page isn't complete and it doesn't have a next-in-flow, so
|
||||||
|
|
|
@ -3163,7 +3163,7 @@ nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
|
||||||
childX = rowGroups.Length();
|
childX = rowGroups.Length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isPaginated && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
if (isPaginated && !aStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
|
ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
|
||||||
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1118,7 +1118,7 @@ nsTableRowFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
ReflowChildren(aPresContext, aDesiredSize, aReflowInput, *tableFrame, aStatus);
|
ReflowChildren(aPresContext, aDesiredSize, aReflowInput, *tableFrame, aStatus);
|
||||||
|
|
||||||
if (aPresContext->IsPaginated() && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
if (aPresContext->IsPaginated() && !aStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(aReflowInput)) {
|
ShouldAvoidBreakInside(aReflowInput)) {
|
||||||
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1174,7 +1174,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
|
||||||
rowFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
rowFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||||
rowFrame->DidResize();
|
rowFrame->DidResize();
|
||||||
|
|
||||||
if (!aRowForcedPageBreak && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
if (!aRowForcedPageBreak && !aStatus.IsFullyComplete() &&
|
||||||
ShouldAvoidBreakInside(aReflowInput)) {
|
ShouldAvoidBreakInside(aReflowInput)) {
|
||||||
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
aStatus = NS_INLINE_LINE_BREAK_BEFORE();
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче