From 6d797d3be307d3bb04c53ef9f045653e98d9c351 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 27 Aug 1999 21:49:12 +0000 Subject: [PATCH] Shrink down size of nsLineLayout object git-svn-id: svn://10.0.0.236/trunk@44927 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsLineLayout.h | 19 +++++-------------- mozilla/layout/html/base/src/nsLineLayout.h | 19 +++++-------------- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/mozilla/layout/generic/nsLineLayout.h b/mozilla/layout/generic/nsLineLayout.h index d1b5636dcf6..b5f1291df31 100644 --- a/mozilla/layout/generic/nsLineLayout.h +++ b/mozilla/layout/generic/nsLineLayout.h @@ -28,16 +28,8 @@ class nsBlockReflowState; class nsPlaceholderFrame; struct nsStyleText; -// If your machine has a limited size stack, you'll want to adjust -// these numbers. Note that it will force the line layout code to use -// the heap more so layout will be slower! -#if defined(XP_MAC) -#define NS_LINELAYOUT_NUM_FRAMES 15 +#define NS_LINELAYOUT_NUM_FRAMES 10 #define NS_LINELAYOUT_NUM_SPANS 5 -#else -#define NS_LINELAYOUT_NUM_FRAMES 50 -#define NS_LINELAYOUT_NUM_SPANS 20 -#endif class nsLineLayout { public: @@ -48,8 +40,11 @@ public: nsLineLayout(nsIPresContext& aPresContext); ~nsLineLayout(); - void Init(nsBlockReflowState* aState) { + void Init(nsBlockReflowState* aState, nscoord aMinLineHeight, + PRInt32 aLineNumber) { mBlockRS = aState; + mMinLineHeight = aMinLineHeight; + mLineNumber = aLineNumber; } PRInt32 GetColumn() { @@ -59,10 +54,6 @@ public: void SetColumn(PRInt32 aNewColumn) { mColumn = aNewColumn; } - - void AdvanceToNextLine() { - mLineNumber++; - } PRInt32 GetLineNumber() const { return mLineNumber; diff --git a/mozilla/layout/html/base/src/nsLineLayout.h b/mozilla/layout/html/base/src/nsLineLayout.h index d1b5636dcf6..b5f1291df31 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.h +++ b/mozilla/layout/html/base/src/nsLineLayout.h @@ -28,16 +28,8 @@ class nsBlockReflowState; class nsPlaceholderFrame; struct nsStyleText; -// If your machine has a limited size stack, you'll want to adjust -// these numbers. Note that it will force the line layout code to use -// the heap more so layout will be slower! -#if defined(XP_MAC) -#define NS_LINELAYOUT_NUM_FRAMES 15 +#define NS_LINELAYOUT_NUM_FRAMES 10 #define NS_LINELAYOUT_NUM_SPANS 5 -#else -#define NS_LINELAYOUT_NUM_FRAMES 50 -#define NS_LINELAYOUT_NUM_SPANS 20 -#endif class nsLineLayout { public: @@ -48,8 +40,11 @@ public: nsLineLayout(nsIPresContext& aPresContext); ~nsLineLayout(); - void Init(nsBlockReflowState* aState) { + void Init(nsBlockReflowState* aState, nscoord aMinLineHeight, + PRInt32 aLineNumber) { mBlockRS = aState; + mMinLineHeight = aMinLineHeight; + mLineNumber = aLineNumber; } PRInt32 GetColumn() { @@ -59,10 +54,6 @@ public: void SetColumn(PRInt32 aNewColumn) { mColumn = aNewColumn; } - - void AdvanceToNextLine() { - mLineNumber++; - } PRInt32 GetLineNumber() const { return mLineNumber;