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

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

Issue 401553002: Introduce DEFINE_FONT_DATA_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/platform/fonts/FontData.h ('k') | Source/platform/fonts/GlyphPageTreeNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontFallbackList.cpp
diff --git a/Source/platform/fonts/FontFallbackList.cpp b/Source/platform/fonts/FontFallbackList.cpp
index 05d9fd3f5071e45bbf21a8056904273046570225..fbf4debda102f4ac4d70c4b06107af4a0d74c2ba 100644
--- a/Source/platform/fonts/FontFallbackList.cpp
+++ b/Source/platform/fonts/FontFallbackList.cpp
@@ -71,7 +71,7 @@ void FontFallbackList::releaseFontData()
for (unsigned i = 0; i < numFonts; ++i) {
if (!m_fontList[i]->isCustomFont()) {
ASSERT(!m_fontList[i]->isSegmented());
- FontCache::fontCache()->releaseFontData(static_cast<const SimpleFontData*>(m_fontList[i].get()));
+ FontCache::fontCache()->releaseFontData(toSimpleFontData(m_fontList[i]));
}
}
}
@@ -95,7 +95,7 @@ void FontFallbackList::determinePitch(const FontDescription& fontDescription) co
}
simpleFontData = segmentedFontData->rangeAt(0).fontData().get();
} else {
- simpleFontData = static_cast<const SimpleFontData*>(fontData);
+ simpleFontData = toSimpleFontData(fontData);
}
if (!fontData->isLoadingFallback()) {
m_pitch = simpleFontData->pitch();
« no previous file with comments | « Source/platform/fonts/FontData.h ('k') | Source/platform/fonts/GlyphPageTreeNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698