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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user