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

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: rebase 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
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.h ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSegmentedFontFace.cpp
diff --git a/Source/core/css/CSSSegmentedFontFace.cpp b/Source/core/css/CSSSegmentedFontFace.cpp
index c0d0f9a390dc9ef5ad99ad543eb00a3bdd1cefcd..434fbdc890b4a8841af81d68c8eb0371e6015829 100644
--- a/Source/core/css/CSSSegmentedFontFace.cpp
+++ b/Source/core/css/CSSSegmentedFontFace.cpp
@@ -184,10 +184,14 @@ bool CSSSegmentedFontFace::isLoaded() const
return true;
}
-void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescription)
+void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescription, UChar32 character)
{
- 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()->maybeScheduleFontLoad(fontDescription, character))
+ break;
+ }
}
bool CSSSegmentedFontFace::checkFont(const String& text) const
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.h ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698