Bug 1397238 - Reset the mIsSimpleFamily flag whenever a face is added to a font family, to ensure we will re-check the available faces before making assumptions about face indexes in FindAllFontsForStyle. r=heycam
authorJonathan Kew <jkew@mozilla.com>
Fri, 08 Sep 2017 10:32:08 +0100
changeset 379762 1c70e1ffbbbd5625ea5ce8aabb354f8871b7411e
parent 379761 5f7438b737c0c4e8361b3c2e7bd4db3c87f9a40b
child 379763 a1edfa0dfd73537199d61298685369b61ff25be9
push id32462
push userkwierso@gmail.com
push dateFri, 08 Sep 2017 20:36:46 +0000
treeherdermozilla-central@ea7b55d65d76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1397238
milestone57.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 1397238 - Reset the mIsSimpleFamily flag whenever a face is added to a font family, to ensure we will re-check the available faces before making assumptions about face indexes in FindAllFontsForStyle. r=heycam
gfx/thebes/gfxFontEntry.h
--- a/gfx/thebes/gfxFontEntry.h
+++ b/gfx/thebes/gfxFontEntry.h
@@ -641,16 +641,18 @@ public:
         }
         if (aFontEntry->mFamilyName.IsEmpty()) {
             aFontEntry->mFamilyName = Name();
         } else {
             MOZ_ASSERT(aFontEntry->mFamilyName.Equals(Name()));
         }
         aFontEntry->mSkipDefaultFeatureSpaceCheck = mSkipDefaultFeatureSpaceCheck;
         mAvailableFonts.AppendElement(aFontEntry);
+        mIsSimpleFamily = false; // CheckForSimpleFamily may set this later,
+                                 // but at this point we're not sure
     }
 
     // note that the styles for this family have been added
     bool HasStyles() { return mHasStyles; }
     void SetHasStyles(bool aHasStyles) { mHasStyles = aHasStyles; }
 
     // choose a specific face to match a style using CSS font matching
     // rules (weight matching occurs here).  may return a face that doesn't