Bug 386900: Topic images rendered in wrong place on slashdot. r+sr=roc

This commit is contained in:
sharparrow1%yahoo.com 2007-07-06 18:22:56 +00:00
Родитель 025e8d7b66
Коммит e799b85e3e
1 изменённых файлов: 76 добавлений и 82 удалений

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

@ -617,7 +617,11 @@ nsBlockReflowState::CanPlaceFloat(const nsSize& aFloatSize,
// prior float)
result = PR_FALSE;
}
else {
}
if (!result)
return result;
// At this point we know that there is enough horizontal space for
// the float (somewhere). Lets see if there is enough vertical
// space.
@ -672,20 +676,13 @@ nsBlockReflowState::CanPlaceFloat(const nsSize& aFloatSize,
mY += mAvailSpaceRect.height;
GetAvailableSpace(mY, aForceFit);
if (0 == mBand.GetFloatCount()) {
// Winner. This band has no floats on it, therefore
// there can be no overlap.
break;
}
// Check and make sure the float won't intersect any
// floats on this band. The floats starting and ending
// coordinates must be entirely in the available space.
if (0 != mBand.GetFloatCount()) {
if ((xa < mAvailSpaceRect.x) || (xb > mAvailSpaceRect.XMost())) {
// The float can't go here.
result = PR_FALSE;
break;
}
}
// See if there is now enough height for the float.
if (yb < mY + mAvailSpaceRect.height) {
@ -700,10 +697,7 @@ nsBlockReflowState::CanPlaceFloat(const nsSize& aFloatSize,
mY = saveY;
GetAvailableSpace(mY, aForceFit);
}
}
} else if (!aForceFit && (aFloatSize.height > mAvailSpaceRect.height)) {
result = PR_FALSE;
}
return result;
}