From c3ab8162422acc5dd3d63c1124d149e7d6204c83 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Wed, 25 Feb 2004 23:15:11 +0000 Subject: [PATCH] Trivial change to not run the nsFont default ctor here. r+sr=dbaron. --- content/shared/src/nsStyleStruct.cpp | 7 ++----- layout/style/nsStyleStruct.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/content/shared/src/nsStyleStruct.cpp b/content/shared/src/nsStyleStruct.cpp index 9d5b5610bff5..726d3166ec85 100644 --- a/content/shared/src/nsStyleStruct.cpp +++ b/content/shared/src/nsStyleStruct.cpp @@ -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); } diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 9d5b5610bff5..726d3166ec85 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -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); }