From 40dbf5063b96f94d3685404bd3a69aa1ce6379ae Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Mon, 9 Nov 1998 17:54:37 +0000 Subject: [PATCH] Disabled some more dubious br/margin code --- layout/generic/nsBlockFrame.cpp | 15 +++++++++++++-- layout/generic/nsBlockReflowState.cpp | 15 +++++++++++++-- layout/generic/nsBlockReflowState.h | 15 +++++++++++++-- layout/html/base/src/nsBlockFrame.cpp | 15 +++++++++++++-- layout/html/base/src/nsBlockReflowState.cpp | 15 +++++++++++++-- layout/html/base/src/nsBlockReflowState.h | 15 +++++++++++++-- 6 files changed, 78 insertions(+), 12 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 58a348bb9525..2074f190b12d 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 58a348bb9525..2074f190b12d 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 58a348bb9525..2074f190b12d 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 58a348bb9525..2074f190b12d 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 58a348bb9525..2074f190b12d 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 58a348bb9525..2074f190b12d 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -56,8 +56,11 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);/* XXX */ #ifdef NS_DEBUG #undef NOISY_FIRST_LINE #undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #else #undef NOISY_FIRST_LINE +#undef REALLY_NOISY_FIRST_LINE +#undef NOISY_MAX_ELEMENT_SIZE #endif #ifdef REALLY_NOISY_FIRST_LINE @@ -2168,6 +2171,11 @@ nsBlockFrame::ComputeFinalSize(nsBlockReflowState& aState, // Store away the final value aMetrics.maxElementSize->width = maxWidth; aMetrics.maxElementSize->height = maxHeight; +#ifdef NOISY_MAX_ELEMENT_SIZE + ListTag(stdout); + printf(": max-element-size:%d,%d desired:%d,%d\n", + maxWidth, maxHeight, aMetrics.width, aMetrics.height); +#endif } // Compute the combined area of our children @@ -2479,7 +2487,7 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) } // Apply any clear-after semantics the line might have - nscoord y0, dy; +//XXX nscoord y0, dy; switch (lastCleanLine->mBreakType) { case NS_STYLE_CLEAR_LEFT: case NS_STYLE_CLEAR_RIGHT: @@ -2487,13 +2495,15 @@ nsBlockFrame::FrameAppendedReflow(nsBlockReflowState& aState) NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("line %p: ClearFloaters: y=%d, break-type=%d\n", lastCleanLine, aState.mY, lastCleanLine->mBreakType)); - y0 = aState.mY; +//XXX y0 = aState.mY; aState.ClearFloaters(lastCleanLine->mBreakType); +#if 0 dy = aState.mY - y0; if (dy > aState.mPrevBottomMargin) { aState.mPrevBottomMargin = dy; aState.mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; } +#endif NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, (" cleared floaters, now y=%d\n", aState.mY)); break; @@ -4598,6 +4608,7 @@ nsBlockReflowState::AddFloater(nsPlaceholderFrame* aPlaceholder) if (0 != mPrevBottomMargin) { mY += mPrevBottomMargin; mPrevMarginFlags |= ALREADY_APPLIED_BOTTOM_MARGIN; + mPrevBottomMargin = 0; } // Because we are in the middle of reflowing a placeholder frame