summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/SimpleFontData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/SimpleFontData.cpp')
-rw-r--r--WebCore/platform/graphics/SimpleFontData.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/SimpleFontData.cpp b/WebCore/platform/graphics/SimpleFontData.cpp
index 24812f7..372fcc8 100644
--- a/WebCore/platform/graphics/SimpleFontData.cpp
+++ b/WebCore/platform/graphics/SimpleFontData.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "SimpleFontData.h"
+#include "FontCache.h"
#if ENABLE(SVG_FONTS)
#include "SVGFontData.h"
#include "SVGFontFaceElement.h"
@@ -115,13 +116,16 @@ SimpleFontData::SimpleFontData(const FontPlatformData& f, bool customFont, bool
SimpleFontData::~SimpleFontData()
{
+ if (!isCustomFont()) {
+ if (m_smallCapsFontData)
+ FontCache::releaseFontData(m_smallCapsFontData);
+ GlyphPageTreeNode::pruneTreeFontData(this);
+ }
+
#if ENABLE(SVG_FONTS) && !PLATFORM(QT)
if (!m_svgFontData || !m_svgFontData->svgFontFaceElement())
#endif
platformDestroy();
-
- // We only get deleted when the cache gets cleared. Since the smallCapsRenderer is also in that cache,
- // it will be deleted then, so we don't need to do anything here.
}
float SimpleFontData::widthForGlyph(Glyph glyph) const