Fixed to return proper reflow status

This commit is contained in:
kipp 1998-06-05 00:54:03 +00:00
parent c0cb1619ec
commit 6f00af11ec
6 changed files with 60 additions and 30 deletions

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);

View File

@ -478,7 +478,6 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
nsReflowStatus& aStatus)
{
nsIRunaround* reflowRunaround;
nsReflowStatus status;
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
#ifdef NS_DEBUG
@ -565,7 +564,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
// Yes, the child frame wants to interact directly with the space
// manager.
reflowRunaround->Reflow(aPresContext, aSpaceManager, aDesiredSize, aReflowState,
aDesiredRect, status);
aDesiredRect, aStatus);
} else {
// No, use interface nsIFrame instead.
if (aReflowState.maxSize.width != NS_UNCONSTRAINEDSIZE) {
@ -576,7 +575,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
// XXX FIX ME
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, status);
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Return the desired rect
aDesiredRect.x = availBand.x;
@ -585,7 +584,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
aDesiredRect.height = aDesiredSize.height;
}
if (NS_FRAME_IS_COMPLETE(status)) {
if (NS_FRAME_IS_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow;
aKidFrame->GetNextInFlow(kidNextInFlow);
@ -599,7 +598,7 @@ nsBlockFrame::ReflowBlockChild(nsIFrame* aKidFrame,
}
}
return status;
return NS_OK;
}
nsLineData*
@ -1541,6 +1540,12 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
}
}
#ifdef NS_DEBUG
if (0 != mContent->ChildCount()) {
NS_ASSERTION(nsnull != mLines, "reflowed zero children");
}
#endif
// Return our desired rect
ComputeDesiredRect(state, aReflowState.maxSize, aDesiredRect);