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

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: Created 7 years, 4 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
Index: Source/core/css/CSSFontFaceSource.h
diff --git a/Source/core/css/CSSFontFaceSource.h b/Source/core/css/CSSFontFaceSource.h
index ebb733b92076f794f3f3da9797457521074cd126..89a48358fee4bf5365b922880742e376493569b0 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;
+
class FontLoadHistograms {
public:
enum UsageType {
@@ -103,7 +107,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; // The hash key is composed of size synthetic styles.
dglazkov 2013/09/10 15:26:41 Should the comment go with the typedef?
Kunihiko Sakamoto 2013/09/11 13:28:09 Done.
FontLoadHistograms m_histograms;
#if ENABLE(SVG_FONTS)

Powered by Google App Engine
This is Rietveld 408576698