Commit 483f9793 authored by mitz@apple.com's avatar mitz@apple.com

2008-06-21 Marvin Decker <marv.decker@gmail.com>

        Reviewed by Dave Hyatt.

        Adds a NULL check for getting the small caps page of glyph data. The
        page() function can explicitly return null in some cases, and every
        other usage in this function does the check.

        * platform/graphics/Font.cpp:
        (WebCore::Font::glyphDataForCharacter):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1e09f32f
2008-06-21 Marvin Decker <marv.decker@gmail.com>
Reviewed by Dave Hyatt.
Adds a NULL check for getting the small caps page of glyph data. The
page() function can explicitly return null in some cases, and every
other usage in this function does the check.
* platform/graphics/Font.cpp:
(WebCore::Font::glyphDataForCharacter):
2008-06-21 Alex Taylor <darwin@milliamp.org>
Reviewed by Dan Bernstein.
......@@ -408,9 +408,12 @@ const GlyphData& Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceS
return data;
GlyphPageTreeNode* smallCapsNode = GlyphPageTreeNode::getRootChild(smallCapsFontData, pageNumber);
const GlyphData& data = smallCapsNode->page()->glyphDataForCharacter(c);
if (data.fontData)
return data;
const GlyphPage* smallCapsPage = smallCapsNode->page();
if (smallCapsPage) {
const GlyphData& data = smallCapsPage->glyphDataForCharacter(c);
if (data.fontData)
return data;
}
// Do not attempt system fallback off the smallCapsFontData. This is the very unlikely case that
// a font has the lowercase character but the small caps font does not have its uppercase version.
......
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