[Bug 449356] Refactor gfxPangoFontGroup for user fonts

bugzilla-daemon at mozilla.org bugzilla-daemon at mozilla.org
Wed Nov 5 01:21:49 UTC 2008


Do not reply to this email.  You can add comments to this bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=449356





--- Comment #15 from Karl Tomlinson (:karlt) <mozbugz at karlt.net>  2008-11-04 17:21:41 PST ---
Uninitialized variables:

--- a/gfx/thebes/src/gfxPangoFonts.cpp
+++ b/gfx/thebes/src/gfxPangoFonts.cpp
@@ -807,1 +807,1 @@ gfxFcPangoFontSet::SortPreferredFonts()
-            for (PRUint32 r; r < requiredLangs.Length(); ++r) {
+            for (PRUint32 r = 0; r < requiredLangs.Length(); ++r) {
@@ -826,1 +826,1 @@ gfxFcPangoFontSet::SortPreferredFonts()
-    for (PRUint32 r; r < requiredLangs.Length(); ++r) {
+    for (PRUint32 r = 0; r < requiredLangs.Length(); ++r) {

Wrong test:

--- a/gfx/thebes/src/gfxFontconfigUtils.h
+++ b/gfx/thebes/src/gfxFontconfigUtils.h
@@ -213,1 +213,1 @@ public:
-        PRBool IsKeyInitialized() { return mKey.IsVoid(); }
+        PRBool IsKeyInitialized() { return !mKey.IsVoid(); }

The aForce parameter to UpdateFontListInternal forces a check for changes now,
but that doesn't guarantee invalidation of caches (unless a change is
detected).

--- a/gfx/thebes/src/gfxFontconfigUtils.cpp
+++ b/gfx/thebes/src/gfxFontconfigUtils.cpp
@@ -923,6 +923,7 @@ gfxFontconfigUtils::GetLangSupportEntry(
             // entry->mSupport needs to be recalculated, but this is an
             // indication that the set of installed fonts has changed, so
             // update all caches.
+            mLastConfig = NULL; // invalidates caches
             UpdateFontListInternal(PR_TRUE);
             return GetLangSupportEntry(aLang, aWithFonts);
         }

-- 
Configure bugmail: https://bugzilla.mozilla.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the fonts-bugs mailing list