Clarify when ReParentStyleContext should be called and remove more bogus style

parentage warnings.  Bug 217225, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@149235 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2003-11-13 04:31:04 +00:00
parent efdc7bfac3
commit 0b45220a8c
12 changed files with 30 additions and 28 deletions

View File

@@ -2802,9 +2802,8 @@ nsCSSFrameConstructor::ConstructTableColFrame(nsIPresShell* aPresShel
rv = aTableCreator.CreateTableColFrame(&aNewFrame); if (NS_FAILED(rv)) return rv;
InitAndRestoreFrame(aPresContext, aState, aContent, parentFrame, aStyleContext, nsnull, aNewFrame);
// if the parent frame was anonymous then reparent the style context
nsStyleContext* parentStyleContext = parentFrame->GetStyleContext();
if (aIsPseudoParent) {
aPresContext->ReParentStyleContext(aNewFrame, parentStyleContext);
aPresContext->ReParentStyleContext(aNewFrame, parentFrame->GetStyleContext());
}
// construct additional col frames if the col frame has a span > 1
@@ -11678,8 +11677,8 @@ ReparentFrame(nsIPresContext* aPresContext,
nsStyleContext* aParentStyleContext,
nsIFrame* aFrame)
{
aPresContext->ReParentStyleContext(aFrame, aParentStyleContext);
aFrame->SetParent(aNewParentFrame);
aPresContext->ReParentStyleContext(aFrame, aParentStyleContext);
}
// Special routine to handle placing a list of frames into a block