Bug 1228501 patch 3 - Remove nsFont::BaseEquals. r=jdaggett
authorL. David Baron <dbaron@dbaron.org>
Mon, 30 Nov 2015 14:02:25 -0800
changeset 308898 16798ce74d1e41d4cf87efd2db1604529acef19e
parent 308897 2879aebe0ccaf474600b27aa698de0385b43def9
child 308899 d197e2ef0123e53cf40dedc2b9c9a317d1082973
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 3 - Remove nsFont::BaseEquals. r=jdaggett BaseEquals and Equals were made the same by patch 2, so BaseEquals can be removed. (operator== is also defined as an inlined call to Equals.)
gfx/src/nsFont.cpp
gfx/src/nsFont.h
layout/generic/nsTextFrame.cpp
--- a/gfx/src/nsFont.cpp
+++ b/gfx/src/nsFont.cpp
@@ -84,17 +84,17 @@ nsFont::nsFont(const nsFont& aOther)
 nsFont::nsFont()
 {
 }
 
 nsFont::~nsFont()
 {
 }
 
-bool nsFont::BaseEquals(const nsFont& aOther) const
+bool nsFont::Equals(const nsFont& aOther) const
 {
   if ((style == aOther.style) &&
       (systemFont == aOther.systemFont) &&
       (weight == aOther.weight) &&
       (stretch == aOther.stretch) &&
       (size == aOther.size) &&
       (sizeAdjust == aOther.sizeAdjust) &&
       (fontlist == aOther.fontlist) &&
--- a/gfx/src/nsFont.h
+++ b/gfx/src/nsFont.h
@@ -118,22 +118,17 @@ struct nsFont {
 
   nsFont();
   ~nsFont();
 
   bool operator==(const nsFont& aOther) const {
     return Equals(aOther);
   }
 
-  // FIXME (in patch 3): These are now the same.  Remove BaseEquals!
-  bool Equals(const nsFont& aOther) const
-  {
-    return BaseEquals(aOther);
-  }
-  bool BaseEquals(const nsFont& aOther) const;
+  bool Equals(const nsFont& aOther) const;
 
   nsFont& operator=(const nsFont& aOther);
 
   void CopyAlternates(const nsFont& aOther);
 
   // Add featureSettings into style
   void AddFontFeaturesToStyle(gfxFontStyle *aStyle) const;
 
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -1704,18 +1704,18 @@ BuildTextRunsScanner::ContinueTextRunAcr
   const nsStyleText* textStyle2 = sc2->StyleText();
   if (sc1 == sc2)
     return true;
 
   const nsStyleFont* fontStyle1 = sc1->StyleFont();
   const nsStyleFont* fontStyle2 = sc2->StyleFont();
   nscoord letterSpacing1 = LetterSpacing(aFrame1);
   nscoord letterSpacing2 = LetterSpacing(aFrame2);
-  return fontStyle1->mFont.BaseEquals(fontStyle2->mFont) &&
-    sc1->StyleFont()->mLanguage == sc2->StyleFont()->mLanguage &&
+  return fontStyle1->mFont == fontStyle2->mFont &&
+    fontStyle1->mLanguage == fontStyle2->mLanguage &&
     textStyle1->mTextTransform == textStyle2->mTextTransform &&
     nsLayoutUtils::GetTextRunFlagsForStyle(sc1, fontStyle1, textStyle1, letterSpacing1) ==
       nsLayoutUtils::GetTextRunFlagsForStyle(sc2, fontStyle2, textStyle2, letterSpacing2);
 }
 
 void BuildTextRunsScanner::ScanFrame(nsIFrame* aFrame)
 {
   nsIAtom* frameType = aFrame->GetType();