Removed bogus null pointer check

This commit is contained in:
kipp%netscape.com 1998-12-15 17:59:49 +00:00
Родитель b4dfff8ca9
Коммит dafa9178f7
2 изменённых файлов: 56 добавлений и 60 удалений

Просмотреть файл

@ -283,12 +283,11 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, PRBool aApplyTopMargin,
// margins this code is not yet complete. This code may need to
// move to before reflowing the frame instead of after (because
// of floater positioning).
nscoord remainder = mSpace.XMost() - (x + mMetrics.width + mMargin.right);
nscoord remainder = mSpace.XMost() -
(x + mMetrics.width + mMargin.right);
if (remainder >= 0) {
// The block frame didn't use all of the available space. Apply
// auto margins.
const nsStyleSpacing* spacing = mSpacing;
if (nsnull != mSpacing) {
nsStyleUnit leftUnit = mSpacing->mMargin.GetLeftUnit();
nsStyleUnit rightUnit = mSpacing->mMargin.GetRightUnit();
if (eStyleUnit_Auto == leftUnit) {
@ -321,7 +320,6 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, PRBool aApplyTopMargin,
}
}
}
}
else {
// XXX Handle over-constrained case by forcing the appropriate
// margin to be auto

Просмотреть файл

@ -283,12 +283,11 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, PRBool aApplyTopMargin,
// margins this code is not yet complete. This code may need to
// move to before reflowing the frame instead of after (because
// of floater positioning).
nscoord remainder = mSpace.XMost() - (x + mMetrics.width + mMargin.right);
nscoord remainder = mSpace.XMost() -
(x + mMetrics.width + mMargin.right);
if (remainder >= 0) {
// The block frame didn't use all of the available space. Apply
// auto margins.
const nsStyleSpacing* spacing = mSpacing;
if (nsnull != mSpacing) {
nsStyleUnit leftUnit = mSpacing->mMargin.GetLeftUnit();
nsStyleUnit rightUnit = mSpacing->mMargin.GetRightUnit();
if (eStyleUnit_Auto == leftUnit) {
@ -321,7 +320,6 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, PRBool aApplyTopMargin,
}
}
}
}
else {
// XXX Handle over-constrained case by forcing the appropriate
// margin to be auto