Bug 1294448 - Fix handling of platform ID in gfxFontUtils::ReadNames, so that fallback to Windows-platform names on Mac works as intended. r=jrmuizel a=gchang
authorJonathan Kew <jkew@mozilla.com>
Thu, 11 Aug 2016 20:08:42 +0100
changeset 347650 0463f6653d4830bb793fb43678161dc08b827389
parent 347649 96c1a1c7fbaad98436cde8821e959bb0e32adacd
child 347651 4a8ba94870387a6ebf87c8a1cae6287e4b5012e4
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, gchang
bugs1294448
milestone50.0a2
Bug 1294448 - Fix handling of platform ID in gfxFontUtils::ReadNames, so that fallback to Windows-platform names on Mac works as intended. r=jrmuizel a=gchang
gfx/thebes/gfxFontUtils.cpp
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -1498,17 +1498,17 @@ gfxFontUtils::ReadNames(const char *aNam
 
         // skip over unwanted nameID's
         if (uint32_t(nameRecord->nameID) != aNameID)
             continue;
 
         // skip over unwanted platform data
         platformID = nameRecord->platformID;
         if (aPlatformID != PLATFORM_ALL
-            && uint32_t(nameRecord->platformID) != PLATFORM_ID)
+            && platformID != uint32_t(aPlatformID))
             continue;
 
         // skip over unwanted languages
         if (aLangID != LANG_ALL
               && uint32_t(nameRecord->languageID) != uint32_t(aLangID))
             continue;
 
         // add name to names array