nsBlockFrame::ReflowFloatContinuations doesn't need anything in AddFloat other than FlowAndPlaceFloat. (Bug 563584, patch 14) r=roc

This commit is contained in:
L. David Baron 2010-08-05 21:59:19 -07:00
Родитель 511bf3905d
Коммит d4ad679a10
2 изменённых файлов: 10 добавлений и 12 удалений

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

@ -5750,7 +5750,7 @@ nsBlockFrame::ReflowFloatContinuations(nsBlockReflowState& aState,
// Reflow
nsReflowStatus fStatus = NS_FRAME_COMPLETE;
aState.AddFloat(nsnull, f, aState.mContentArea.width, fStatus);
aState.FlowAndPlaceFloat(f, fStatus);
if (!NS_FRAME_IS_FULLY_COMPLETE(fStatus)) {
rv = SplitFloat(aState, f, fStatus);
NS_ENSURE_SUCCESS(rv, rv);

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

@ -542,7 +542,8 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
nscoord aAvailableWidth,
nsReflowStatus& aReflowStatus)
{
NS_PRECONDITION(!aLineLayout || mBlock->end_lines() != mCurrentLine, "null ptr");
NS_PRECONDITION(aLineLayout, "must have line layout");
NS_PRECONDITION(mBlock->end_lines() != mCurrentLine, "null ptr");
NS_PRECONDITION(aFloat->GetStateBits() & NS_FRAME_OUT_OF_FLOW,
"aFloat must be an out-of-flow frame");
@ -570,11 +571,10 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
// don't let this one go on the current line, since that would violate
// float ordering.
nsRect floatAvailableSpace = GetFloatAvailableSpace().mRect;
if (!aLineLayout ||
(mBelowCurrentLineFloats.IsEmpty() &&
(aLineLayout->LineIsEmpty() ||
mBlock->ComputeFloatWidth(*this, floatAvailableSpace, aFloat)
<= aAvailableWidth))) {
if (mBelowCurrentLineFloats.IsEmpty() &&
(aLineLayout->LineIsEmpty() ||
mBlock->ComputeFloatWidth(*this, floatAvailableSpace, aFloat)
<= aAvailableWidth)) {
nsFloatManager::SavedState floatManagerState;
mFloatManager->PushState(&floatManagerState);
@ -586,11 +586,9 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
nsRect availSpace(nsPoint(floatAvailSpace.mRect.x + BorderPadding().left,
mY),
floatAvailSpace.mRect.Size());
if (aLineLayout) {
aLineLayout->UpdateBand(availSpace, aFloat);
// Record this float in the current-line list
mCurrentLineFloats.Append(mFloatCacheFreeList.Alloc(aFloat));
}
aLineLayout->UpdateBand(availSpace, aFloat);
// Record this float in the current-line list
mCurrentLineFloats.Append(mFloatCacheFreeList.Alloc(aFloat));
}
else {
if (placed) {