Include lspace and rspace in GetIntrinsicWidth. b=363240 r+sr=roc

This commit is contained in:
karlt+@karlt.net 2008-02-27 02:47:43 -08:00
parent e6eabd1d25
commit 9cfde0fffe
2 changed files with 19 additions and 0 deletions

View File

@ -978,6 +978,22 @@ nsMathMLmoFrame::MarkIntrinsicWidthsDirty()
nsMathMLContainerFrame::MarkIntrinsicWidthsDirty();
}
/* virtual */ nscoord
nsMathMLmoFrame::GetIntrinsicWidth(nsIRenderingContext *aRenderingContext)
{
ProcessOperatorData();
// TODO: need to ask mMathMLChar for its maximum width if useMathMLChar
// (Bug 363240)
nscoord width = nsMathMLTokenFrame::GetIntrinsicWidth(aRenderingContext);
// leftSpace and rightSpace are actually applied to the outermost
// embellished container but for determining total intrinsic width it should
// be safe to include it for the core here instead.
width += mEmbellishData.leftSpace + mEmbellishData.rightSpace;
return width;
}
NS_IMETHODIMP
nsMathMLmoFrame::AttributeChanged(PRInt32 aNameSpaceID,
nsIAtom* aAttribute,

View File

@ -78,6 +78,9 @@ public:
virtual void MarkIntrinsicWidthsDirty();
virtual nscoord
GetIntrinsicWidth(nsIRenderingContext *aRenderingContext);
NS_IMETHOD
AttributeChanged(PRInt32 aNameSpaceID,
nsIAtom* aAttribute,