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;