Created
November 10, 2009 13:01
-
-
Save torarnv/230871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/WebCore/platform/graphics/qt/FontCacheQt.cpp w/WebCore/platform/graphics/qt/FontCacheQt.cpp | |
index 1113eae..469a72e 100644 | |
--- i/WebCore/platform/graphics/qt/FontCacheQt.cpp | |
+++ w/WebCore/platform/graphics/qt/FontCacheQt.cpp | |
@@ -177,15 +177,20 @@ typedef HashMap<FontPlatformDataCacheKey, FontPlatformData*, FontPlatformDataCac | |
// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this. | |
static FontPlatformDataCache* gFontPlatformDataCache = 0; | |
-FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString&, bool) | |
+FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool) | |
{ | |
if (!gFontPlatformDataCache) | |
gFontPlatformDataCache = new FontPlatformDataCache; | |
- FontPlatformDataCacheKey key(description); | |
+ FontDescription descriptionWithResolvedFamily(description); | |
+ FontFamily resolvedFamily; | |
+ resolvedFamily.setFamily(family); | |
+ descriptionWithResolvedFamily.setFamily(resolvedFamily); | |
+ | |
+ FontPlatformDataCacheKey key(descriptionWithResolvedFamily); | |
FontPlatformData* platformData = gFontPlatformDataCache->get(key); | |
if (!platformData) { | |
- platformData = new FontPlatformData(description); | |
+ platformData = new FontPlatformData(descriptionWithResolvedFamily); | |
gFontPlatformDataCache->add(key, platformData); | |
} | |
return platformData; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment