Bug 838688 - Make ReparentFloats/CollectFloats not require a priori knowledge of which child list a float is expected to be on. r=bzbarsky
This commit is contained in:
@@ -243,9 +243,7 @@ nsInlineFrame::ReparentFloatsForInlineChild(nsIFrame* aOurLineContainer,
|
||||
}
|
||||
|
||||
nsIFrame* ancestor = aFrame;
|
||||
nsIFrame* ancestorBlockChild;
|
||||
do {
|
||||
ancestorBlockChild = ancestor;
|
||||
ancestor = ancestor->GetParent();
|
||||
if (!ancestor)
|
||||
return;
|
||||
@@ -259,11 +257,8 @@ nsInlineFrame::ReparentFloatsForInlineChild(nsIFrame* aOurLineContainer,
|
||||
nsBlockFrame* frameBlock = nsLayoutUtils::GetAsBlock(ancestor);
|
||||
NS_ASSERTION(frameBlock, "ancestor not a block");
|
||||
|
||||
const nsFrameList& blockChildren(ancestor->PrincipalChildList());
|
||||
bool isOverflow = !blockChildren.ContainsFrame(ancestorBlockChild);
|
||||
|
||||
while (true) {
|
||||
ourBlock->ReparentFloats(aFrame, frameBlock, isOverflow, false);
|
||||
ourBlock->ReparentFloats(aFrame, frameBlock, false);
|
||||
|
||||
if (!aReparentSiblings)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user