Bug 425249 gfxWindowsPlatform::InitBadUnderlineList() is broken by bug 424018 r+b1.9+a1.9b5=stuart
authormasayuki@d-toybox.com
Wed, 26 Mar 2008 14:43:43 -0700
changeset 13579 5b8fb2b0a9a2f30c472d211f20af944586f4fbad
parent 13578 7157d043499d0599f29961eb84cd8d7be17c4f20
child 13580 9c518ad3b52145f43b3abb1f37328fd6789295a6
push id4
push userjorendorff@mozilla.com
push dateFri, 28 Mar 2008 18:03:49 +0000
treeherdermozilla-central@7deefc8dce86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs425249, 424018
milestone1.9pre
Bug 425249 gfxWindowsPlatform::InitBadUnderlineList() is broken by bug 424018 r+b1.9+a1.9b5=stuart
gfx/thebes/public/gfxWindowsFonts.h
gfx/thebes/src/gfxWindowsFonts.cpp
gfx/thebes/src/gfxWindowsPlatform.cpp
--- a/gfx/thebes/public/gfxWindowsFonts.h
+++ b/gfx/thebes/public/gfxWindowsFonts.h
@@ -72,16 +72,17 @@ private:
     static int CALLBACK FamilyAddStylesProc(const ENUMLOGFONTEXW *lpelfe,
                                             const NEWTEXTMETRICEXW *nmetrics,
                                             DWORD fontType, LPARAM data);
     void FindStyleVariations();
 
 public:
     nsTArray<nsRefPtr<FontEntry> > mVariations;
     nsString mName;
+    PRPackedBool mIsBadUnderlineFont;
 
 private:
     PRBool mHasStyles;
 };
 
 class FontEntry
 {
 public:
--- a/gfx/thebes/src/gfxWindowsFonts.cpp
+++ b/gfx/thebes/src/gfxWindowsFonts.cpp
@@ -198,16 +198,18 @@ FontFamily::FamilyAddStylesProc(const EN
         for (PRUint32 i = 0; i < 4; ++i) {
             DWORD range = nmetrics->ntmFontSig.fsUsb[i];
             for (PRUint32 k = 0; k < 32; ++k) {
                 fe->mUnicodeRanges[x++] = (range & (1 << k)) != 0;
             }
         }
     }
 
+    fe->mIsBadUnderlineFont = ff->mIsBadUnderlineFont;
+
     // read in the character map
     logFont.lfCharSet = DEFAULT_CHARSET;
     HFONT font = CreateFontIndirectW(&logFont);
 
     NS_ASSERTION(font, "This font creation should never ever ever fail");
     if (font) {
         HFONT oldFont = (HFONT)SelectObject(hdc, font);
 
--- a/gfx/thebes/src/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/src/gfxWindowsPlatform.cpp
@@ -280,20 +280,17 @@ gfxWindowsPlatform::InitBadUnderlineList
         PRBool aborted;
         nsAutoString resolved;
         ResolveFontName(blacklist[i], SimpleResolverCallback, &resolved, aborted);
         if (resolved.IsEmpty())
             continue;
         FontFamily *ff = FindFontFamily(resolved);
         if (!ff)
             continue;
-        for (PRUint32 j = 0; j < ff->mVariations.Length(); ++j) {
-            nsRefPtr<FontEntry> fe = ff->mVariations[j];
-            fe->mIsBadUnderlineFont = 1;
-        }
+        ff->mIsBadUnderlineFont = 1;
     }
 }
 
 nsresult
 gfxWindowsPlatform::GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName)
 {
     aFamilyName.Truncate();
     PRBool aborted;