Move a getter to the safer place where the font was just set in the rendering context (its state could change, who knows)
git-svn-id: svn://10.0.0.236/trunk@111455 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
88ddfc7837
commit
7a64f138ef
@ -270,8 +270,9 @@ nsMathMLmfracFrame::Place(nsIPresContext* aPresContext,
|
|||||||
nsCOMPtr<nsIFontMetrics> fm;
|
nsCOMPtr<nsIFontMetrics> fm;
|
||||||
aRenderingContext.GetFontMetrics(*getter_AddRefs(fm));
|
aRenderingContext.GetFontMetrics(*getter_AddRefs(fm));
|
||||||
|
|
||||||
nscoord defaultRuleThickness;
|
nscoord defaultRuleThickness, axisHeight;
|
||||||
GetRuleThickness(aRenderingContext, fm, defaultRuleThickness);
|
GetRuleThickness(aRenderingContext, fm, defaultRuleThickness);
|
||||||
|
GetAxisHeight(aRenderingContext, fm, axisHeight);
|
||||||
|
|
||||||
// by default, leave at least one-pixel padding at either end, or use
|
// by default, leave at least one-pixel padding at either end, or use
|
||||||
// lspace & rspace from <mo> if we are an embellished container
|
// lspace & rspace from <mo> if we are an embellished container
|
||||||
@ -314,7 +315,6 @@ nsMathMLmfracFrame::Place(nsIPresContext* aPresContext,
|
|||||||
|
|
||||||
nscoord minClearance = 0;
|
nscoord minClearance = 0;
|
||||||
nscoord actualClearance = 0;
|
nscoord actualClearance = 0;
|
||||||
nscoord axisHeight = 0;
|
|
||||||
|
|
||||||
nscoord actualRuleThickness = mLineRect.height;
|
nscoord actualRuleThickness = mLineRect.height;
|
||||||
|
|
||||||
@ -335,11 +335,10 @@ nsMathMLmfracFrame::Place(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Rule 15d, App. G, TeXbook
|
// Rule 15d, App. G, TeXbook
|
||||||
GetAxisHeight(aRenderingContext, fm, axisHeight);
|
|
||||||
|
|
||||||
// min clearance between numerator or denominator and middle of bar
|
// min clearance between numerator or denominator and middle of bar
|
||||||
|
|
||||||
// TeX has a different interpretation of the thickeness.
|
// TeX has a different interpretation of the thickness.
|
||||||
// Try $a \above10pt b$ to see. Here is what TeX does:
|
// Try $a \above10pt b$ to see. Here is what TeX does:
|
||||||
// minClearance = (NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags)) ?
|
// minClearance = (NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags)) ?
|
||||||
// 3 * actualRuleThickness : actualRuleThickness;
|
// 3 * actualRuleThickness : actualRuleThickness;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user