Backed out changeset 2257088c6b04 (bug 1188802)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 05 Feb 2016 11:19:11 +0100
changeset 321459 9aff7458c643786a71379f80e2d346d402bccca3
parent 321458 c4e5ea3c45893e69abbe616fcd6774806552a121
child 321460 820ab8931ebca5ed58330627d0f45048d104eef2
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1188802
milestone47.0a1
backs out2257088c6b048b0f10c0c6940cf1c8cdf3782634
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
Backed out changeset 2257088c6b04 (bug 1188802)
gfx/thebes/gfxUserFontSet.cpp
gfx/thebes/gfxUserFontSet.h
layout/style/FontFaceSet.cpp
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -779,17 +779,16 @@ gfxUserFontEntry::GetUserFontSets(nsTArr
 {
     aResult.Clear();
     aResult.AppendElement(mFontSet);
 }
 
 gfxUserFontSet::gfxUserFontSet()
     : mFontFamilies(4),
       mLocalRulesUsed(false),
-      mRebuildLocalRules(false),
       mDownloadCount(0),
       mDownloadSize(0)
 {
     IncrementGeneration(true);
     gfxPlatformFontList* fp = gfxPlatformFontList::PlatformFontList();
     if (fp) {
         fp->AddUserFontSet(this);
     }
@@ -954,17 +953,16 @@ gfxUserFontSet::IncrementGeneration(bool
         mRebuildGeneration = mGeneration;
     }
 }
 
 void
 gfxUserFontSet::RebuildLocalRules()
 {
     if (mLocalRulesUsed) {
-        mRebuildLocalRules = true;
         DoRebuildUserFontSet();
     }
 }
 
 gfxUserFontFamily*
 gfxUserFontSet::LookupFamily(const nsAString& aFamilyName) const
 {
     nsAutoString key(aFamilyName);
--- a/gfx/thebes/gfxUserFontSet.h
+++ b/gfx/thebes/gfxUserFontSet.h
@@ -521,19 +521,16 @@ protected:
     nsRefPtrHashtable<nsStringHashKey, gfxUserFontFamily> mFontFamilies;
 
     uint64_t        mGeneration;        // bumped on any font load change
     uint64_t        mRebuildGeneration; // only bumped on rebuilds
 
     // true when local names have been looked up, false otherwise
     bool mLocalRulesUsed;
 
-    // true when rules using local names need to be redone
-    bool mRebuildLocalRules;
-
     // performance stats
     uint32_t mDownloadCount;
     uint64_t mDownloadSize;
 };
 
 // acts a placeholder until the real font is downloaded
 
 class gfxUserFontEntry : public gfxFontEntry {
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -784,21 +784,18 @@ FontFaceSet::UpdateRules(const nsTArray<
 
   if (modified) {
     IncrementGeneration(true);
     mHasLoadingFontFacesIsDirty = true;
     CheckLoadingStarted();
     CheckLoadingFinished();
   }
 
-  // if local rules needed to be rebuilt, they have been rebuilt at this point
-  if (mUserFontSet->mRebuildLocalRules) {
-    mUserFontSet->mLocalRulesUsed = false;
-    mUserFontSet->mRebuildLocalRules = false;
-  }
+  // local rules have been rebuilt, so clear the flag
+  mUserFontSet->mLocalRulesUsed = false;
 
   if (LOG_ENABLED() && !mRuleFaces.IsEmpty()) {
     LOG(("userfonts (%p) userfont rules update (%s) rule count: %d",
          mUserFontSet.get(),
          (modified ? "modified" : "not modified"),
          (int)(mRuleFaces.Length())));
   }
 
@@ -873,18 +870,17 @@ FontFaceSet::InsertRuleFontFace(FontFace
   for (size_t i = 0; i < aOldRecords.Length(); ++i) {
     FontFaceRecord& rec = aOldRecords[i];
 
     if (rec.mFontFace == aFontFace &&
         rec.mSheetType == aSheetType) {
 
       // if local rules were used, don't use the old font entry
       // for rules containing src local usage
-      if (mUserFontSet->mLocalRulesUsed &&
-          mUserFontSet->mRebuildLocalRules) {
+      if (mUserFontSet->mLocalRulesUsed) {
         nsCSSValue val;
         aFontFace->GetDesc(eCSSFontDesc_Src, val);
         nsCSSUnit unit = val.GetUnit();
         if (unit == eCSSUnit_Array && HasLocalSrc(val.GetArrayValue())) {
           // Remove the old record, but wait to see if we successfully create a
           // new user font entry below.
           remove = true;
           removeIndex = i;