Bug 1228501 patch 3 - Remove nsFont::BaseEquals. r=jdaggett
☠☠ backed out by 00534f958b5a ☠ ☠
authorL. David Baron <dbaron@dbaron.org>
Sun, 29 Nov 2015 23:15:02 -0800
changeset 308838 6c478d7a9467d8336d431cb383402af93da39c0d
parent 308837 3a3cd254f508e87d384d7598b67751489370812a
child 308839 ec79945130ff962575dba5d4579071b7a3b38346
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();