Fix to reparent XBL style contexts. needed for attinasi's style context

reduction landing. r=ben


git-svn-id: svn://10.0.0.236/trunk@74893 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 2000-07-27 06:20:13 +00:00
parent 9b9cb75ca5
commit 63ba18ac99
2 changed files with 18 additions and 0 deletions

View File

@ -5375,6 +5375,13 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame && explicitItems.childList) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, explicitItems.childList);
nsCOMPtr<nsIStyleContext> styleContext;
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* walkit = explicitItems.childList;
while (walkit) {
aPresContext->ReParentStyleContext(walkit, styleContext);
walkit->GetNextSibling(&walkit);
}
}
}
else if (multiple) {
@ -5423,6 +5430,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, currFrame);
frame->GetStyleContext(getter_AddRefs(styleContext));
aPresContext->ReParentStyleContext(currFrame, styleContext);
}
currFrame = nextFrame;

View File

@ -5375,6 +5375,13 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame && explicitItems.childList) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, explicitItems.childList);
nsCOMPtr<nsIStyleContext> styleContext;
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* walkit = explicitItems.childList;
while (walkit) {
aPresContext->ReParentStyleContext(walkit, styleContext);
walkit->GetNextSibling(&walkit);
}
}
}
else if (multiple) {
@ -5423,6 +5430,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, currFrame);
frame->GetStyleContext(getter_AddRefs(styleContext));
aPresContext->ReParentStyleContext(currFrame, styleContext);
}
currFrame = nextFrame;