summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/Font.cpp')
-rw-r--r--WebCore/platform/graphics/Font.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 85fe882..88774cb 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -59,9 +59,7 @@ Font::CodePath Font::s_codePath = Auto;
// ============================================================================================
Font::Font()
- : m_pageZero(0)
- , m_cachedPrimaryFont(0)
- , m_letterSpacing(0)
+ : m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(false)
{
@@ -69,8 +67,6 @@ Font::Font()
Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
: m_fontDescription(fd)
- , m_pageZero(0)
- , m_cachedPrimaryFont(0)
, m_letterSpacing(letterSpacing)
, m_wordSpacing(wordSpacing)
, m_isPlatformFont(false)
@@ -79,8 +75,6 @@ Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
: m_fontList(FontFallbackList::create())
- , m_pageZero(0)
- , m_cachedPrimaryFont(0)
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(true)
@@ -92,9 +86,6 @@ Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
Font::Font(const Font& other)
: m_fontDescription(other.m_fontDescription)
, m_fontList(other.m_fontList)
- , m_pages(other.m_pages)
- , m_pageZero(other.m_pageZero)
- , m_cachedPrimaryFont(other.m_cachedPrimaryFont)
, m_letterSpacing(other.m_letterSpacing)
, m_wordSpacing(other.m_wordSpacing)
, m_isPlatformFont(other.m_isPlatformFont)
@@ -105,9 +96,6 @@ Font& Font::operator=(const Font& other)
{
m_fontDescription = other.m_fontDescription;
m_fontList = other.m_fontList;
- m_pages = other.m_pages;
- m_pageZero = other.m_pageZero;
- m_cachedPrimaryFont = other.m_cachedPrimaryFont;
m_letterSpacing = other.m_letterSpacing;
m_wordSpacing = other.m_wordSpacing;
m_isPlatformFont = other.m_isPlatformFont;
@@ -136,11 +124,10 @@ bool Font::operator==(const Font& other) const
&& (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ? other.m_fontList->generation() : 0);
}
-void Font::cachePrimaryFont() const
+const SimpleFontData* Font::primaryFont() const
{
ASSERT(m_fontList);
- ASSERT(!m_cachedPrimaryFont);
- m_cachedPrimaryFont = m_fontList->primaryFont(this)->fontDataForCharacter(' ');
+ return m_fontList->primarySimpleFontData(this);
}
const FontData* Font::fontDataAt(unsigned index) const
@@ -165,9 +152,6 @@ void Font::update(PassRefPtr<FontSelector> fontSelector) const
if (!m_fontList)
m_fontList = FontFallbackList::create();
m_fontList->invalidate(fontSelector);
- m_cachedPrimaryFont = 0;
- m_pageZero = 0;
- m_pages.clear();
}
bool Font::isFixedPitch() const