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

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

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/platform/graphics/FontFallbackList.cpp
diff --git a/Source/core/platform/graphics/FontFallbackList.cpp b/Source/core/platform/graphics/FontFallbackList.cpp
index e3405e58e06a26528442f22738945c7f437445d0..a68e8ba94307be88aa7e6dae2ce01d946d256566 100644
--- a/Source/core/platform/graphics/FontFallbackList.cpp
+++ b/Source/core/platform/graphics/FontFallbackList.cpp
@@ -88,6 +88,21 @@ void FontFallbackList::determinePitch(const Font* font) const
}
}
+bool FontFallbackList::loadingCustomFonts() const
+{
+ if (m_loadingCustomFonts)
+ return true;
+
+ unsigned numFonts = m_fontList.size();
+ for (unsigned i = 0; i < numFonts; ++i) {
+ if (m_fontList[i]->isCustomFont() && m_fontList[i]->isLoading()) {
+ m_loadingCustomFonts = true;
dglazkov 2013/09/10 15:26:41 This smells wrong. Why does a const getter modify
Kunihiko Sakamoto 2013/09/11 13:28:09 Now FontData in m_fontList can change its loading
+ return true;
+ }
+ }
+ return false;
+}
+
const FontData* FontFallbackList::fontDataAt(const Font* font, unsigned realizedFontIndex) const
{
if (realizedFontIndex < m_fontList.size())

Powered by Google App Engine
This is Rietveld 408576698