Bug 790260 - Make CollectFloats remove the IS_PUSHED_FLOAT bit in case the float was collected from the PushedFloats list. r=roc
This commit is contained in:
@@ -2001,6 +2001,8 @@ nsBlockFrame::ReparentFloats(nsIFrame* aFirstFrame, nsBlockFrame* aOldParent,
|
|||||||
aOldParent->CollectFloats(aFirstFrame, list, aReparentSiblings);
|
aOldParent->CollectFloats(aFirstFrame, list, aReparentSiblings);
|
||||||
if (list.NotEmpty()) {
|
if (list.NotEmpty()) {
|
||||||
for (nsIFrame* f : list) {
|
for (nsIFrame* f : list) {
|
||||||
|
MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
|
||||||
|
"CollectFloats should've removed that bit");
|
||||||
ReparentFrame(f, aOldParent, this);
|
ReparentFrame(f, aOldParent, this);
|
||||||
}
|
}
|
||||||
mFloats.AppendFrames(nullptr, list);
|
mFloats.AppendFrames(nullptr, list);
|
||||||
@@ -4576,6 +4578,12 @@ nsBlockFrame::PushLines(nsBlockReflowState& aState,
|
|||||||
CollectFloats(overBegin->mFirstChild, floats, true);
|
CollectFloats(overBegin->mFirstChild, floats, true);
|
||||||
|
|
||||||
if (floats.NotEmpty()) {
|
if (floats.NotEmpty()) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
for (nsIFrame* f : floats) {
|
||||||
|
MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
|
||||||
|
"CollectFloats should've removed that bit");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// Push the floats onto the front of the overflow out-of-flows list
|
// Push the floats onto the front of the overflow out-of-flows list
|
||||||
nsAutoOOFFrameList oofs(this);
|
nsAutoOOFFrameList oofs(this);
|
||||||
oofs.mList.InsertFrames(nullptr, nullptr, floats);
|
oofs.mList.InsertFrames(nullptr, nullptr, floats);
|
||||||
@@ -4705,6 +4713,12 @@ nsBlockFrame::DrainSelfOverflowList()
|
|||||||
// already ours. But we should put overflow floats back in mFloats.
|
// already ours. But we should put overflow floats back in mFloats.
|
||||||
nsAutoOOFFrameList oofs(this);
|
nsAutoOOFFrameList oofs(this);
|
||||||
if (oofs.mList.NotEmpty()) {
|
if (oofs.mList.NotEmpty()) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
for (nsIFrame* f : oofs.mList) {
|
||||||
|
MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
|
||||||
|
"CollectFloats should've removed that bit");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// The overflow floats go after our regular floats.
|
// The overflow floats go after our regular floats.
|
||||||
mFloats.AppendFrames(nullptr, oofs.mList);
|
mFloats.AppendFrames(nullptr, oofs.mList);
|
||||||
}
|
}
|
||||||
@@ -7171,6 +7185,9 @@ nsBlockFrame::DoCollectFloats(nsIFrame* aFrame, nsFrameList& aList,
|
|||||||
nsLayoutUtils::GetFloatFromPlaceholder(aFrame) : nullptr;
|
nsLayoutUtils::GetFloatFromPlaceholder(aFrame) : nullptr;
|
||||||
while (outOfFlowFrame && outOfFlowFrame->GetParent() == this) {
|
while (outOfFlowFrame && outOfFlowFrame->GetParent() == this) {
|
||||||
RemoveFloat(outOfFlowFrame);
|
RemoveFloat(outOfFlowFrame);
|
||||||
|
// Remove the IS_PUSHED_FLOAT bit, in case |outOfFlowFrame| came from
|
||||||
|
// the PushedFloats list.
|
||||||
|
outOfFlowFrame->RemoveStateBits(NS_FRAME_IS_PUSHED_FLOAT);
|
||||||
aList.AppendFrame(nullptr, outOfFlowFrame);
|
aList.AppendFrame(nullptr, outOfFlowFrame);
|
||||||
outOfFlowFrame = outOfFlowFrame->GetNextInFlow();
|
outOfFlowFrame = outOfFlowFrame->GetNextInFlow();
|
||||||
// FIXME: By not pulling floats whose parent is one of our
|
// FIXME: By not pulling floats whose parent is one of our
|
||||||
|
|||||||
Reference in New Issue
Block a user