From 24a708a050de683a81447b852dc47cd933099231 Mon Sep 17 00:00:00 2001 From: kipp Date: Fri, 29 May 1998 18:25:14 +0000 Subject: [PATCH] Consolidated list handling state variables --- layout/generic/nsBlockFrame.cpp | 3 --- layout/generic/nsBlockFrame.h | 5 ++--- layout/generic/nsBlockReflowState.cpp | 3 --- layout/generic/nsBlockReflowState.h | 3 --- layout/html/base/src/nsBlockFrame.cpp | 3 --- layout/html/base/src/nsBlockFrame.h | 5 ++--- layout/html/base/src/nsBlockReflowState.cpp | 3 --- layout/html/base/src/nsBlockReflowState.h | 3 --- 8 files changed, 4 insertions(+), 24 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) { diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 836e47c4553a..684644e442ae 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -69,8 +69,6 @@ struct nsBlockReflowState { nsBlockFrame* mBlock; PRBool mBlockIsPseudo; - PRBool mBlockIsListItem; - PRBool mListPositionOutside; // Current line being reflowed nsLineLayout* mCurrentLine; @@ -107,8 +105,9 @@ struct nsBlockReflowState { // Array of floaters to place below current line nsVoidArray mPendingFloaters; + // The next list ordinal for counting list bullets PRInt32 mNextListOrdinal; - PRPackedBool mFirstChildIsInsideBullet; + PRBool mListPositionOutside; }; //---------------------------------------------------------------------- diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) { diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) { diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) { diff --git a/layout/html/base/src/nsBlockFrame.h b/layout/html/base/src/nsBlockFrame.h index 836e47c4553a..684644e442ae 100644 --- a/layout/html/base/src/nsBlockFrame.h +++ b/layout/html/base/src/nsBlockFrame.h @@ -69,8 +69,6 @@ struct nsBlockReflowState { nsBlockFrame* mBlock; PRBool mBlockIsPseudo; - PRBool mBlockIsListItem; - PRBool mListPositionOutside; // Current line being reflowed nsLineLayout* mCurrentLine; @@ -107,8 +105,9 @@ struct nsBlockReflowState { // Array of floaters to place below current line nsVoidArray mPendingFloaters; + // The next list ordinal for counting list bullets PRInt32 mNextListOrdinal; - PRPackedBool mFirstChildIsInsideBullet; + PRBool mListPositionOutside; }; //---------------------------------------------------------------------- diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) { diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 4b5c655d2aeb..a0d7301816c2 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -111,7 +111,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mBlock = aBlock; mSpaceManager = aSpaceManager; mBlockIsPseudo = aBlock->IsPseudoFrame(); - mBlockIsListItem = PR_FALSE; mListPositionOutside = PR_FALSE; mCurrentLine = nsnull; mPrevKidFrame = nsnull; @@ -132,7 +131,6 @@ nsBlockReflowState::Initialize(nsIPresContext* aPresContext, mPrevNegBottomMargin = 0; mNextListOrdinal = -1; - mFirstChildIsInsideBullet = PR_FALSE; return rv; } @@ -1030,7 +1028,6 @@ nsBlockFrame::InitializeState(nsIPresContext* aPresContext, nsStyleDisplay* myDisplay = (nsStyleDisplay*) mStyleContext->GetData(eStyleStruct_Display); if (NS_STYLE_DISPLAY_LIST_ITEM == myDisplay->mDisplay) { - aState.mBlockIsListItem = PR_TRUE; nsStyleList* myList = (nsStyleList*) mStyleContext->GetData(eStyleStruct_List); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == myList->mListStylePosition) {