Bug 1294448 - Fix handling of platform ID in gfxFontUtils::ReadNames, so that fallback to Windows-platform names on Mac works as intended. r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Thu, 11 Aug 2016 20:08:42 +0100
changeset 309063 2e5c6bab845670af3b30c310145f3e9c8640d050
parent 309062 eb27f7675ebcd012c423ef30d750c04559543f1a
child 309064 0307f3b495ed7cc0105b338bcf1eb8b6175009ef
push id80511
push userjkew@mozilla.com
push dateThu, 11 Aug 2016 19:09:04 +0000
treeherdermozilla-inbound@0307f3b495ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1294448
milestone51.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 1294448 - Fix handling of platform ID in gfxFontUtils::ReadNames, so that fallback to Windows-platform names on Mac works as intended. r=jrmuizel
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