From 1f8a32ffdbfbce62e32000780016d90c8d3bd735 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Sun, 15 Nov 1998 01:17:05 +0000 Subject: [PATCH] Removed extraneous bullet padding that was left-over from the pre-pseudo-style days git-svn-id: svn://10.0.0.236/trunk@14690 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 12 ++---------- mozilla/layout/generic/nsBlockReflowState.cpp | 12 ++---------- mozilla/layout/generic/nsBlockReflowState.h | 12 ++---------- mozilla/layout/html/base/src/nsBlockFrame.cpp | 12 ++---------- mozilla/layout/html/base/src/nsBlockReflowState.cpp | 12 ++---------- mozilla/layout/html/base/src/nsBlockReflowState.h | 12 ++---------- 6 files changed, 12 insertions(+), 60 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right; diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right; diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right; diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 18797d966a7..81059d7164c 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -795,16 +795,14 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_SQUARE: t2p = aCX->GetTwipsToPixels(); fm->GetMaxAscent(ascent); - bulletSize = NSTwipsToIntPixels((nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); + bulletSize = NSTwipsToIntPixels( + (nscoord)NSToIntRound(0.8f * (float(ascent) / 2.0f)), t2p); if (bulletSize < 1) { bulletSize = MIN_BULLET_SIZE; } p2t = aCX->GetPixelsToTwips(); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); mPadding.bottom = ascent / 8; - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - mPadding.right = bulletSize / 2; - } aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; @@ -818,12 +816,6 @@ BulletFrame::GetDesiredSize(nsIPresContext* aCX, case NS_STYLE_LIST_STYLE_UPPER_ALPHA: GetListItemText(*aCX, *myList, text); fm->GetHeight(aMetrics.height); - if (NS_STYLE_LIST_STYLE_POSITION_INSIDE == myList->mListStylePosition) { - // Inside bullets need some extra width to get the padding - // between the list item and the content that follows. - mPadding.right = aMetrics.height / 2; // From old layout engine - } - aReflowState.rendContext->SetFont(fm); aReflowState.rendContext->GetWidth(text, aMetrics.width); aMetrics.width += mPadding.right;