Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Unified Diff: Source/core/platform/graphics/FontFallbackList.h

Issue 23446007: Use unicode-range to prevent unnecessary @font-face donwnloads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and add toSegmentedFontData() Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | Source/core/platform/graphics/FontFallbackList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/FontFallbackList.h
diff --git a/Source/core/platform/graphics/FontFallbackList.h b/Source/core/platform/graphics/FontFallbackList.h
index edf8dcbe4ab386c223bb9139139dd45d54afc599..a952158d6dfee794e7d876323a91d4ea9d76ef28 100644
--- a/Source/core/platform/graphics/FontFallbackList.h
+++ b/Source/core/platform/graphics/FontFallbackList.h
@@ -73,7 +73,7 @@ public:
bool isFixedPitch(const Font* f) const { if (m_pitch == UnknownPitch) determinePitch(f); return m_pitch == FixedPitch; };
void determinePitch(const Font*) const;
- bool loadingCustomFonts() const { return m_loadingCustomFonts; }
+ bool loadingCustomFonts() const;
FontSelector* fontSelector() const { return m_fontSelector.get(); }
// FIXME: It should be possible to combine fontSelectorVersion and generation.
@@ -88,8 +88,11 @@ private:
const SimpleFontData* primarySimpleFontData(const Font* f)
{
ASSERT(isMainThread());
- if (!m_cachedPrimarySimpleFontData)
+ if (!m_cachedPrimarySimpleFontData) {
m_cachedPrimarySimpleFontData = primaryFontData(f)->fontDataForCharacter(' ');
+ if (m_cachedPrimarySimpleFontData)
+ m_cachedPrimarySimpleFontData->beginLoadIfNeeded();
+ }
return m_cachedPrimarySimpleFontData;
}
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | Source/core/platform/graphics/FontFallbackList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698