Trivial change to not run the nsFont default ctor here. r+sr=dbaron.

This commit is contained in:
bryner%brianryner.com 2004-02-25 23:15:11 +00:00
parent 7e2b47b550
commit c3ab816242
2 changed files with 4 additions and 10 deletions

View File

@ -188,12 +188,9 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
nsStyleFont::nsStyleFont(nsIPresContext* aPresContext)
: mFlags(NS_STYLE_FONT_DEFAULT)
: mFlags(NS_STYLE_FONT_DEFAULT),
mFont(*(aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID)))
{
const nsFont* defaultFont =
aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID);
mFont = *defaultFont;
mSize = mFont.size = nsStyleFont::ZoomText(aPresContext, mFont.size);
}

View File

@ -188,12 +188,9 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
nsStyleFont::nsStyleFont(nsIPresContext* aPresContext)
: mFlags(NS_STYLE_FONT_DEFAULT)
: mFlags(NS_STYLE_FONT_DEFAULT),
mFont(*(aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID)))
{
const nsFont* defaultFont =
aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID);
mFont = *defaultFont;
mSize = mFont.size = nsStyleFont::ZoomText(aPresContext, mFont.size);
}