Backed out changeset 82bfa9035c6a (bug 847208)

This commit is contained in:
Ed Morley
2013-03-14 15:18:37 +00:00
parent bda1d3afb9
commit cae11f11ce
5 changed files with 16 additions and 58 deletions

View File

@@ -4954,8 +4954,16 @@ nsBlockFrame::AddFrames(nsFrameList& aFrameList, nsIFrame* aPrevSibling)
}
void
nsBlockFrame::RemoveFloatFromFloatCache(nsIFrame* aFloat)
nsBlockFrame::RemoveFloat(nsIFrame* aFloat)
{
#ifdef DEBUG
if (!mFloats.ContainsFrame(aFloat)) {
MOZ_ASSERT(GetOverflowOutOfFlows() &&
GetOverflowOutOfFlows()->ContainsFrame(aFloat),
"aFloat is not our child or on an unexpected frame list");
}
#endif
// Find which line contains the float, so we can update
// the float cache.
line_iterator line = begin_lines(), line_end = end_lines();
@@ -4964,45 +4972,19 @@ nsBlockFrame::RemoveFloatFromFloatCache(nsIFrame* aFloat)
break;
}
}
}
void
nsBlockFrame::RemoveFloat(nsIFrame* aFloat)
{
#ifdef DEBUG
// Floats live in mFloats, or in the PushedFloat or OverflowOutOfFlows
// frame list properties.
if (!mFloats.ContainsFrame(aFloat)) {
MOZ_ASSERT((GetOverflowOutOfFlows() &&
GetOverflowOutOfFlows()->ContainsFrame(aFloat)) ||
(GetPushedFloats() &&
GetPushedFloats()->ContainsFrame(aFloat)),
"aFloat is not our child or on an unexpected frame list");
}
#endif
if (mFloats.StartRemoveFrame(aFloat)) {
return;
}
nsFrameList* list = GetPushedFloats();
if (list && list->ContinueRemoveFrame(aFloat)) {
#if 0
// XXXmats not yet - need to investigate nsBlockReflowState::mPushedFloats
// first so we don't leave it pointing to a deleted list.
if (list->IsEmpty()) {
delete RemovePushedFloats();
}
#endif
return;
}
{
nsAutoOOFFrameList oofs(this);
if (oofs.mList.ContinueRemoveFrame(aFloat)) {
return;
}
}
MOZ_ASSERT(false, "float child frame not found");
}
static void MarkSameFloatManagerLinesDirty(nsBlockFrame* aBlock)
@@ -5121,7 +5103,6 @@ nsBlockFrame::DoRemoveOutOfFlowFrame(nsIFrame* aFrame)
->DeleteNextInFlowChild(aFrame->PresContext(), nif, false);
}
// Now remove aFrame from its child list and Destroy it.
block->RemoveFloatFromFloatCache(aFrame);
block->RemoveFloat(aFrame);
aFrame->Destroy();
}