Bug 1119423 - Fix reversed test of aMatchData->mStyle in gfxFontFamily::FindFontForChar. r=jdaggett
authorJonathan Kew <jkew@mozilla.com>
Fri, 09 Jan 2015 11:57:56 +0000
changeset 222997 a9321d31e47cc00d0550ba76f2041c0d7ca3585f
parent 222996 171a1e7209a077aa2eb54b69b9d72335fb103334
child 222998 f8466e0caae10b3bd3625354822cc8fcf1b3b61a
push id28079
push userryanvm@gmail.com
push dateFri, 09 Jan 2015 19:45:59 +0000
treeherdermozilla-central@086396560012 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs1119423
milestone37.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 1119423 - Fix reversed test of aMatchData->mStyle in gfxFontFamily::FindFontForChar. r=jdaggett
gfx/thebes/gfxFontEntry.cpp
--- a/gfx/thebes/gfxFontEntry.cpp
+++ b/gfx/thebes/gfxFontEntry.cpp
@@ -1456,20 +1456,20 @@ gfxFontFamily::FindFontForChar(GlobalFon
 {
     if (mFamilyCharacterMapInitialized && !TestCharacterMap(aMatchData->mCh)) {
         // none of the faces in the family support the required char,
         // so bail out immediately
         return;
     }
 
     bool needsBold;
-    gfxFontStyle normal;
-    gfxFontEntry *fe = FindFontForStyle(
-                  (aMatchData->mStyle == nullptr) ? *aMatchData->mStyle : normal,
-                  needsBold);
+    gfxFontEntry *fe =
+        FindFontForStyle(aMatchData->mStyle ? *aMatchData->mStyle
+                                            : gfxFontStyle(),
+                         needsBold);
 
     if (fe && !fe->SkipDuringSystemFallback()) {
         int32_t rank = 0;
 
         if (fe->TestCharacterMap(aMatchData->mCh)) {
             rank += RANK_MATCHED_CMAP;
             aMatchData->mCount++;
 #ifdef PR_LOGGING