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

Unified Diff: Source/platform/fonts/Font.cpp

Issue 870523003: Check for Unicode in Font before ICU call (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test patch - Convert to NFC for if diacritical marks are present Created 5 years, 10 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/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index ebaffa5968dc41c55d653f9215396609eb021bfb..fa4626727b636dbbc6f530dd7507aeca23d39341 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -561,12 +561,7 @@ std::pair<GlyphData, GlyphPage*> Font::glyphDataAndPageForCharacter(UChar32& c,
bool Font::primaryFontHasGlyphForCharacter(UChar32 character) const
{
ASSERT(primaryFont());
- unsigned pageNumber = (character / GlyphPage::size);
-
- GlyphPageTreeNode* node = GlyphPageTreeNode::getNormalRootChild(primaryFont(), pageNumber);
- GlyphPage* page = node->page();
-
- return page && page->glyphForCharacter(character);
+ return primaryFont()->fontHasGlyphForCharacter(character);
}
// FIXME: This function may not work if the emphasis mark uses a complex script, but none of the

Powered by Google App Engine
This is Rietveld 408576698