зеркало из https://github.com/mozilla/gecko-dev.git
Bug 775624 Part 5 - Remove NS_FRAME_IS_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_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsComplete()" MozReview-Commit-ID: GOd4y2N6dcz --HG-- extra : rebase_source : aa8b11d3a756c9e7c521e6ffd70713af0174bd98
This commit is contained in:
Родитель
99ebdf6cf3
Коммит
f7a393e947
|
@ -257,7 +257,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
||||||
ReflowChild(aFirstKid, aPresContext,
|
ReflowChild(aFirstKid, aPresContext,
|
||||||
contentsDesiredSize, contentsReflowInput,
|
contentsDesiredSize, contentsReflowInput,
|
||||||
wm, childPos, dummyContainerSize, 0, contentsReflowStatus);
|
wm, childPos, dummyContainerSize, 0, contentsReflowStatus);
|
||||||
MOZ_ASSERT(NS_FRAME_IS_COMPLETE(contentsReflowStatus),
|
MOZ_ASSERT(contentsReflowStatus.IsComplete(),
|
||||||
"We gave button-contents frame unconstrained available height, "
|
"We gave button-contents frame unconstrained available height, "
|
||||||
"so it should be complete");
|
"so it should be complete");
|
||||||
|
|
||||||
|
|
|
@ -775,7 +775,7 @@ BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||||
mBlock->ReflowFloat(*this, adjustedAvailableSpace, aFloat, floatMargin,
|
mBlock->ReflowFloat(*this, adjustedAvailableSpace, aFloat, floatMargin,
|
||||||
floatOffsets, false, reflowStatus);
|
floatOffsets, false, reflowStatus);
|
||||||
floatMarginISize = aFloat->ISize(wm) + floatMargin.IStartEnd(wm);
|
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 "
|
"letter frames and orthogonal floats with auto block-size "
|
||||||
"shouldn't break, and if they do now, then they're breaking "
|
"shouldn't break, and if they do now, then they're breaking "
|
||||||
"at the wrong point");
|
"at the wrong point");
|
||||||
|
|
|
@ -1267,7 +1267,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// If we end in a BR with clear and affected floats continue,
|
// If we end in a BR with clear and affected floats continue,
|
||||||
// we need to continue, too.
|
// we need to continue, too.
|
||||||
if (NS_UNCONSTRAINEDSIZE != reflowInput->AvailableBSize() &&
|
if (NS_UNCONSTRAINEDSIZE != reflowInput->AvailableBSize() &&
|
||||||
NS_FRAME_IS_COMPLETE(state.mReflowStatus) &&
|
state.mReflowStatus.IsComplete() &&
|
||||||
state.FloatManager()->ClearContinues(FindTrailingClear())) {
|
state.FloatManager()->ClearContinues(FindTrailingClear())) {
|
||||||
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
|
NS_FRAME_SET_INCOMPLETE(state.mReflowStatus);
|
||||||
}
|
}
|
||||||
|
@ -1472,7 +1472,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||||
IndentBy(stdout, gNoiseIndent);
|
IndentBy(stdout, gNoiseIndent);
|
||||||
ListTag(stdout);
|
ListTag(stdout);
|
||||||
printf(": status=%x (%scomplete) metrics=%d,%d carriedMargin=%d",
|
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.ISize(parentWM), aMetrics.BSize(parentWM),
|
||||||
aMetrics.mCarriedOutBEndMargin.get());
|
aMetrics.mCarriedOutBEndMargin.get());
|
||||||
if (HasOverflowAreas()) {
|
if (HasOverflowAreas()) {
|
||||||
|
@ -1613,7 +1613,7 @@ nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
|
||||||
ComputeFinalBSize(aReflowInput, &aState.mReflowStatus,
|
ComputeFinalBSize(aReflowInput, &aState.mReflowStatus,
|
||||||
aState.mBCoord + nonCarriedOutBDirMargin,
|
aState.mBCoord + nonCarriedOutBDirMargin,
|
||||||
borderPadding, finalSize, aState.mConsumedBSize);
|
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.
|
// Use the current height; continuations will take up the rest.
|
||||||
// Do extend the height to at least consume the available
|
// Do extend the height to at least consume the available
|
||||||
// height, otherwise our left/right borders (for example) won't
|
// height, otherwise our left/right borders (for example) won't
|
||||||
|
@ -1635,7 +1635,7 @@ nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
|
||||||
// Don't carry out a block-end margin when our BSize is fixed.
|
// Don't carry out a block-end margin when our BSize is fixed.
|
||||||
aMetrics.mCarriedOutBEndMargin.Zero();
|
aMetrics.mCarriedOutBEndMargin.Zero();
|
||||||
}
|
}
|
||||||
else if (NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
|
else if (aState.mReflowStatus.IsComplete()) {
|
||||||
nscoord contentBSize = blockEndEdgeOfChildren - borderPadding.BStart(wm);
|
nscoord contentBSize = blockEndEdgeOfChildren - borderPadding.BStart(wm);
|
||||||
nscoord autoBSize = aReflowInput.ApplyMinMaxBSize(contentBSize);
|
nscoord autoBSize = aReflowInput.ApplyMinMaxBSize(contentBSize);
|
||||||
if (autoBSize != contentBSize) {
|
if (autoBSize != contentBSize) {
|
||||||
|
@ -1667,7 +1667,7 @@ nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
|
||||||
}
|
}
|
||||||
} else if (aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE &&
|
} else if (aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE &&
|
||||||
!NS_INLINE_IS_BREAK_BEFORE(aState.mReflowStatus) &&
|
!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.
|
// Currently only used for grid items, but could be used in other contexts.
|
||||||
// The FragStretchBSizeProperty is our expected non-fragmented block-size
|
// The FragStretchBSizeProperty is our expected non-fragmented block-size
|
||||||
// we should stretch to (for align-self:stretch etc). In some fragmentation
|
// we should stretch to (for align-self:stretch etc). In some fragmentation
|
||||||
|
@ -1684,7 +1684,7 @@ nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
|
||||||
|
|
||||||
// Clamp the content size to fit within the margin-box clamp size, if any.
|
// Clamp the content size to fit within the margin-box clamp size, if any.
|
||||||
if (MOZ_UNLIKELY(aReflowInput.mFlags.mBClampMarginBoxMinSize) &&
|
if (MOZ_UNLIKELY(aReflowInput.mFlags.mBClampMarginBoxMinSize) &&
|
||||||
NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
|
aState.mReflowStatus.IsComplete()) {
|
||||||
bool found;
|
bool found;
|
||||||
nscoord cbSize = Properties().Get(BClampMarginBoxMinSizeProperty(), &found);
|
nscoord cbSize = Properties().Get(BClampMarginBoxMinSizeProperty(), &found);
|
||||||
if (found) {
|
if (found) {
|
||||||
|
@ -4228,7 +4228,7 @@ nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aLine->SetBreakTypeAfter(breakType);
|
aLine->SetBreakTypeAfter(breakType);
|
||||||
if (NS_FRAME_IS_COMPLETE(frameReflowStatus)) {
|
if (frameReflowStatus.IsComplete()) {
|
||||||
// Split line, but after the frame just reflowed
|
// Split line, but after the frame just reflowed
|
||||||
SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
|
SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
|
||||||
|
|
||||||
|
@ -7416,7 +7416,7 @@ nsBlockFrame::ComputeFinalBSize(const ReflowInput& aReflowInput,
|
||||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(*aStatus);
|
NS_FRAME_SET_OVERFLOW_INCOMPLETE(*aStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_FRAME_IS_COMPLETE(*aStatus)) {
|
if (aStatus->IsComplete()) {
|
||||||
if (computedBSizeLeftOver > 0 &&
|
if (computedBSizeLeftOver > 0 &&
|
||||||
NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableBSize() &&
|
NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableBSize() &&
|
||||||
aFinalSize.BSize(wm) > aReflowInput.AvailableBSize()) {
|
aFinalSize.BSize(wm) > aReflowInput.AvailableBSize()) {
|
||||||
|
|
|
@ -367,7 +367,7 @@ nsBlockReflowContext::PlaceBlock(const ReflowInput& aReflowInput,
|
||||||
// Compute collapsed block-end margin value.
|
// Compute collapsed block-end margin value.
|
||||||
WritingMode wm = aReflowInput.GetWritingMode();
|
WritingMode wm = aReflowInput.GetWritingMode();
|
||||||
WritingMode parentWM = mMetrics.GetWritingMode();
|
WritingMode parentWM = mMetrics.GetWritingMode();
|
||||||
if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
|
if (aReflowStatus.IsComplete()) {
|
||||||
aBEndMarginResult = mMetrics.mCarriedOutBEndMargin;
|
aBEndMarginResult = mMetrics.mCarriedOutBEndMargin;
|
||||||
aBEndMarginResult.Include(aReflowInput.ComputedLogicalMargin().
|
aBEndMarginResult.Include(aReflowInput.ComputedLogicalMargin().
|
||||||
ConvertTo(parentWM, wm).BEnd(parentWM));
|
ConvertTo(parentWM, wm).BEnd(parentWM));
|
||||||
|
|
|
@ -1287,7 +1287,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
|
||||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(frameStatus);
|
NS_FRAME_SET_OVERFLOW_INCOMPLETE(frameStatus);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NS_ASSERTION(NS_FRAME_IS_COMPLETE(frameStatus),
|
NS_ASSERTION(frameStatus.IsComplete(),
|
||||||
"overflow container frames can't be incomplete, only overflow-incomplete");
|
"overflow container frames can't be incomplete, only overflow-incomplete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||||
if (!NS_INLINE_IS_BREAK_BEFORE(aReflowStatus)) {
|
if (!NS_INLINE_IS_BREAK_BEFORE(aReflowStatus)) {
|
||||||
// Create a continuation or remove existing continuations based on
|
// Create a continuation or remove existing continuations based on
|
||||||
// the reflow completion status.
|
// the reflow completion status.
|
||||||
if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
|
if (aReflowStatus.IsComplete()) {
|
||||||
if (aReflowInput.mLineLayout) {
|
if (aReflowInput.mLineLayout) {
|
||||||
aReflowInput.mLineLayout->SetFirstLetterStyleOK(false);
|
aReflowInput.mLineLayout->SetFirstLetterStyleOK(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1846,7 +1846,7 @@ nsFlexContainerFrame::MeasureAscentAndHeightForFlexItem(
|
||||||
// XXXdholbert Once we do pagination / splitting, we'll need to actually
|
// XXXdholbert Once we do pagination / splitting, we'll need to actually
|
||||||
// handle incomplete childReflowStatuses. But for now, we give our kids
|
// handle incomplete childReflowStatuses. But for now, we give our kids
|
||||||
// unconstrained available height, which means they should always complete.
|
// 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 "
|
"We gave flex item unconstrained available height, so it "
|
||||||
"should be complete");
|
"should be complete");
|
||||||
|
|
||||||
|
@ -4626,7 +4626,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
|
||||||
// NOTE: If we're auto-height, we allow our bottom border/padding to push us
|
// NOTE: If we're auto-height, we allow our bottom border/padding to push us
|
||||||
// over the available height without requesting a continuation, for
|
// over the available height without requesting a continuation, for
|
||||||
// consistency with the behavior of "display:block" elements.
|
// consistency with the behavior of "display:block" elements.
|
||||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (aStatus.IsComplete()) {
|
||||||
nscoord desiredBSizeWithBEndBP =
|
nscoord desiredBSizeWithBEndBP =
|
||||||
desiredSizeInFlexWM.BSize(flexWM) + blockEndContainerBP;
|
desiredSizeInFlexWM.BSize(flexWM) + blockEndContainerBP;
|
||||||
|
|
||||||
|
@ -4780,7 +4780,7 @@ nsFlexContainerFrame::ReflowFlexItem(nsPresContext* aPresContext,
|
||||||
// handle incomplete childReflowStatuses. But for now, we give our kids
|
// handle incomplete childReflowStatuses. But for now, we give our kids
|
||||||
// unconstrained available height, which means they should always
|
// unconstrained available height, which means they should always
|
||||||
// complete.
|
// complete.
|
||||||
MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childReflowStatus),
|
MOZ_ASSERT(childReflowStatus.IsComplete(),
|
||||||
"We gave flex item unconstrained available height, so it "
|
"We gave flex item unconstrained available height, so it "
|
||||||
"should be complete");
|
"should be complete");
|
||||||
|
|
||||||
|
|
|
@ -9946,7 +9946,7 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
|
||||||
|
|
||||||
Reflow(aPresContext, aDesiredSize, reflowInput, status);
|
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();
|
uint32_t layoutFlags = aState.LayoutFlags();
|
||||||
nsContainerFrame::FinishReflowChild(this, aPresContext, aDesiredSize,
|
nsContainerFrame::FinishReflowChild(this, aPresContext, aDesiredSize,
|
||||||
|
|
|
@ -705,7 +705,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
|
||||||
|
|
||||||
ReflowChild(aChild, aPresContext, reflowOutput, reflowInput, aOffset.x,
|
ReflowChild(aChild, aPresContext, reflowOutput, reflowInput, aOffset.x,
|
||||||
aOffset.y, 0, status);
|
aOffset.y, 0, status);
|
||||||
NS_ASSERTION(NS_FRAME_IS_COMPLETE(status), "bad status");
|
NS_ASSERTION(status.IsComplete(), "bad status");
|
||||||
|
|
||||||
// Place and size the child
|
// Place and size the child
|
||||||
reflowOutput.Width() = aSize.width;
|
reflowOutput.Width() = aSize.width;
|
||||||
|
|
|
@ -5287,7 +5287,7 @@ nsGridContainerFrame::ReflowInFlowChild(nsIFrame* aChild,
|
||||||
// Apply align/justify-self and reflow again if that affects the size.
|
// Apply align/justify-self and reflow again if that affects the size.
|
||||||
if (MOZ_LIKELY(isGridItem)) {
|
if (MOZ_LIKELY(isGridItem)) {
|
||||||
LogicalSize size = childSize.Size(childWM); // from the ReflowChild()
|
LogicalSize size = childSize.Size(childWM); // from the ReflowChild()
|
||||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (aStatus.IsComplete()) {
|
||||||
auto align = childRI.mStylePosition->UsedAlignSelf(containerSC);
|
auto align = childRI.mStylePosition->UsedAlignSelf(containerSC);
|
||||||
auto state = aGridItemInfo->mState[eLogicalAxisBlock];
|
auto state = aGridItemInfo->mState[eLogicalAxisBlock];
|
||||||
if (state & ItemState::eContentBaseline) {
|
if (state & ItemState::eContentBaseline) {
|
||||||
|
@ -5348,7 +5348,7 @@ nsGridContainerFrame::ReflowInFragmentainer(GridReflowInput& aState,
|
||||||
nsReflowStatus childStatus;
|
nsReflowStatus childStatus;
|
||||||
ReflowInFlowChild(child, nullptr, aContainerSize, Nothing(), &aFragmentainer,
|
ReflowInFlowChild(child, nullptr, aContainerSize, Nothing(), &aFragmentainer,
|
||||||
aState, aContentArea, aDesiredSize, childStatus);
|
aState, aContentArea, aDesiredSize, childStatus);
|
||||||
MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childStatus),
|
MOZ_ASSERT(childStatus.IsComplete(),
|
||||||
"nsPlaceholderFrame should never need to be fragmented");
|
"nsPlaceholderFrame should never need to be fragmented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5516,7 +5516,7 @@ nsGridContainerFrame::ReflowInFragmentainer(GridReflowInput& aState,
|
||||||
// If we can't fit all rows then we're at least overflow-incomplete.
|
// If we can't fit all rows then we're at least overflow-incomplete.
|
||||||
if (endRow < numRows) {
|
if (endRow < numRows) {
|
||||||
childAvailableSize = bEndRow;
|
childAvailableSize = bEndRow;
|
||||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (aStatus.IsComplete()) {
|
||||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
||||||
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||||
}
|
}
|
||||||
|
@ -5702,7 +5702,7 @@ nsGridContainerFrame::ReflowRowsInFragmentainer(
|
||||||
if (!pushedItems.IsEmpty() ||
|
if (!pushedItems.IsEmpty() ||
|
||||||
!incompleteItems.IsEmpty() ||
|
!incompleteItems.IsEmpty() ||
|
||||||
!overflowIncompleteItems.IsEmpty()) {
|
!overflowIncompleteItems.IsEmpty()) {
|
||||||
if (NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (aStatus.IsComplete()) {
|
||||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
||||||
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||||
}
|
}
|
||||||
|
@ -5853,7 +5853,7 @@ nsGridContainerFrame::ReflowChildren(GridReflowInput& aState,
|
||||||
}
|
}
|
||||||
ReflowInFlowChild(*aState.mIter, info, containerSize, Nothing(), nullptr,
|
ReflowInFlowChild(*aState.mIter, info, containerSize, Nothing(), nullptr,
|
||||||
aState, aContentArea, aDesiredSize, aStatus);
|
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");
|
"in unconstrained reflow");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6157,7 +6157,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
bSize = std::max(bSize - consumedBSize, 0);
|
bSize = std::max(bSize - consumedBSize, 0);
|
||||||
|
|
||||||
// Skip our block-end border if we're INCOMPLETE.
|
// Skip our block-end border if we're INCOMPLETE.
|
||||||
if (!NS_FRAME_IS_COMPLETE(aStatus) &&
|
if (!aStatus.IsComplete() &&
|
||||||
!gridReflowInput.mSkipSides.BEnd() &&
|
!gridReflowInput.mSkipSides.BEnd() &&
|
||||||
StyleBorder()->mBoxDecorationBreak !=
|
StyleBorder()->mBoxDecorationBreak !=
|
||||||
StyleBoxDecorationBreak::Clone) {
|
StyleBoxDecorationBreak::Clone) {
|
||||||
|
@ -6172,7 +6172,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
// Convert INCOMPLETE -> OVERFLOW_INCOMPLETE and zero bsize if we're an OC.
|
// Convert INCOMPLETE -> OVERFLOW_INCOMPLETE and zero bsize if we're an OC.
|
||||||
if (HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER)) {
|
if (HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER)) {
|
||||||
if (!NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (!aStatus.IsComplete()) {
|
||||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aStatus);
|
||||||
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,9 +303,6 @@ private:
|
||||||
#define NS_FRAME_REFLOW_NEXTINFLOW 0x2
|
#define NS_FRAME_REFLOW_NEXTINFLOW 0x2
|
||||||
#define NS_FRAME_OVERFLOW_INCOMPLETE 0x4
|
#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) \
|
#define NS_FRAME_OVERFLOW_IS_INCOMPLETE(status) \
|
||||||
(0 != ((status) & NS_FRAME_OVERFLOW_INCOMPLETE))
|
(0 != ((status) & NS_FRAME_OVERFLOW_INCOMPLETE))
|
||||||
|
|
||||||
|
|
|
@ -734,7 +734,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ASSERTION(!NS_FRAME_IS_COMPLETE(aStatus) || !GetOverflowFrames(),
|
NS_ASSERTION(!aStatus.IsComplete() || !GetOverflowFrames(),
|
||||||
"We can't be complete AND have overflow frames!");
|
"We can't be complete AND have overflow frames!");
|
||||||
|
|
||||||
// If after reflowing our children they take up no area then make
|
// If after reflowing our children they take up no area then make
|
||||||
|
@ -771,7 +771,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||||
* chain. For box-decoration-break:clone we always apply the end border and
|
* chain. For box-decoration-break:clone we always apply the end border and
|
||||||
* padding since all continuations have them.
|
* padding since all continuations have them.
|
||||||
*/
|
*/
|
||||||
if ((NS_FRAME_IS_COMPLETE(aStatus) &&
|
if ((aStatus.IsComplete() &&
|
||||||
!LastInFlow()->GetNextContinuation() &&
|
!LastInFlow()->GetNextContinuation() &&
|
||||||
!FrameIsNonLastInIBSplit()) ||
|
!FrameIsNonLastInIBSplit()) ||
|
||||||
boxDecorationBreakClone) {
|
boxDecorationBreakClone) {
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||||
// 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).
|
// a next-in-flow where it ends up).
|
||||||
if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
|
if (aReflowStatus.IsComplete()) {
|
||||||
nsIFrame* kidNextInFlow = aFrame->GetNextInFlow();
|
nsIFrame* kidNextInFlow = aFrame->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
|
||||||
|
|
|
@ -95,7 +95,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// Reflow our fixed frames
|
// Reflow our fixed frames
|
||||||
nsReflowStatus fixedStatus = NS_FRAME_COMPLETE;
|
nsReflowStatus fixedStatus = NS_FRAME_COMPLETE;
|
||||||
ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowInput, fixedStatus);
|
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
|
// Return our desired size
|
||||||
WritingMode wm = aReflowInput.GetWritingMode();
|
WritingMode wm = aReflowInput.GetWritingMode();
|
||||||
|
|
|
@ -405,9 +405,9 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// If there exists any span, the columns must either be completely
|
// If there exists any span, the columns must either be completely
|
||||||
// reflowed, or be not reflowed at all.
|
// reflowed, or be not reflowed at all.
|
||||||
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
|
MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
|
||||||
NS_FRAME_IS_COMPLETE(aStatus) || !hasSpan);
|
aStatus.IsComplete() || !hasSpan);
|
||||||
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
|
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
|
||||||
NS_FRAME_IS_COMPLETE(aStatus) && hasSpan) {
|
aStatus.IsComplete() && hasSpan) {
|
||||||
// Reflow spans
|
// Reflow spans
|
||||||
RubyReflowInput reflowInput = {
|
RubyReflowInput reflowInput = {
|
||||||
false, false, textContainers, aReflowInput, reflowInputs
|
false, false, textContainers, aReflowInput, reflowInputs
|
||||||
|
@ -528,7 +528,7 @@ nsRubyBaseContainerFrame::ReflowColumns(const RubyReflowInput& aReflowInput,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
aStatus = NS_INLINE_LINE_BREAK_AFTER(aStatus);
|
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
|
// If we are on an intra-level whitespace column, null values in
|
||||||
// column.mBaseFrame and column.mTextFrames don't represent the
|
// column.mBaseFrame and column.mTextFrames don't represent the
|
||||||
|
|
|
@ -171,7 +171,7 @@ nsRubyFrame::Reflow(nsPresContext* aPresContext,
|
||||||
if (boxDecorationBreakClone || !GetPrevContinuation()) {
|
if (boxDecorationBreakClone || !GetPrevContinuation()) {
|
||||||
aDesiredSize.ISize(lineWM) += borderPadding.IStart(frameWM);
|
aDesiredSize.ISize(lineWM) += borderPadding.IStart(frameWM);
|
||||||
}
|
}
|
||||||
if (boxDecorationBreakClone || NS_FRAME_IS_COMPLETE(aStatus)) {
|
if (boxDecorationBreakClone || aStatus.IsComplete()) {
|
||||||
aDesiredSize.ISize(lineWM) += borderPadding.IEnd(frameWM);
|
aDesiredSize.ISize(lineWM) += borderPadding.IEnd(frameWM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -894,7 +894,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
childFrame, availSize);
|
childFrame, availSize);
|
||||||
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
||||||
childReflowInput, childStatus);
|
childReflowInput, childStatus);
|
||||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
|
//NS_ASSERTION(childStatus.IsComplete(), "bad status");
|
||||||
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
||||||
childDesiredSize.mBoundingMetrics);
|
childDesiredSize.mBoundingMetrics);
|
||||||
childFrame = childFrame->GetNextSibling();
|
childFrame = childFrame->GetNextSibling();
|
||||||
|
|
|
@ -144,7 +144,7 @@ nsMathMLTokenFrame::Reflow(nsPresContext* aPresContext,
|
||||||
childFrame, availSize);
|
childFrame, availSize);
|
||||||
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
||||||
childReflowInput, aStatus);
|
childReflowInput, aStatus);
|
||||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
|
//NS_ASSERTION(aStatus.IsComplete(), "bad status");
|
||||||
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
||||||
childDesiredSize.mBoundingMetrics);
|
childDesiredSize.mBoundingMetrics);
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
||||||
childFrame, availSize);
|
childFrame, availSize);
|
||||||
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
ReflowChild(childFrame, aPresContext, childDesiredSize,
|
||||||
childReflowInput, childStatus);
|
childReflowInput, childStatus);
|
||||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
|
//NS_ASSERTION(childStatus.IsComplete(), "bad status");
|
||||||
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
|
||||||
childDesiredSize.mBoundingMetrics);
|
childDesiredSize.mBoundingMetrics);
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ nsMathMLmpaddedFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// Let the base class format our content like an inferred mrow
|
// Let the base class format our content like an inferred mrow
|
||||||
nsMathMLContainerFrame::Reflow(aPresContext, aDesiredSize,
|
nsMathMLContainerFrame::Reflow(aPresContext, aDesiredSize,
|
||||||
aReflowInput, aStatus);
|
aReflowInput, aStatus);
|
||||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
|
//NS_ASSERTION(aStatus.IsComplete(), "bad status");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ nsresult
|
/* virtual */ nsresult
|
||||||
|
|
|
@ -196,7 +196,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||||
childFrame, availSize);
|
childFrame, availSize);
|
||||||
ReflowChild(childFrame, aPresContext,
|
ReflowChild(childFrame, aPresContext,
|
||||||
childDesiredSize, childReflowInput, childStatus);
|
childDesiredSize, childReflowInput, childStatus);
|
||||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");
|
//NS_ASSERTION(childStatus.IsComplete(), "bad status");
|
||||||
if (0 == count) {
|
if (0 == count) {
|
||||||
// base
|
// base
|
||||||
baseFrame = childFrame;
|
baseFrame = childFrame;
|
||||||
|
|
|
@ -1929,7 +1929,7 @@ nsTableFrame::Reflow(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXXldb Are all these conditions correct?
|
// 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?
|
// XXXldb Do we need to set the IsBResize flag on any reflow states?
|
||||||
|
|
||||||
ReflowInput &mutable_rs =
|
ReflowInput &mutable_rs =
|
||||||
|
@ -3172,7 +3172,7 @@ nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
|
||||||
// the next page
|
// the next page
|
||||||
if (isPaginated &&
|
if (isPaginated &&
|
||||||
(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
|
(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
|
||||||
(NS_FRAME_IS_COMPLETE(aStatus) &&
|
(aStatus.IsComplete() &&
|
||||||
(NS_UNCONSTRAINEDSIZE != kidReflowInput.AvailableHeight()) &&
|
(NS_UNCONSTRAINEDSIZE != kidReflowInput.AvailableHeight()) &&
|
||||||
kidReflowInput.AvailableHeight() < desiredSize.Height()))) {
|
kidReflowInput.AvailableHeight() < desiredSize.Height()))) {
|
||||||
if (ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
|
if (ShouldAvoidBreakInside(aReflowInput.reflowInput)) {
|
||||||
|
@ -3233,7 +3233,7 @@ nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
|
||||||
|
|
||||||
pageBreak = false;
|
pageBreak = false;
|
||||||
// see if there is a page break after this row group or before the next one
|
// 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())) {
|
(NS_UNCONSTRAINEDSIZE != kidReflowInput.AvailableHeight())) {
|
||||||
nsIFrame* nextKid =
|
nsIFrame* nextKid =
|
||||||
(childX + 1 < rowGroups.Length()) ? rowGroups[childX + 1] : nullptr;
|
(childX + 1 < rowGroups.Length()) ? rowGroups[childX + 1] : nullptr;
|
||||||
|
|
|
@ -1177,7 +1177,7 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
|
||||||
|
|
||||||
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowInput,
|
ReflowChild(aCellFrame, aPresContext, desiredSize, cellReflowInput,
|
||||||
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
|
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) {
|
if (fullyComplete) {
|
||||||
desiredSize.BSize(wm) = aAvailableBSize;
|
desiredSize.BSize(wm) = aAvailableBSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1028,7 +1028,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
||||||
isTopOfPage, cell,
|
isTopOfPage, cell,
|
||||||
cellAvailBSize, status);
|
cellAvailBSize, status);
|
||||||
aDesiredBSize = std::max(aDesiredBSize, rowPos.y + cellBSize);
|
aDesiredBSize = std::max(aDesiredBSize, rowPos.y + cellBSize);
|
||||||
if (NS_FRAME_IS_COMPLETE(status)) {
|
if (status.IsComplete()) {
|
||||||
if (cellBSize > cellAvailBSize) {
|
if (cellBSize > cellAvailBSize) {
|
||||||
aFirstTruncatedRow = row;
|
aFirstTruncatedRow = row;
|
||||||
if ((row != &aFirstRow) || !aFirstRowIsTopOfPage) {
|
if ((row != &aFirstRow) || !aFirstRowIsTopOfPage) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче