Backed out changeset 82bfa9035c6a (bug 847208)

This commit is contained in:
Ed Morley 2013-03-14 15:18:37 +00:00
Родитель 315034a29a
Коммит 7fc7f86f26
5 изменённых файлов: 16 добавлений и 58 удалений

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

@ -621,7 +621,8 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
return nsIFrame::kPopupList;
#endif // MOZ_XUL
} else {
NS_ASSERTION(aChildFrame->IsFloating(), "not a floated frame");
NS_ASSERTION(aChildFrame->IsFloating(),
"not a floated frame");
id = nsIFrame::kFloatList;
}
@ -659,10 +660,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
else if (aChildFrame->IsFloating()) {
found = parent->GetChildList(nsIFrame::kOverflowOutOfFlowList)
.ContainsFrame(aChildFrame);
if (!found) {
found = parent->GetChildList(nsIFrame::kPushedFloatsList)
.ContainsFrame(aChildFrame);
}
}
// else it's positioned and should have been on the 'id' child list.
NS_POSTCONDITION(found, "not in child list");

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

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
.f:first-letter {
float: left;
}
.f {
page-break-inside: avoid; float: left;
}
</style>
</head>
<body onload="document.getElementById('p').className = '';">
<p id="p" class="f">text</p>
</body>
</html>

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

@ -448,4 +448,3 @@ test-pref(layout.css.flexbox.enabled,true) load 827168-1.html
load 842132-1.html
test-pref(layout.css.flexbox.enabled,true) load 844529-1.html
load 847130.xhtml
load 847208.html

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

@ -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();
}

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

@ -518,13 +518,10 @@ protected:
uint8_t FindTrailingClear();
/**
* Remove a float from our float list.
*/
* Remove a float from our float list and also the float cache
* for the line its placeholder is on.
*/
void RemoveFloat(nsIFrame* aFloat);
/**
* Remove a float from the float cache for the line its placeholder is on.
*/
void RemoveFloatFromFloatCache(nsIFrame* aFloat);
void CollectFloats(nsIFrame* aFrame, nsFrameList& aList,
bool aCollectFromSiblings) {