[not part of default build] Added support for the attributes 'numalign' and 'denomalign' that were newly introduced in MathML 2.0

This commit is contained in:
rbs%maths.uq.edu.au 2000-05-11 23:02:00 +00:00
parent 8cdb172384
commit 8d4562f625

View File

@ -393,6 +393,23 @@ nsMathMLmfracFrame::Place(nsIPresContext* aPresContext,
nscoord dxNum = (width - sizeNum.width)/2;
nscoord dxDen = (width - sizeDen.width)/2;
// see if the numalign attribute is there
if (NS_CONTENT_ATTR_HAS_VALUE == GetAttribute(mContent, mPresentationData.mstyle,
nsMathMLAtoms::numalign_, value)) {
if (value.EqualsWithConversion("left"))
dxNum = onePixel;
else if (value.EqualsWithConversion("right"))
dxNum = width - onePixel - sizeNum.width;
}
// see if the denomalign attribute is there
if (NS_CONTENT_ATTR_HAS_VALUE == GetAttribute(mContent, mPresentationData.mstyle,
nsMathMLAtoms::denomalign_, value)) {
if (value.EqualsWithConversion("left"))
dxDen = onePixel;
else if (value.EqualsWithConversion("right"))
dxDen = width - onePixel - sizeDen.width;
}
mBoundingMetrics.rightBearing =
PR_MAX(dxNum + bmNum.rightBearing, dxDen + bmDen.rightBearing);
if (mBoundingMetrics.rightBearing < width - onePixel)