Pass the user font set through more reliably and make it a required parameter. (Bug 467084) r+sr=roc a=blocking1.9.1+

This commit is contained in:
L. David Baron
2008-12-04 08:09:53 -08:00
parent 226c6fb194
commit 27bd6b26d3
29 changed files with 130 additions and 84 deletions

View File

@@ -500,13 +500,16 @@ nsPageFrame::PaintHeaderFooter(nsIRenderingContext& aRenderingContext,
nsRect rect(aPt.x, aPt.y, mRect.width - mPD->mShadowSize.width,
mRect.height - mPD->mShadowSize.height);
aRenderingContext.SetFont(*mPD->mHeadFootFont, nsnull);
aRenderingContext.SetColor(NS_RGB(0,0,0));
// Get the FontMetrics to determine width.height of strings
nsCOMPtr<nsIFontMetrics> fontMet;
pc->DeviceContext()->GetMetricsFor(*mPD->mHeadFootFont, nsnull,
pc->GetUserFontSet(),
*getter_AddRefs(fontMet));
aRenderingContext.SetFont(fontMet);
nscoord ascent = 0;
nscoord visibleHeight = 0;
if (fontMet) {