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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp

Issue 1964773002: Render Unicode control characters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: w/Test changes Created 4 years, 6 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: third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
index 1e37b6da42b1c79077ed11bf98e1d6eb49a3679b..34879c83c2d454826203bef3227885c6173c8de2 100644
--- a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
@@ -182,14 +182,13 @@ const PassRefPtr<SimpleFontData> FontFallbackIterator::fallbackPriorityFont(
const PassRefPtr<SimpleFontData> FontFallbackIterator::uniqueSystemFontForHint(UChar32 hint)
{
- FontCache* fontCache = FontCache::fontCache();
-
// When we're asked for a fallback for the same characters again, we give up
// because the shaper must have previously tried shaping with the font
// already.
- if (m_previouslyAskedForHint.contains(hint))
+ if (!hint || m_previouslyAskedForHint.contains(hint))
return nullptr;
+ FontCache* fontCache = FontCache::fontCache();
m_previouslyAskedForHint.add(hint);
return fontCache->fallbackFontForCharacter(m_fontDescription, hint, m_fontFallbackList->primarySimpleFontData(m_fontDescription));
}

Powered by Google App Engine
This is Rietveld 408576698