From b99fe92e31350db192499bf5e2fb10c85d5e8337 Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Tue, 23 Mar 1999 20:35:38 +0000 Subject: [PATCH] Backed out my previous changes because of performance degradation in deeply nested tables. Will increase the stack size in Mac applications instead. git-svn-id: svn://10.0.0.236/trunk@24869 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 10 +++------- mozilla/layout/generic/nsBlockReflowState.cpp | 10 +++------- mozilla/layout/generic/nsBlockReflowState.h | 10 +++------- mozilla/layout/html/base/src/nsBlockFrame.cpp | 10 +++------- mozilla/layout/html/base/src/nsBlockReflowState.cpp | 10 +++------- mozilla/layout/html/base/src/nsBlockReflowState.h | 10 +++------- 6 files changed, 18 insertions(+), 42 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 72d87d35ed6..210d449f756 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -900,14 +900,11 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - nsLineLayout* lineLayout = new nsLineLayout(aPresContext, aReflowState.spaceManager, + nsLineLayout lineLayout(aPresContext, aReflowState.spaceManager, &aReflowState, nsnull != aMetrics.maxElementSize); - if (! lineLayout) { - return NS_ERROR_OUT_OF_MEMORY; - } nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics, - lineLayout); - lineLayout->Init(&state); + &lineLayout); + lineLayout.Init(&state); if (NS_BLOCK_MARGIN_ROOT & mFlags) { state.mIsMarginRoot = PR_TRUE; } @@ -991,7 +988,6 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext, aMetrics.width, aMetrics.height, aMetrics.mCarriedOutTopMargin, aMetrics.mCarriedOutBottomMargin); #endif - delete lineLayout; return rv; }