Commit 7e3d9268 authored by thatcher's avatar thatcher

Reviewed by Tim H.

        Fix crash in LayoutTests/css1/font_properties/font.html,
        by implementing FontData::smallCapsFontData.

        * platform/qt/FontDataQt.cpp:
        (WebCore::FontData::platformDestroy):
        (WebCore::FontData::smallCapsFontData):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c7b04983
2006-08-27 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Tim H.
Fix crash in LayoutTests/css1/font_properties/font.html,
by implementing FontData::smallCapsFontData.
* platform/qt/FontDataQt.cpp:
(WebCore::FontData::platformDestroy):
(WebCore::FontData::smallCapsFontData):
2006-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
......
......@@ -58,11 +58,19 @@ void FontData::platformInit()
void FontData::platformDestroy()
{
delete m_font.fontPtr();
delete m_smallCapsFontData;
}
FontData* FontData::smallCapsFontData(const FontDescription& fontDescription) const
{
return 0;
if (!m_smallCapsFontData) {
FontDescription desc = FontDescription(fontDescription);
desc.setSpecifiedSize(0.70f * fontDescription.computedSize());
const FontPlatformData* pdata = new FontPlatformData(desc, desc.family().family());
m_smallCapsFontData = new FontData(*pdata);
}
return m_smallCapsFontData;
}
bool FontData::containsCharacters(const UChar* characters, int length) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment