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

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: Created 4 years, 7 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 c1c0ca97bf8743bf76e5d49cd9e2574837829d86..30b0d09db4977d82e9acb54345b383bcccf241a2 100644
--- a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
@@ -177,15 +177,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_visitedSystemFonts.find(hint) != m_visitedSystemFonts.end()) {
+ if (!hint || m_visitedSystemFonts.find(hint) != m_visitedSystemFonts.end())
return nullptr;
- }
+ FontCache* fontCache = FontCache::fontCache();
RefPtr<SimpleFontData> fallbackFont = fontCache->fallbackFontForCharacter(m_fontDescription, hint, m_fontFallbackList->primarySimpleFontData(m_fontDescription));
return m_visitedSystemFonts.add(hint, fallbackFont).storedValue->value;

Powered by Google App Engine
This is Rietveld 408576698