From 368de8a159faea9d9234d51935856a41fa6a2d9c Mon Sep 17 00:00:00 2001 From: kipp Date: Thu, 14 May 1998 00:49:46 +0000 Subject: [PATCH] Fixed up code that wasn't using the nsReflowStatus constants defined in nsIFrame.h git-svn-id: svn://10.0.0.236/trunk@1588 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsInlineFrame.cpp | 14 +++++++------- mozilla/layout/html/base/src/nsInlineFrame.cpp | 14 +++++++------- mozilla/layout/html/base/src/nsTextContent.cpp | 4 ++-- mozilla/layout/html/table/src/nsTableFrame.cpp | 8 ++++---- mozilla/layout/html/table/src/nsTableRowFrame.cpp | 2 +- .../layout/html/table/src/nsTableRowGroupFrame.cpp | 2 +- mozilla/layout/tables/nsTableFrame.cpp | 8 ++++---- mozilla/layout/tables/nsTableRowFrame.cpp | 2 +- mozilla/layout/tables/nsTableRowGroupFrame.cpp | 2 +- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 8791e2329e1..6b68d5e1c92 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -533,7 +533,7 @@ nsReflowStatus nsInlineFrame::ReflowUnmappedChildren(nsIPresContext* aPresContex VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then @@ -904,19 +904,19 @@ nsInlineFrame::IncrementalReflowFrom(nsIPresContext* aPresContext, // Any space left? if (aState.availSize.width <= 0) { // No space left. Don't try to pull-up children - status = 0; + status = NS_FRAME_NOT_COMPLETE; } else { // Try and pull-up some children from a next-in-flow if (!PullUpChildren(aPresContext, aState)) { // We were not able to pull-up all the child frames from our // next-in-flow - status = 0; + status = NS_FRAME_NOT_COMPLETE; } } } } else { // We were unable to reflow all our mapped frames - status = 0; + status = NS_FRAME_NOT_COMPLETE; } return status; @@ -941,19 +941,19 @@ nsInlineFrame::IncrementalReflowAfter(nsIPresContext* aPresContext, // Any space left? if (aState.availSize.width <= 0) { // No space left. Don't try to pull-up children - status = 0; + status = NS_FRAME_NOT_COMPLETE; } else { // Try and pull-up some children from a next-in-flow if (!PullUpChildren(aPresContext, aState)) { // We were not able to pull-up all the child frames from our // next-in-flow - status = 0; + status = NS_FRAME_NOT_COMPLETE; } } } } else { // We were unable to reflow all our mapped frames - status = 0; + status = NS_FRAME_NOT_COMPLETE; } return status; diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index 8791e2329e1..6b68d5e1c92 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -533,7 +533,7 @@ nsReflowStatus nsInlineFrame::ReflowUnmappedChildren(nsIPresContext* aPresContex VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then @@ -904,19 +904,19 @@ nsInlineFrame::IncrementalReflowFrom(nsIPresContext* aPresContext, // Any space left? if (aState.availSize.width <= 0) { // No space left. Don't try to pull-up children - status = 0; + status = NS_FRAME_NOT_COMPLETE; } else { // Try and pull-up some children from a next-in-flow if (!PullUpChildren(aPresContext, aState)) { // We were not able to pull-up all the child frames from our // next-in-flow - status = 0; + status = NS_FRAME_NOT_COMPLETE; } } } } else { // We were unable to reflow all our mapped frames - status = 0; + status = NS_FRAME_NOT_COMPLETE; } return status; @@ -941,19 +941,19 @@ nsInlineFrame::IncrementalReflowAfter(nsIPresContext* aPresContext, // Any space left? if (aState.availSize.width <= 0) { // No space left. Don't try to pull-up children - status = 0; + status = NS_FRAME_NOT_COMPLETE; } else { // Try and pull-up some children from a next-in-flow if (!PullUpChildren(aPresContext, aState)) { // We were not able to pull-up all the child frames from our // next-in-flow - status = 0; + status = NS_FRAME_NOT_COMPLETE; } } } } else { // We were unable to reflow all our mapped frames - status = 0; + status = NS_FRAME_NOT_COMPLETE; } return status; diff --git a/mozilla/layout/html/base/src/nsTextContent.cpp b/mozilla/layout/html/base/src/nsTextContent.cpp index 1ec6a072167..2e77861d2cd 100644 --- a/mozilla/layout/html/base/src/nsTextContent.cpp +++ b/mozilla/layout/html/base/src/nsTextContent.cpp @@ -967,7 +967,7 @@ TextFrame::ReflowNormal(nsIPresContext* aCX, aMaxElementSize->height = fm->GetHeight(); } NS_RELEASE(fm); - return (cp == end) ? NS_FRAME_COMPLETE : 0; + return (cp == end) ? NS_FRAME_COMPLETE : NS_FRAME_NOT_COMPLETE; } nsReflowStatus @@ -1044,7 +1044,7 @@ TextFrame::ReflowPre(nsIPresContext* aCX, aMaxElementSize->height = aDesiredSize.height; } NS_RELEASE(fm); - return (cp == end) ? NS_FRAME_COMPLETE : 0; + return (cp == end) ? NS_FRAME_COMPLETE : NS_FRAME_NOT_COMPLETE; } #define NUM_WORDS 20 diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index ebe022cd365..1af58fe3572 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -764,7 +764,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, if (nsnull != mFirstChild) { reflowMappedOK = ReflowMappedChildren(aPresContext, state, aMaxElementSize); if (PR_FALSE == reflowMappedOK) { - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } @@ -774,7 +774,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, if (state.availSize.height <= 0) { // No space left. Don't try to pull-up children or reflow unmapped if (NextChildOffset() < mContent->ChildCount()) { - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } else if (NextChildOffset() < mContent->ChildCount()) { // Try and pull-up some children from a next-in-flow @@ -786,7 +786,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, } else { // We were unable to pull-up all the existing frames from the // next in flow - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } } @@ -1373,7 +1373,7 @@ nsTableFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 1f7a89a2cfd..fff95e20091 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -760,7 +760,7 @@ nsTableRowFrame::ReflowUnmappedChildren( nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index ce53b5ddf9c..fd37369b329 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -693,7 +693,7 @@ nsTableRowGroupFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index ebe022cd365..1af58fe3572 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -764,7 +764,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, if (nsnull != mFirstChild) { reflowMappedOK = ReflowMappedChildren(aPresContext, state, aMaxElementSize); if (PR_FALSE == reflowMappedOK) { - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } @@ -774,7 +774,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, if (state.availSize.height <= 0) { // No space left. Don't try to pull-up children or reflow unmapped if (NextChildOffset() < mContent->ChildCount()) { - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } else if (NextChildOffset() < mContent->ChildCount()) { // Try and pull-up some children from a next-in-flow @@ -786,7 +786,7 @@ nsReflowStatus nsTableFrame::ResizeReflowPass2(nsIPresContext* aPresContext, } else { // We were unable to pull-up all the existing frames from the // next in flow - status = 0; // not complete + status = NS_FRAME_NOT_COMPLETE; } } } @@ -1373,7 +1373,7 @@ nsTableFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 1f7a89a2cfd..fff95e20091 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -760,7 +760,7 @@ nsTableRowFrame::ReflowUnmappedChildren( nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index ce53b5ddf9c..fd37369b329 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -693,7 +693,7 @@ nsTableRowGroupFrame::ReflowUnmappedChildren(nsIPresContext* aPresContext, VerifyLastIsComplete(); #endif nsIFrame* kidPrevInFlow = nsnull; - nsReflowStatus result = 0; // not complete + nsReflowStatus result = NS_FRAME_NOT_COMPLETE; // If we have no children and we have a prev-in-flow then we need to pick // up where it left off. If we have children, e.g. we're being resized, then