зеркало из https://github.com/mozilla/gecko-dev.git
Added a control statement to avoid doing work that will lead nowhere.
This commit is contained in:
Родитель
446b50640e
Коммит
d71c49af3e
|
@ -123,7 +123,8 @@ nsMathMLmiFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
|
|
||||||
// Insert a new pseudo frame between our children and us, i.e., the new frame
|
// Insert a new pseudo frame between our children and us, i.e., the new frame
|
||||||
// becomes our sole child, and our children become children of the new frame.
|
// becomes our sole child, and our children become children of the new frame.
|
||||||
|
nsIFrame* firstChild = mFrames.FirstChild();
|
||||||
|
if (firstChild) {
|
||||||
// Get a pseudo style context for the appropriate style font
|
// Get a pseudo style context for the appropriate style font
|
||||||
// XXX how important is the PseudoStyleContext?
|
// XXX how important is the PseudoStyleContext?
|
||||||
nsAutoString fontStyle = (1 == aLength)
|
nsAutoString fontStyle = (1 == aLength)
|
||||||
|
@ -143,18 +144,17 @@ nsMathMLmiFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
newFrame->Init(aPresContext, mContent, this, newStyleContext, nsnull);
|
newFrame->Init(aPresContext, mContent, this, newStyleContext, nsnull);
|
||||||
|
|
||||||
// our children become children of the new frame
|
// our children become children of the new frame
|
||||||
nsIFrame* firstFrame = mFrames.FirstChild();
|
nsIFrame* childFrame = firstChild;
|
||||||
nsIFrame* childFrame = firstFrame;
|
while (childFrame) {
|
||||||
while (nsnull != childFrame) {
|
|
||||||
childFrame->SetParent(newFrame);
|
childFrame->SetParent(newFrame);
|
||||||
aPresContext.ReParentStyleContext(childFrame, newStyleContext);
|
aPresContext.ReParentStyleContext(childFrame, newStyleContext);
|
||||||
childFrame->GetNextSibling(&childFrame);
|
childFrame->GetNextSibling(&childFrame);
|
||||||
}
|
}
|
||||||
newFrame->SetInitialChildList(aPresContext, nsnull, firstFrame);
|
newFrame->SetInitialChildList(aPresContext, nsnull, firstChild);
|
||||||
|
|
||||||
// the new frame becomes our sole child
|
// the new frame becomes our sole child
|
||||||
mFrames.SetFrames(newFrame);
|
mFrames.SetFrames(newFrame);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче