[MathML only] Rename the pointer on the embellished operator from |firstChild| to |next| because it is more clearer with the latter that it is an hierarchy. Also made the inheritance of the displaystyle more reliable by walking up to the root <math> tag if necessary, e.g., if a MathML frame happens to be surrounded by non-MathML helper frames needed for its support

git-svn-id: svn://10.0.0.236/trunk@111885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au
2002-01-10 23:40:40 +00:00
parent 243a85796b
commit 526b3dfa82
9 changed files with 181 additions and 135 deletions

View File

@@ -222,18 +222,18 @@ nsMathMLmactionFrame::GetSelectedFrame()
// if the selected child is an embellished operator,
// we become embellished as well
mEmbellishData.flags &= ~NS_MATHML_EMBELLISH_OPERATOR;
mEmbellishData.firstChild = nsnull;
mEmbellishData.next = nsnull;
mEmbellishData.core = nsnull;
mEmbellishData.direction = NS_STRETCH_DIRECTION_UNSUPPORTED;
if (mSelectedFrame) {
nsIMathMLFrame* mathMLFrame = nsnull;
rv = mSelectedFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
if (NS_SUCCEEDED(rv) && mathMLFrame) {
nsIMathMLFrame* mathMLFrame;
mSelectedFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
if (mathMLFrame) {
nsEmbellishData embellishData;
mathMLFrame->GetEmbellishData(embellishData);
if (NS_MATHML_IS_EMBELLISH_OPERATOR(embellishData.flags) && embellishData.firstChild) {
if (NS_MATHML_IS_EMBELLISH_OPERATOR(embellishData.flags)) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_OPERATOR;
mEmbellishData.firstChild = mSelectedFrame; // yes!
mEmbellishData.next = mSelectedFrame; // yes!
mEmbellishData.core = embellishData.core;
mEmbellishData.direction = embellishData.direction;
}
@@ -277,8 +277,7 @@ nsMathMLmactionFrame::GetFrameForPoint(nsIPresContext* aPresContext,
pt.MoveTo(aPoint.x - mRect.x, aPoint.y - mRect.y);
return childFrame->GetFrameForPoint(aPresContext, pt, aWhichLayer, aFrame);
}
else
return nsFrame::GetFrameForPoint(aPresContext, aPoint, aWhichLayer, aFrame);
return nsFrame::GetFrameForPoint(aPresContext, aPoint, aWhichLayer, aFrame);
}
// Only paint the selected child...