menu bug fx r by danm ben

git-svn-id: svn://10.0.0.236/trunk@82992 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 2000-11-28 23:35:04 +00:00
parent 694a94a527
commit a29e161fc4
2 changed files with 42 additions and 24 deletions

View File

@ -5410,14 +5410,19 @@ 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) {
nsIFrame* realFrame = GetRealFrame(walkit);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
walkit->GetNextSibling(&walkit);
nsIFrame* insertionPoint = nsnull;
frameManager->GetInsertionPoint(aPresShell, frame, explicitItems.childList, &insertionPoint);
if (!insertionPoint) {
nsCOMPtr<nsIStyleContext> styleContext;
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* walkit = explicitItems.childList;
while (walkit) {
nsIFrame* realFrame = GetRealFrame(walkit);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
walkit->GetNextSibling(&walkit);
}
}
}
}
@ -5467,11 +5472,15 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, currFrame);
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* realFrame = GetRealFrame(currFrame);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
nsIFrame* insertionPoint = nsnull;
frameManager->GetInsertionPoint(aPresShell, frame, explicitItems.childList, &insertionPoint);
if (!insertionPoint) {
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* realFrame = GetRealFrame(currFrame);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
}
}
currFrame = nextFrame;

View File

@ -5410,14 +5410,19 @@ 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) {
nsIFrame* realFrame = GetRealFrame(walkit);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
walkit->GetNextSibling(&walkit);
nsIFrame* insertionPoint = nsnull;
frameManager->GetInsertionPoint(aPresShell, frame, explicitItems.childList, &insertionPoint);
if (!insertionPoint) {
nsCOMPtr<nsIStyleContext> styleContext;
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* walkit = explicitItems.childList;
while (walkit) {
nsIFrame* realFrame = GetRealFrame(walkit);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
walkit->GetNextSibling(&walkit);
}
}
}
}
@ -5467,11 +5472,15 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
if (frameManager && frame) {
frameManager->AppendFrames(aPresContext, *aPresShell, frame,
nsnull, currFrame);
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* realFrame = GetRealFrame(currFrame);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
nsIFrame* insertionPoint = nsnull;
frameManager->GetInsertionPoint(aPresShell, frame, explicitItems.childList, &insertionPoint);
if (!insertionPoint) {
frame->GetStyleContext(getter_AddRefs(styleContext));
nsIFrame* realFrame = GetRealFrame(currFrame);
realFrame->SetParent(frame);
aPresContext->ReParentStyleContext(realFrame, styleContext);
}
}
currFrame = nextFrame;