Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors. r=jdaggett
authorL. David Baron <dbaron@dbaron.org>
Mon, 30 Nov 2015 14:02:25 -0800
changeset 308896 43b52e48aec387fedbce10dc6d9bd8e2620d47f7
parent 308895 2ce0b77b70e13f29e73b85b123ae406ef19f47fc
child 308897 2879aebe0ccaf474600b27aa698de0385b43def9
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs1228501
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors. r=jdaggett The removed parameter is always 0.
gfx/src/nsFont.cpp
gfx/src/nsFont.h
layout/base/nsPresContext.h
layout/base/nsPresShell.cpp
--- a/gfx/src/nsFont.cpp
+++ b/gfx/src/nsFont.cpp
@@ -14,49 +14,46 @@
 #include "nsUnicharUtils.h"
 #include "nscore.h"                     // for char16_t
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/gfx/2D.h"
 
 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;
 }
 
 void
 nsFont::Init()
 {
   systemFont = false;
   smoothing = NS_FONT_SMOOTHING_AUTO;
   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;
   variantEastAsian = 0;
   variantLigatures = 0;
   variantNumeric = 0;
   variantPosition = NS_FONT_VARIANT_POSITION_NORMAL;
 }
--- a/gfx/src/nsFont.h
+++ b/gfx/src/nsFont.h
@@ -106,23 +106,21 @@ struct nsFont {
 
   // Language system tag, to override document language;
   // this is an OpenType "language system" tag represented as a 32-bit integer
   // (see http://www.microsoft.com/typography/otspec/languagetags.htm).
   nsString languageOverride;
 
   // 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);
 
   nsFont();
   ~nsFont();
 
   bool operator==(const nsFont& aOther) const {
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -1101,36 +1101,36 @@ protected:
   friend class nsAutoPtr<LangGroupFontPrefs>;
   struct LangGroupFontPrefs {
     // Font sizes default to zero; they will be set in GetFontPreferences
     LangGroupFontPrefs()
       : mLangGroup(nullptr)
       , 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 {
       size_t n = 0;
       LangGroupFontPrefs *curr = mNext;
       while (curr) {
         n += aMallocSizeOf(curr);
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -10186,17 +10186,17 @@ void ReflowCountMgr::PaintCount(const ch
       gfxPoint devPixelOffset =
         nsLayoutUtils::PointToGfxPoint(aOffset, appUnitsPerDevPixel);
       aRenderingContext->ThebesContext()->SetMatrix(
         aRenderingContext->ThebesContext()->CurrentMatrix().Translate(devPixelOffset));
 
       // 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,
         nsGkAtoms::x_western, false, gfxFont::eHorizontal, nullptr,
         aPresContext->GetTextPerfMetrics(), *getter_AddRefs(fm));
 
       char buf[16];
       int len = snprintf_literal(buf, "%d", counter->mCount);