summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-07 22:53:56 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-07 22:53:56 +0000
commit945e94a8508c8fa8372986628e25e2b8d9929ef6 (patch)
tree0ebcd3e71c207196323597d2eca3025e011658fc /webkit/port
parent46f5d445455d045aa74e66e4a65190315c58cc7c (diff)
downloadchromium_src-945e94a8508c8fa8372986628e25e2b8d9929ef6.zip
chromium_src-945e94a8508c8fa8372986628e25e2b8d9929ef6.tar.gz
chromium_src-945e94a8508c8fa8372986628e25e2b8d9929ef6.tar.bz2
Add another case where we make a new SimpleFontData to the
FontCache so it gets deleted properly. Fix a bug where we try to delete a font from the font cache when we never added it in the first place. This is a bug upstream as well so I'm sending a patch upstream. Review URL: http://codereview.chromium.org/6554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/platform/graphics/FontCacheWin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/port/platform/graphics/FontCacheWin.cpp b/webkit/port/platform/graphics/FontCacheWin.cpp
index afb7b93..beda286 100644
--- a/webkit/port/platform/graphics/FontCacheWin.cpp
+++ b/webkit/port/platform/graphics/FontCacheWin.cpp
@@ -474,7 +474,8 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font,
if (langFontLink->MapFont(hdc, actualCodePages, characters[0], &result) == S_OK) {
// This font will have to be deleted using the IMLangFontLink2
// rather than the normal way.
- fontData = new SimpleFontData(FontPlatformData(result, 0, true));
+ FontPlatformData platformData(result, 0, true);
+ fontData = getCachedFontData(&platformData);
}
}