Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors. r=jdaggett
☠☠ backed out by 23a833513092 ☠ ☠
authorL. David Baron <dbaron@dbaron.org>
Sun, 29 Nov 2015 23:15:01 -0800
changeset 274554 e1fd92eeb5ba40ef5ecf50793b911397fd9816d0
parent 274553 0a2d8e926a66b22ac7f0e132248cc5c635335351
child 274555 3a3cd254f508e87d384d7598b67751489370812a
push id68626
push userdbaron@mozilla.com
push dateMon, 30 Nov 2015 07:16:42 +0000
treeherdermozilla-inbound@4a3c509bcb25 [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);