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

reduction landing. r=ben
This commit is contained in:
hyatt%netscape.com 2000-07-27 06:20:13 +00:00
Родитель c081bf084d
Коммит c25a01be6a
2 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;