Notify correctly about legend frames being added -- need to mark all our

ancestors as having a dirty child, not just the immediate ancestor.  Bug
366537, r+sr=dbaron
This commit is contained in:
bzbarsky%mit.edu 2007-01-11 17:56:25 +00:00
parent 6fd25279e9
commit a5fc5ca803

View File

@ -703,9 +703,8 @@ nsFieldSetFrame::RemoveFrame(nsIAtom* aListName,
mFrames.DestroyFrame(mLegendFrame);
mLegendFrame = nsnull;
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ChildIsDirty(this);
}
GetPresContext()->PresShell()->
FrameNeedsReflow(this, nsIPresShell::eTreeChange);
return NS_OK;
}
return mContentFrame->RemoveFrame(aListName, aOldFrame);
@ -733,10 +732,9 @@ nsFieldSetFrame::MaybeSetLegend(nsIFrame* aFrameList, nsIAtom* aListName)
aFrameList = mLegendFrame->GetNextSibling();
mLegendFrame->SetNextSibling(mContentFrame);
mFrames.SetFrames(mLegendFrame);
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ChildIsDirty(this);
}
AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
GetPresContext()->PresShell()->
FrameNeedsReflow(this, nsIPresShell::eTreeChange);
}
return aFrameList;
}