| Index: Source/platform/fonts/FontFallbackList.cpp
|
| diff --git a/Source/core/platform/graphics/FontFallbackList.cpp b/Source/platform/fonts/FontFallbackList.cpp
|
| similarity index 91%
|
| rename from Source/core/platform/graphics/FontFallbackList.cpp
|
| rename to Source/platform/fonts/FontFallbackList.cpp
|
| index c8451d3294e4a1dd58173b336c2713a4c993819e..c2169de65ad69df5a79100c093913ae8488aa6a2 100644
|
| --- a/Source/core/platform/graphics/FontFallbackList.cpp
|
| +++ b/Source/platform/fonts/FontFallbackList.cpp
|
| @@ -27,13 +27,13 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/platform/graphics/FontFallbackList.h"
|
| +#include "platform/fonts/FontFallbackList.h"
|
|
|
| #include "FontFamilyNames.h"
|
| -#include "core/platform/graphics/FontCache.h"
|
| -#include "core/platform/graphics/SegmentedFontData.h"
|
| +#include "platform/fonts/FontCache.h"
|
| #include "platform/fonts/FontDescription.h"
|
| #include "platform/fonts/FontFamily.h"
|
| +#include "platform/fonts/SegmentedFontData.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -43,7 +43,7 @@ FontFallbackList::FontFallbackList()
|
| , m_fontSelector(0)
|
| , m_fontSelectorVersion(0)
|
| , m_familyIndex(0)
|
| - , m_generation(fontCache()->generation())
|
| + , m_generation(FontCache::fontCache()->generation())
|
| , m_pitch(UnknownPitch)
|
| , m_loadingCustomFonts(false)
|
| {
|
| @@ -61,7 +61,7 @@ void FontFallbackList::invalidate(PassRefPtr<FontSelector> fontSelector)
|
| m_loadingCustomFonts = false;
|
| m_fontSelector = fontSelector;
|
| m_fontSelectorVersion = m_fontSelector ? m_fontSelector->version() : 0;
|
| - m_generation = fontCache()->generation();
|
| + m_generation = FontCache::fontCache()->generation();
|
| m_widthCache.clear();
|
| }
|
|
|
| @@ -71,7 +71,7 @@ void FontFallbackList::releaseFontData()
|
| for (unsigned i = 0; i < numFonts; ++i) {
|
| if (!m_fontList[i]->isCustomFont()) {
|
| ASSERT(!m_fontList[i]->isSegmented());
|
| - fontCache()->releaseFontData(static_cast<const SimpleFontData*>(m_fontList[i].get()));
|
| + FontCache::fontCache()->releaseFontData(static_cast<const SimpleFontData*>(m_fontList[i].get()));
|
| }
|
| }
|
| }
|
| @@ -146,7 +146,7 @@ PassRefPtr<FontData> FontFallbackList::getFontData(const FontDescription& fontDe
|
| result = m_fontSelector->getFontData(fontDescription, currFamily->family());
|
|
|
| if (!result)
|
| - result = fontCache()->getFontData(fontDescription, currFamily->family());
|
| + result = FontCache::fontCache()->getFontData(fontDescription, currFamily->family());
|
| }
|
| currFamily = currFamily->next();
|
| }
|
| @@ -167,7 +167,7 @@ PassRefPtr<FontData> FontFallbackList::getFontData(const FontDescription& fontDe
|
| }
|
|
|
| // Still no result. Hand back our last resort fallback font.
|
| - return fontCache()->getLastResortFallbackFont(fontDescription);
|
| + return FontCache::fontCache()->getLastResortFallbackFont(fontDescription);
|
| }
|
|
|
|
|
| @@ -186,7 +186,7 @@ const FontData* FontFallbackList::fontDataAt(const FontDescription& fontDescript
|
| // We are obtaining this font for the first time. We keep track of the families we've looked at before
|
| // in |m_familyIndex|, so that we never scan the same spot in the list twice. getFontData will adjust our
|
| // |m_familyIndex| as it scans for the right font to make.
|
| - ASSERT(fontCache()->generation() == m_generation);
|
| + ASSERT(FontCache::fontCache()->generation() == m_generation);
|
| RefPtr<FontData> result = getFontData(fontDescription, m_familyIndex);
|
| if (result) {
|
| m_fontList.append(result);
|
| @@ -199,8 +199,7 @@ const FontData* FontFallbackList::fontDataAt(const FontDescription& fontDescript
|
| void FontFallbackList::setPlatformFont(const FontPlatformData& platformData)
|
| {
|
| m_familyIndex = cAllFamiliesScanned;
|
| - ASSERT(fontCache()->generation() == m_generation);
|
| - RefPtr<FontData> fontData = fontCache()->fontDataFromFontPlatformData(&platformData);
|
| + RefPtr<FontData> fontData = FontCache::fontCache()->fontDataFromFontPlatformData(&platformData);
|
| m_fontList.append(fontData);
|
| }
|
|
|
|
|