зеркало из https://github.com/mozilla/gecko-dev.git
Removed bogus null pointer check
This commit is contained in:
Родитель
b4dfff8ca9
Коммит
dafa9178f7
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче