Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors. r=jdaggett

The removed parameter is always 0.
This commit is contained in:
L. David Baron 2015-11-29 23:15:01 -08:00
parent 6251142c3b
commit a4a35386a0
4 changed files with 13 additions and 18 deletions

View File

@ -19,28 +19,24 @@
using namespace mozilla;
nsFont::nsFont(const FontFamilyList& aFontlist, uint8_t aStyle,
uint16_t aWeight, int16_t aStretch,
uint8_t aDecoration, nscoord aSize)
uint16_t aWeight, int16_t aStretch, nscoord aSize)
: fontlist(aFontlist)
{
Init();
style = aStyle;
weight = aWeight;
stretch = aStretch;
decorations = aDecoration;
size = aSize;
}
nsFont::nsFont(FontFamilyType aGenericType, uint8_t aStyle,
uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
nscoord aSize)
uint16_t aWeight, int16_t aStretch, nscoord aSize)
: fontlist(aGenericType)
{
Init();
style = aStyle;
weight = aWeight;
stretch = aStretch;
decorations = aDecoration;
size = aSize;
}
@ -52,6 +48,7 @@ nsFont::Init()
sizeAdjust = -1.0f;
kerning = NS_FONT_KERNING_AUTO;
synthesis = NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE;
decorations = 0;
variantAlternates = 0;
variantCaps = NS_FONT_VARIANT_CAPS_NORMAL;

View File

@ -111,13 +111,11 @@ struct nsFont {
// initialize the font with a fontlist
nsFont(const mozilla::FontFamilyList& aFontlist, uint8_t aStyle,
uint16_t aWeight, int16_t aStretch,
uint8_t aDecoration, nscoord aSize);
uint16_t aWeight, int16_t aStretch, nscoord aSize);
// initialize the font with a single generic
nsFont(mozilla::FontFamilyType aGenericType, uint8_t aStyle,
uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
nscoord aSize);
uint16_t aWeight, int16_t aStretch, nscoord aSize);
// Make a copy of the given font
nsFont(const nsFont& aFont);

View File

@ -1106,26 +1106,26 @@ protected:
, mMinimumFontSize(0)
, mDefaultVariableFont(mozilla::eFamily_serif, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultFixedFont(mozilla::eFamily_monospace, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultSerifFont(mozilla::eFamily_serif, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultSansSerifFont(mozilla::eFamily_sans_serif,
NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultMonospaceFont(mozilla::eFamily_monospace, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultCursiveFont(mozilla::eFamily_cursive, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
, mDefaultFantasyFont(mozilla::eFamily_fantasy, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL,
NS_FONT_STRETCH_NORMAL, 0, 0)
NS_FONT_STRETCH_NORMAL, 0)
{}
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {

View File

@ -10191,7 +10191,7 @@ void ReflowCountMgr::PaintCount(const char* aName,
// We don't care about the document language or user fonts here;
// just get a default Latin font.
nsFont font(eFamily_serif, NS_FONT_STYLE_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_STRETCH_NORMAL, 0,
NS_FONT_WEIGHT_NORMAL, NS_FONT_STRETCH_NORMAL,
nsPresContext::CSSPixelsToAppUnits(11));
RefPtr<nsFontMetrics> fm;
aPresContext->DeviceContext()->GetMetricsFor(font,