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

Unified Diff: Source/core/css/CSSSegmentedFontFace.cpp

Issue 248473005: Make CSSFontFace::willUseFontData() load fonts with unicode-range (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/CSSSegmentedFontFace.cpp
diff --git a/Source/core/css/CSSSegmentedFontFace.cpp b/Source/core/css/CSSSegmentedFontFace.cpp
index bf92509586bc0cf842353ff722b5e63361bfd0f7..eee622dc2c684c151c074bffa97571d427c03435 100644
--- a/Source/core/css/CSSSegmentedFontFace.cpp
+++ b/Source/core/css/CSSSegmentedFontFace.cpp
@@ -182,10 +182,14 @@ bool CSSSegmentedFontFace::isLoaded() const
return true;
}
-void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescription)
+void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescription, const String& text)
{
- for (FontFaceList::iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it)
- (*it)->cssFontFace()->willUseFontData(fontDescription);
+ for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); it != m_fontFaces.rend(); ++it) {
+ if ((*it)->loadStatus() != FontFace::Unloaded)
+ break;
+ if ((*it)->cssFontFace()->willUseFontData(fontDescription, text))
+ break;
+ }
}
bool CSSSegmentedFontFace::checkFont(const String& text) const

Powered by Google App Engine
This is Rietveld 408576698