Added UpdateStyleContexts for support change-out of style contexts

This commit is contained in:
kipp@netscape.com
1998-11-05 19:31:39 +00:00
parent 56e7712929
commit d68fc5f5e2
4 changed files with 42 additions and 2 deletions

View File

@@ -515,4 +515,19 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
return NS_OK;
}
void
nsHTMLContainerFrame::UpdateStyleContexts(nsIPresContext& aPresContext,
nsIFrame* aFrame,
nsIFrame* aOldParent,
nsIFrame* aNewParent)
{
nsIStyleContext* oldParentSC;
aOldParent->GetStyleContext(oldParentSC);
nsIStyleContext* newParentSC;
aNewParent->GetStyleContext(newParentSC);
if (oldParentSC != newParentSC) {
aFrame->ReResolveStyleContext(&aPresContext, newParentSC);
}
NS_RELEASE(oldParentSC);
NS_RELEASE(newParentSC);
}