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

Unified Diff: Source/core/css/CSSFontFaceSource.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/CSSFontFace.cpp ('k') | Source/core/css/CSSFontFaceSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSFontFaceSource.h
diff --git a/Source/core/css/CSSFontFaceSource.h b/Source/core/css/CSSFontFaceSource.h
index 6414ae6d8ad4b9ed9375e520d227ace4522b7918..6cdabfd488fa4ac7d79e4dcbf57a3f332cc1f121 100644
--- a/Source/core/css/CSSFontFaceSource.h
+++ b/Source/core/css/CSSFontFaceSource.h
@@ -51,6 +51,7 @@ public:
virtual ~CSSFontFaceSource();
bool isLocal() const;
+ bool isLoading() const;
bool isLoaded() const;
bool isValid() const;
@@ -76,8 +77,11 @@ public:
bool ensureFontData();
bool isLocalFontAvailable(const FontDescription&);
void willUseFontData();
+ void beginLoadingFontSoon();
private:
+ typedef HashMap<unsigned, RefPtr<SimpleFontData> > FontDataTable; // The hash key is composed of size synthetic styles.
+
class FontLoadHistograms {
public:
FontLoadHistograms() : m_loadStartTime(0) { }
@@ -95,7 +99,7 @@ private:
AtomicString m_string; // URI for remote, built-in font name for local.
ResourcePtr<FontResource> m_font; // For remote fonts, a pointer to our cached resource.
CSSFontFace* m_face; // Our owning font face.
- HashMap<unsigned, RefPtr<SimpleFontData> > m_fontDataTable; // The hash key is composed of size synthetic styles.
+ FontDataTable m_fontDataTable;
FontLoadHistograms m_histograms;
#if ENABLE(SVG_FONTS)
« no previous file with comments | « Source/core/css/CSSFontFace.cpp ('k') | Source/core/css/CSSFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698